Relative Content

Tag Archive for qgisqsettings

Setting measurement ellipsoid in pyQGIS standalone script

I am running the “Distance Matrix” tool within QGIS and also outside of that in my python IDE. I have my layers set to ESRI:102008 CRS (Albers North America) and have my measurement ellipsoid in Project Properties -> General dialog box accordingly to GRS 1980 (EPSG:7019). Therefore, when I calculate the distances through Distance Matrix tool I get the same results as I do with the distance measure tool in GUI (in Ellipsoidal setting).
But when I run the same function through QgsApplication calls, I see that the distances are calculated in Cartesian setting, which are not as accurate as Ellipsoidal setting. I do not know how can I set this parameter in standalone python script in QgsApplication environment.