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

seeking advice for proj_create_crs_to_crs and tinshift transform #3161

Closed
josch opened this issue Apr 10, 2022 · 4 comments
Closed

seeking advice for proj_create_crs_to_crs and tinshift transform #3161

josch opened this issue Apr 10, 2022 · 4 comments
Labels

Comments

@josch
Copy link
Contributor

josch commented Apr 10, 2022

Dear Proj maintainers,

thanks a lot for your amazing help with implementing the fallback_strategy option for tinshift in #2903 and #2907. I'm using this to warp maps and render them with mapnik. This all worked well until mapnik added support for more recent proj >= 7 and with it added a call to proj_create_crs_to_crs: mapnik/mapnik@88241b3#diff-3817884b302c98d6b02df071fa796efda25b53389fcedf28f6b7c200a7ed5efdR130

My tinshift pipeline +proj=pipeline +step +proj=webmerc +step +proj=tinshift +file=/tmp/tinshift.json is not a crs so with mapnik from git, my code will fail with proj_create_operations: source_crs is not a CRS.

Unfortunately I'm still a proj noob and while I found +type=crs in the docs, adding it to my pipeline didn't solve the problem.

So my question to you is: is there a way to turn my proj string into a crs? And if not, what should mapnik replace proj_create_crs_to_crs with so that it still works with a non-crs source?

Thank you!

@josch josch added the bug label Apr 10, 2022
@rouault
Copy link
Member

rouault commented Apr 10, 2022

So my question to you is: is there a way to turn my proj string into a crs?

no

And if not, what should mapnik replace proj_create_crs_to_crs with so that it still works with a non-crs source?

it could offer the possibility to handle a PROJ transformation pipeline by using proj_create

@rouault rouault closed this as completed Apr 10, 2022
@josch
Copy link
Contributor Author

josch commented Apr 10, 2022

Thanks! Do you know of existing code using proj_create to allow non-crs input? When searching for code examples it seems that the world moved to proj_create_crs_to_crs. :(

Do I also understand it correctly, that to get a single transformation for use with proj_trans from source to target with my source containing a pipeline would result in a nested pipeline?

@snowman2
Copy link
Contributor

Do you know of existing code using proj_create to allow non-crs input?

pyproj may be a useful reference:

@josch
Copy link
Contributor Author

josch commented Apr 14, 2022

Than you @snowman2, I asked the same question on the ML and got a very helpful reply from @rouault: https://lists.osgeo.org/pipermail/proj/2022-April/010597.html

I'll reply to that mail and update my question on stackoverflow once I have some code. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants