1

I have a largely identical query to How to draw lines from two points in a CSV?, however the solution listed isnt working for me.

My original text format is PID, Start Northing, Start Easting, End Northing, End Easting.

I've tried in excel to make into a WKT compatible format, i.e.

BL2990;LINESTRING(490206.73 214102.673, 490236.94 214134.576)

This works when pasting a single line into QuickWKT, however I can't paste multiple lines in...is QuickWMT intended for a quick preview of single objects only?

In terms of importing as a delimited text file, I have arranged as:

ID;GEOM

"BL2990";"LINESTRING(490206.73 214102.673, 490236.94 214134.576)" Etc, and saved as a .txt file.

When I import as delimited text and select ";" as delimiter, the import creates the 2 column headers but fails to split the data string into ID and Geometry fields. What am I doing wrong?

I've tested importing the .txt while excluding the ID header and ID text string which works fine, however it is critical that the lines retain their identifier.

1

Your data looks ok. In the Delimited text input form, the Geometry definition should be set to WKT, and the Geometry Field to the column containing the WKT. That way you get the linestring into QGIS.

If you change the name of the second column from GEOM to WKT, QGIS automatically sets the Geometry definition and Geometry Field to that column.

  • Changing the Header to "WKT" worked perfectly, thanks. – Kyle May 20 '16 at 11:52

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.