[QGIS-Developer] Reg: QgsCoordinateTransform not working on Linux (Prem Kumar)

Jean Hemmi jean at jhemmi.eu
Thu May 27 09:00:06 PDT 2021


Hello Prem
I've experienced the same problem running qgis standalone.
QgsCoordinateTransform works fine inside QGIS. Perhaps the project instance
misses something...
I've choose a bypass using pyproj

from pyproj import Proj, transform
PYPROJ_SOURCE_CRS      = Proj(init='epsg:4326')
PYPROJ_DESTINATION_CRS = Proj(init='epsg:2154')
longDestination, latDestination = transform( PYPROJ_SOURCE_CRS,
PYPROJ_DESTINATION_CRS, long, lat)
QgsPointXY( longDestination, latDestination)  # you're back in QGIS API

Hope this can help you
Jean Hemmi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210527/10352a69/attachment.html>


More information about the QGIS-Developer mailing list