2

Is it possible to create a shapefile directly from a CSV WKT file in QGIS 2.01?

WKT
POLYGON(...)
POLYGON(...)

Save as shapefile doesn't seem to work.

  • Save as should work. What exactly happens if you try? Can you provide a few lines of the CSV for test purposes? – underdark Jan 10 '14 at 8:42
  • Ok: wkt_geom WKT Indicator Unit Subgroup Area Area ID Time Perio Source Data Value Total ug_dis_txt ug_dis_t_1 ug_dis_t_2 ug_dis_t_3 ug_dis_t_4 NULL Rural safe water coverage Percent Total Kasese AFRUGA004006 1997 UGA_SA01, Statistical Abstract for the Year 2001, Uganda Bureau of Statistics_June 2001 56.8 56.8 MULTIPOLYGON (((29.69894176319956 -0.207959707995483,29.699173391560674 -0.207610084667762,29.69928899695746 -0.207609762601961,29.699288480121101 -0.207610802690738,29.69894176319956 -0.207959707995483)),((30.289259452112795 0.230890259465728,30.2895114 120 Pre 2005 0.274835 2.477278 – TimTensen Jan 10 '14 at 8:50
  • THis is only one line.. I cannot post most characters :) – TimTensen Jan 10 '14 at 8:51
  • You can edit this into your question. The header line should be seperate. Otherwise you have a line separation problem, which might be Operating System dependent. What OS are you running? – AndreJ Jan 10 '14 at 9:11
1

For a CSV import with WKT, the delimiter must be semicolon or tab, because comma and blank are already used inside the WKT field as point and coordinate separators.

You can exchange the separators with a good text editor (like Notepad++ on Windows).

  • Ok, I think I solved it by opening as delimited file and than save as shapefile.. I have to learn a lot :), installed QGis only a few day ago. Thanks! – TimTensen Jan 10 '14 at 9:57
  • I am also new to the GIS stack exchange, how should I close a question after it is solved? – TimTensen Jan 10 '14 at 9:58
  • @TimTensen There is a tick mark button besides every answer which you can use to "accept" the answer which solved your problem. – underdark Jan 10 '14 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.