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

Prem Kumar prem.netgis at gmail.com
Thu May 27 09:45:25 PDT 2021


Hi Jean,

Thanks a lot for the reply, as an alternative solution I had taken the
similar help from pyproj after several attempts to resolve the issue with
QgsCoordinateTransform. But, curious to see what made the code to ignore
the transformation.

-Prem

On Thu, May 27, 2021 at 9:30 PM Jean Hemmi <jean at jhemmi.eu> wrote:

> 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
>
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210527/a9101471/attachment.html>


More information about the QGIS-Developer mailing list