Bug report #14844
Oblique Mercator projection hanging when rendering map
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | - | ||
Category: | Projection Support | ||
Affected QGIS version: | 2.14.3 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 22797 |
Description
Hi,
My custom CRS' that use oblique mercator no longer render properly in 2.14. Some layers are rotated properly, others are not, and others are missing. Also, rendering would normally take 2-5 seconds in v2.10 but now it can take 10s of minutes - making them unusable. "Normal" CRS' provided by the program work fine. Here's one of my CRS' for example:
+proj=omerc +lat_0=53.155728 +lonc=-117.171755 +alpha=-44.25 +gamma=0 +k_0=1.00064458 +x_0=0 +y_0=0+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
And another from http://gis.stackexchange.com/questions/83861/using-customized-coordinate-system-for-archaeological-site-data that also no longer works:+proj=omerc +lat_0=51.4 +lonc=7 +alpha=-10 +k=1 +x_0=0 +y_0=0 +gamma=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
Quickly switching between my custom CRS and NAD83 also causes QGIS to freeze and eventually a force quit.
Associated revisions
QgsCoordinateReferenceSystem::setProj4String(): harden validation
OSRImportFromProj4() may accept strings that are not valid proj.4 strings,
e.g if they lack a +ellps parameter, it will automatically add +ellps=WGS84, but as
we use the original mProj4 with QgsCoordinateTransform, it will fail to initialize
so better detect it now.
Fixes #14844
QgsCoordinateReferenceSystem::setProj4String(): harden validation
OSRImportFromProj4() may accept strings that are not valid proj.4 strings,
e.g if they lack a +ellps parameter, it will automatically add +ellps=WGS84, but as
we use the original mProj4 with QgsCoordinateTransform, it will fail to initialize
so better detect it now.
(cherry-picked and adapted from master 85128c54191cfedeaee04ca9c4ac0341ab8f5088)
Fixes #14844
History
#1 Updated by Giovanni Manghi over 8 years ago
- Category set to Projection Support
- Status changed from Open to Feedback
Could you please attach sample project with data?
#2 Updated by Giovanni Manghi over 8 years ago
- Crashes QGIS or corrupts data changed from No to Yes
#3 Updated by Matt Dallaire over 8 years ago
- File CV.zip added
Sample project attached. Used QConsolidate plugin. Thanks for your attention.
#4 Updated by Giovanni Manghi over 8 years ago
Thanks or the project:
I'm opening it in QGIS 2.14.3 and I notice that is missing qiute a lot of layers.
Not sure if it is for this reason, bt the project opens fine (with the provided layers), navigation zoom in/out is also ok, styling, labels, etc.
Could you please describe what would be the issue in the provided project?
Thanks!
#5 Updated by Matt Dallaire over 8 years ago
I removed all the large layers due to the 5MB file upload restriction.
Change the project CRS to:+proj=omerc +lat_0=53.155728 +lonc=-117.171755 +alpha=-44.25 +gamma=0 +k_0=1.00064458 +x_0=0 +y_0=0+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
Notice the layers are now being rendered in varying ways. For example, "CVM Grid" (ESPG:26911) does not change position or rotate, "083C_water_c_l" (ESPG:4269) moves toward the origin, and "RT Mine Footprint" (custom projection) actually is the only layer that projects correctly - probably because it matches the above CRS string. It almost seems like OTF projection is not working, in my opinion.
This was not an issue in recent previous releases.
Cheers,
#6 Updated by Giovanni Manghi over 8 years ago
- Status changed from Feedback to Open
- Crashes QGIS or corrupts data changed from Yes to No
- Affected QGIS version changed from 2.14.2 to 2.14.3
- Priority changed from High to Severe/Regression
I see. Tagging as regression.
#7 Updated by Even Rouault over 8 years ago
The issue with "+proj=omerc +lat_0=53.155728 +lonc=-117.171755 +alpha=-44.25 +gamma=0 +k_0=1.00064458 +x_0=0 +y_0=0+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" is a missing space before +ellps. Addressed by https://github.com/qgis/QGIS/pull/3217
I didn't notice issues with "+proj=omerc +lat_0=51.4 +lonc=7 +alpha=-10 +k=1 +x_0=0 +y_0=0 +gamma=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
#8 Updated by Even Rouault over 8 years ago
- Status changed from Open to Closed
Fixed in changeset 85128c54191cfedeaee04ca9c4ac0341ab8f5088.
#9 Updated by Even Rouault over 8 years ago
- Resolution set to fixed/implemented
- Target version changed from Future Release - High Priority to Version 2.14