root676 / QNEAT3

QNEAT3 - Qgis Network Analysis Toolbox 3
GNU General Public License v3.0
63 stars 12 forks source link

Check input CRSs #35

Open josephholler opened 4 years ago

josephholler commented 4 years ago

We're working on code to check if all input CRSs are projected, and if all input CRSs are using the same projected coordinate system.

For example, we can add this code to Iso areas as contour from layer:

if analysisCrs.isGeographic(): raise QgsProcessingException('QNEAT3 algorithms are designed to work with projected coordinate systems. Please use a projected coordinate system (eg. UTM zones) instead of geographic coordinate systems (eg. WGS84)!') if analysisCrs != startPoints.sourceCrs(): raise QgsProcessingException('QNEAT3 algorithms require that all inputs to be the same projected coordinate reference system.')

This way, the QNEAT3 algorithms will stop and output an error rather than giving incorrect outputs.