I have a point layer, that I'd like to return the Longitude, latitude using the qgis api. I assume I need to use QgsPoint
Tell me more
×
Geographic Information Systems Stack Exchange is a question and answer site for
cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
This works on the latest release 'Tethys'. The point layer that I am interested in is the first layer in my layer list. The coordinate values will be in the units of the spatial reference system of the layer. If your layer is in lat/lon, remember that x=lon and y=lat... Open the Python Console and type this:
|
||||
|
|
|
This requires your layer to be in a projection using lat/lon to return geographic coordinates:
(taken from Points2One Plugin by Pavol Kapusta & Goyo Diaz) |
|||
|
|
