[QGIS-Developer] QGS UTM <==> WGS84 Formatted String Conversion
Nyall Dawson
nyall.dawson at gmail.com
Fri Jan 18 13:55:25 PST 2019
On Sat, 19 Jan 2019 at 01:39, C Hamilton <adenaculture at gmail.com> wrote:
>
> I there an API call in QGIS that will take a UTM formatted string (ie 11N 345567 432145) and convert it to a lat and lon as well as going the other direction? It certainly supports the UTM projections but I don't see this conversion. There are python libraries have have this in them.
>
> The reason I ask is that there is interest in this being a part of Lat Lon Tools and I would like to find the easiest way to do this.
Not that I'm aware of. I think you'd best be served by using a regex
to parse the particular input string you want and extract the zone,
easting and northing, and then setup a QgsCoordinateTransform to
convert from the detected UTM zone to WGS84. Should be ~5-10 lines of
code to do, without needing any additional Python libraries.
Nyall
>
> Thanks,
>
> Calvin
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the QGIS-Developer
mailing list