Wednesday, 1 April 2015

Import Points with WKB format to QGIS


I have a .csv file with population data according to specific locations (Points). My problem is that all locations are given in WKB format like that: 0101000020E6100000B953EFEEEEB253C0F15BD4CCCC4C05C0


How can I visualize my data with QGIS? I don't know why there is no simple solution. Because to visualize WKB from a database is no problem. I hope you can help me.



Answer



I create CSV table with attribute "0101000020E6100000B953EFEEEEB253C0F15BD4CCCC4C05C0" (without header). Then import csv table in PostgreSQL/PostGIS database: first: create table with Point geometry field, WGS1984 SRID


CREATE TABLE layer (coord geometry(Point, 4326));


second: import in table data from scv table


COPY layer("coord") FROM 'D:\data.csv';

Then open QGIS, add PostGIS layer (table layer) and receive point feature with coordinates "-78.79583333;-2.6625". This table in PostgreSQL/PostGIS database you caan easy save/export in shapefile.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...