Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

normalizeForVisualization(): make it switch axis for EPSG:5482 (RSRGD2000 / RSPS2000) #2256

Merged

Conversation

rouault
Copy link
Member

@rouault rouault commented Jun 3, 2020

Fixes #2254

@rouault rouault added this to the 7.1.0 milestone Jun 3, 2020
@rouault rouault merged commit 2a84dc8 into OSGeo:master Jun 3, 2020
2 checks passed
@palmerj
Copy link

palmerj commented Jun 3, 2020

Can you please be backport this to 6.3? I see QGIS is currently built against 6.3.X

@rouault
Copy link
Member Author

rouault commented Jun 3, 2020

There is no more 6.3 maintenance release planned. The next one will be 7.1 this July 1st
QGIS Windows builds should normally switch soon to PROJ 7.0 (and ultimately catch up with 7.1)

@palmerj
Copy link

palmerj commented Jun 3, 2020

Ok thanks. So in the mean time what's the workaround? Add a custom RSPS2000 projection to QGIS with:

+proj=pipeline
+step +proj=axisswap +order=2,1 
+step +proj=unitconvert +xy_in=deg +xy_out=rad
+step +proj=stere +lat_0=-90 +lon_0=180 +k=0.994 
+x_0=5000000 +y_0=1000000 +ellps=GRS80
+step +proj=axisswap +order=2,1 

?

@rouault
Copy link
Member Author

rouault commented Jun 3, 2020

Pipelines will not be accepted, as they model a transformation, ot a CRS. I've tried just the PROJ CRS string "+proj=stere +lat_0=-90 +lon_0=180 +k=0.994 +x_0=5000000 +y_0=1000000 +ellps=GRS80" and it is valid, but it is then refused as being equivalent to EPSG:5482.
Trying with an amended WKT2 with the "gis friendly order" also leads to the same error. QGIS is too smart... The workaround would probably then to remove EPSG:5482 definition from at least QGIS srs.db, and potentially from proj.db too, but I didn't try that

@palmerj
Copy link

palmerj commented Jun 4, 2020

Note I tried deleting from srs.db and proj.db and then entering the above proj string as a custom projection. Now the data won't show at all.

But I got it working by updating the srs.db parameters.

sqlite3 /path/to/qgis/share/srs.db "UPDATE tbl_srs SET parameters = '+proj=stere +lat_0=-90 +lon_0=180 +k=0.994 +x_0=5000000 +y_0=1000000 +ellps=GRS80' WHERE srid = 5482;"

The existing parameters where:

'+proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=180 +k=0.994 +x_0=5000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'

I'm still a little confused how this is working as not axis parameters have been changed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect Projection Parameters for RSRGD2000 / RSPS2000
2 participants