Skip to content

A QGIS plugin to calculate various cartographic projection properties

License

Notifications You must be signed in to change notification settings

kannes/proj_factors_redux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Projection Factors Redux

A QGIS plugin to calculate various cartographic projection properties.

"Redux" of https://plugins.qgis.org/plugins/ProjFactors-gh-pages/

Click the icon in the plugins toolbar, wait a while, inspect the resulting raster layer's bands.

Examples

Areal Scale in EPSG:3857 (WGS 84 / Pseudo-Mercator)

3857 areal scale

Angular distortion over Europe in EPSG:3035 (ETRS89-extended / LAEA Europe)

3035

Meridional Scale over Germany in EPSG:25832 (ETRS89 / UTM zone 32N)

25832

Technical explanation

Basically all it does is:

  • Generate a point for each canvas pixel
  • Transform them to WGS84
  • Calculate the project CRS' projection factors for each
  • Generate a raster band per projection factor
  • Build a GeoTIFF with all the raster bands
  • Create a VRT to add band names (workaround for PyQGIS not allowing to set raster band names)

Notes

This plugin has been developed off and on again over several years. From the first steps in PyQGIS until today. Expect some weird stuff if you look at the code. :0)

Using pyproj directly for 4x speed

There does not seem to be a way to find out if we could safely import pyproj (i.e. if that would load a pyproj that is using the same proj as QGIS does. I assume that even the same version number between

  • QGIS' proj: [v for v in QgsCommandLineUtils.allVersions().split("\n") if v.startswith("PROJ version")][0][13:] (yeah, great way to find that version, I know)
  • and pyproj's proj (no idea how to determine it without importing pyproj first... Version of pyproj itself != proj ...)

would not be a safe indicator.

So, you can choose to use pyproj yourself, for a ~4x speed gain:

In your QGIS3.ini, set

[ProjectionFactorsRedux]
useProj=false

Thanks to

About

A QGIS plugin to calculate various cartographic projection properties

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages