A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Hot answers tagged


The +init= syntax is deprecated. So all you need is the ESRI:102001 part. See: https://pyproj4.github.io/pyproj/stable/gotchas.html#init-auth-auth-code-should-be-replaced-with-auth-auth-code inputGDF.crs = 'esri:102001'


First, let's see what the mapping between a Y-X plane and a Lon-Lat plane would look like: Notes: Y-X-H coordinates are Cartesian ones. Since you named it Gaussian coordinates, it is suposed to Y and X are Transverse Mercator projections of the geodetic coordinates. I am assuming that Y coordinates are Eastings and X coordinates are Northings. ...


You need to set the environment variables to run the QGIS python outside. In this case my QGIS installation is in D:\QGIS, so you should only change OSGEO4W_ROOT. @ECHO OFF set OSGEO4W_ROOT=D:\QGIS call "%OSGEO4W_ROOT%\bin\o4w_env.bat" call "%OSGEO4W_ROOT%\bin\qt5_env.bat" call "%OSGEO4W_ROOT%\bin\py3_env.bat" path %OSGEO4W_ROOT%\apps\qgis\bin;%PATH% ...


The issue you are having is due to axis order changes in PROJ 6+: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6 One solution is to use always_xy: from shapely.geometry import LineString from shapely.ops import transform from functools import partial import pyproj roadsegment = LineString([(5.318945751388698, 50....


Could you try something like this for python file? C:\PROGRA~1\QGIS3~1.4\apps\Python37\python.exe c:/Users/user/Desktop/xx/run.py


@jelleve, your answer is correct and in line with https://pyproj4.github.io/pyproj/stable/advanced_examples.html#optimize-transformations. Additionally, you may be interested in geopandas. It will enable you to read/write these geometries and reproject them using the same method you showed above using one line of code: gdf = geopandas.read_file("input....

Only top voted, non community-wiki answers of a minimum length are eligible