I have the shapefile of boundaries loaded in qgis. I want to add a field in the file which is WKT representation of the feature.


As Nathan W answered I used geomToWKT( $geometry ) and got result. The thing is the coordinates are in lon lat format. I found out that that i need them in lat lon format. Is it possible to change the order of coordinates?


In QGIS 2.0 you can use the following function in the field calculator.

 geomToWKT( $geometry )
  • i specified text data type with length 255. I seem to have exceeded that.
    – neogeomat
    Sep 23 '13 at 4:49
  • You are going to be restricted to what shapefiles can store unless you use a different format.
    – Nathan W
    Sep 23 '13 at 5:05

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.