I need to label the simple-features/shapes in a Well-known text file. Is there some best practice on how to achieve this? Should I just keep the labels as separate entities linked to the WKT or is it possible to add this to the WKT itself? Thanks.


As far as I know WKT doesn't really support any kind of label as it just represents the geometry itself. What you could do is however just store it as comma separated list eg:

feature1label, {WKT string}
feature2label, {WKT string}

You should then be able to display this with X GIS program. QGIS can open and display text files with a comma separated list of WKT objects using the Delimited Text plugin.

|improve this answer|||||
  • Nathan is right, the OGC WKT for Simple Features only talks about how to define the feature geometries with text, not the attributes. I would link directly to their documentation, but they require you to accept their license agreement to view the 'Open' specification. – DavidF Mar 14 '11 at 14:06

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.