#1146 closed bug (fixed)
Custom Projection Definition
Reported by: | alf | Owned by: | nobody |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | |
Component: | Projection Support | Version: | 0.10.0 |
Keywords: | Projection, Custom, ellps, proj4, ellipsoid | Cc: | afrigeri@…, thare@… |
Must Fix for Release: | No | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
Hello,
while adding a projection definition in the Custom Projection Definition dialog, if I pass 'a' and 'b' parameters instead the 'ellps' I got the error message: "This proj4 ellps definition is not valid. Please add a valid ellps clause before pressing save". Even adding the ellipsoid name (e.g. foo) and relative parameters to qgis.db and passing +ellps=foo does not work, as qgis rises up: "This proj4 definition is not valid. Please correct before saving".
To fix this beaviour temporarily I commented out lines 775-780 of src/app/qgscustomprojectiondialog.cpp ( conditional statement on myEllipsoidAcronym.isNull() ); in this way, the projection definition is accepted also with 'a' and 'b' parameters and the reprojection on the fly works as expected (I've checked coordinates with proj using the same proj4 definition on the command line).
Best regards,
Alessandro Frigeri
Change History (4)
comment:1 by , 16 years ago
Milestone: | → Version 0.11.0 |
---|
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Hi
Ok so I agree its probably best to comment out the check for now since there are a number of non ellps+ ways to specify the ellipsoid. In the future we could implement more sophisticated checks to try to validate the various permutations, but for now the fact that the proj string in its entirety is checked in the code that follows this block should be sufficient. Here is the comment I placed in the code.
Many thanks
Regards
Tim