-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Projection not recognised from Mapinfo converstion #34471
Comments
Possibly related: a custom Mercator projection is recognized in 3.10.2 as invalid, but in 3.4.9 is recognized correctly as custom CRS. Even if 3.10.2 calls it invalid, it projects it correctly. |
What's the issue here? The projection isn't recognised because it isn't a standard projection. |
The issue is that in earlier versions it would be recognized as a user defined CRS and given a 10000n number, and in 3.10.2 it just says it's invalid, not assigning it a CRS ID. Applies to both files uploaded so far. |
Can you test with a nightly 3.10.3 release or master? I don't see the same behavior here. |
I tested this with a 3.11.06 release from the weekly downloads (not sure if that's correct?). The problem persists; in addition it seems that a .prj string is not properly recognized - the following .prj files are nearly identical, yet one of the shapefiles gets an unknown CRS. |
I've developed a script to "brute force" the projection into PROJ4 coordinates - |
The current approach was based on a srsid, that that might be unset for custom CRS. So store a full QgsCoordinateReferenceSystem object internally and use that for exchanges with QgsProjectionSelectionWidget Consequence: we need to deprecate the "long crs()" method, and replace it by a "QgsCoordinateReferenceSystem crsObject()" one. I'm not particularly happy with the name but the existing one was not very well named... Mark also the QgsVectorLayerSaveAsDialog( long srsid, ... ) constructor as deprecated Fixes the use case of qgis#34471 (comment)
Looking at 32S_test_lines.zip from #34471 (comment) , the UTM32S definition that is not identified is the one from UTM32S.prj. When looking at the content of it, one see that the reverse flattening of WGS84 in that file is 298.25722293 whereas the correct value is 298.257223563. That's a relative difference of 2e-9. PROJ uses currently a threshold of 1e-10 relative error to determine if 2 CRS are equivalent, so the non identification is logical. |
The current approach was based on a srsid, that that might be unset for custom CRS. So store a full QgsCoordinateReferenceSystem object internally and use that for exchanges with QgsProjectionSelectionWidget Consequence: we need to deprecate the "long crs()" method, and replace it by a "QgsCoordinateReferenceSystem crsObject()" one. I'm not particularly happy with the name but the existing one was not very well named... Mark also the QgsVectorLayerSaveAsDialog( long srsid, ... ) constructor as deprecated Fixes the use case of #34471 (comment)
The current approach was based on a srsid, that that might be unset for custom CRS. So store a full QgsCoordinateReferenceSystem object internally and use that for exchanges with QgsProjectionSelectionWidget Consequence: we need to deprecate the "long crs()" method, and replace it by a "QgsCoordinateReferenceSystem crsObject()" one. I'm not particularly happy with the name but the existing one was not very well named... Mark also the QgsVectorLayerSaveAsDialog( long srsid, ... ) constructor as deprecated Fixes the use case of qgis#34471 (comment) (cherry picked from commit 535c253)
case closed then. |
The current approach was based on a srsid, that that might be unset for custom CRS. So store a full QgsCoordinateReferenceSystem object internally and use that for exchanges with QgsProjectionSelectionWidget Consequence: we need to deprecate the "long crs()" method, and replace it by a "QgsCoordinateReferenceSystem crsObject()" one. I'm not particularly happy with the name but the existing one was not very well named... Mark also the QgsVectorLayerSaveAsDialog( long srsid, ... ) constructor as deprecated Fixes the use case of #34471 (comment) (cherry picked from commit 535c253)
When I try to open a shape file that has been translated from Mapinfo discover the projection isn't recognised. The grid is a local grid. Output.zip is the attached file that i'm trying to open
Output.zip
I'm currently using Qgis version 3.10.2
Additional context
Here are some control points:
Mine X | Mine Y| MGA 94(50) X| MGA 94(50) Y
2453.122|3210.002|563053.406|7431461.771
-1735.225|-853.24|557798.872|7428929.256
5663.648|7386.58|567416.171|7434410.368
12607.859|-1438.839|571218.306|7423848.605
8502.84|2620.24|568605.287|7428993.832
-2500.032|3457.767|558433.331|7433259.449
Here is the Mapinfo .prj file entry:
"Mine to MGA", 3008, 33,7, 117, 0, 0.9996, 500000, 10000000 , 7, 0.949288, -0.315744, 1814394.28, 0.315737, 0.94926, -7228957.16, -100000, -100000, 100000, 100000
The text was updated successfully, but these errors were encountered: