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

Pipeline doesn't honour +datum=NAD27 expansion to +ellps=clrk66 +nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat #872

Closed
rouault opened this issue Mar 20, 2018 · 2 comments
Milestone

Comments

@rouault
Copy link
Member

@rouault rouault commented Mar 20, 2018

The following results in a unexpected no-op

$ echo "-100 40 0" | PROJ_LIB=nad src/cct +proj=pipeline +step +proj=longlat +datum=NAD27 +inv +step +proj=longlat +datum=WGS84
-100.0000000000   40.0000000000        0.0000           inf

whereas

$ echo "-100 40 0" | PROJ_LIB=nad src/cct +proj=pipeline +step +proj=longlat +ellps=clrk66 +nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat +inv +step +proj=longlat +datum=WGS84
-100.0004058367   40.0000058947        0.0000           inf

which is the same as

$ echo "-100 40 0" | PROJ_LIB=nad src/cs2cs +proj=longlat +datum=NAD27 +to +proj=longlat +datum=WGS84
100d0'1.461"W	40d0'0.021"N 0.000
@kbevers
Copy link
Member

@kbevers kbevers commented Mar 20, 2018

I'll just re-iterate Thomas' explanation of what's going on here: http://lists.maptools.org/pipermail/proj/2018-February/008055.html

The problem can possibly be fixed by expanding +datum=xxx to it's full representation from pj_datums in the top of cs2cs_emulation_setup() and adding the expanded parameters to P->params before the actual setup is started. Exercise left to the reader :-)

@kbevers
Copy link
Member

@kbevers kbevers commented Mar 20, 2018

Okay, I think I've got a fix for this. It seems to be straight forward actually. Pull request coming up.

kbevers added a commit to kbevers/PROJ that referenced this issue Mar 20, 2018
@kbevers kbevers closed this in #877 Mar 20, 2018
kbevers added a commit that referenced this issue Mar 20, 2018
@kbevers kbevers added this to the 5.0.1 milestone Mar 20, 2018
rouault added a commit that referenced this issue Aug 11, 2018
…s' grid (we should have a way to state that some grids must be present) (refs #872)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants