-
Notifications
You must be signed in to change notification settings - Fork 803
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
Parse compound id with two authorities, like ESRI:103668+EPSG:5703 #2669
Parse compound id with two authorities, like ESRI:103668+EPSG:5703 #2669
Conversation
src/iso19111/io.cpp
Outdated
if (ci_equal(authCandidate, authName1)) { | ||
auto factory = | ||
AuthorityFactory::create(dbContextNNPtr, authCandidate); | ||
crs1 = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some compilers require an explict .as_nullable() to cast from a non-null shared pointed to a regular one. But here the best option would probably be to just assign the real authority names to a std::string and then do like the tokens.size() == 2 case avoid the non-null test on crs1 / crs2.
Actually you could skip the ci_equal() test and just use what the user provides. The case-insensitive comparison in the tokens.size() == 2 case was done because of legacy practice of using "epsg:XXXX", but here for a new supported syntax we can be stricter. That will make the code simpler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Without ci_equal
the code is much simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, projinfo esri:103668+epsg:5703
does work perfectly. However projinfo ogc:CRS84+EPSG:5773
fails. (something that somehow I noticed with --list-crs
)
AuthorityFactory::create
does a ci_equal
for EPSG
, ESRI
and PROJ
.
could you document the new syntax around https://github.com/OSGeo/PROJ/blob/master/src/iso19111/io.cpp#L6805 ? |
Hi, I'm very new to GDAL and would like to understand how to convert my tif file from NAVD88 to the WGS84 ellipsoid height? Using gdalwarp -overwrite Hernando_2007_FDEM_WGS84_NAVD88.tif Hernando_2007_FDEM_WGS84_WGS84.tif -s_srs EPSG:3857+5703 -t_srs EPSG:4979 did not work for me; any ideas on the necessary steps and syntax? |
see point B of https://lists.osgeo.org/pipermail/gdal-dev/2021-August/054531.html |
Following the suggestion here, https://lists.osgeo.org/pipermail/proj/2021-April/010166.html
this PR parses an identifier that combines two authorities.
Useful to add NAVD88 to many ESRI crs not defined in EPSG.