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

Feature request: CFCRS #39

Open
asinghvi17 opened this issue Oct 8, 2024 · 7 comments
Open

Feature request: CFCRS #39

asinghvi17 opened this issue Oct 8, 2024 · 7 comments

Comments

@asinghvi17
Copy link
Member

Would be nice to have a CFCRS object, similar to PROJJSON. That way conversions are at least reasonable to do...

@rafaqz
Copy link
Member

rafaqz commented Oct 8, 2024

How would it be represented? You mean in some kind of Dict?

GDAL can actually convert it too somehow - I don't think Proj can? Which is an interesting thought for out switch to Proj.

I did start implementing a parser for cf crs years ago, this has some mappings to proj:
https://github.com/rafaqz/Rasters.jl/blob/0888bd6d7a4df201ef94f0bf224602fbbcf9c106/src/sources/ncdatasets.jl#L407-L508

Based on some osgeo pages that are sadly private or deleted now.

@rafaqz
Copy link
Member

rafaqz commented Oct 8, 2024

Feel free to PR, this is a good idea

@asinghvi17
Copy link
Member Author

That could work, I think pyproj also just has a manual implementation semi-copied from GDAL that we could use

@rafaqz
Copy link
Member

rafaqz commented Oct 8, 2024

To clarify, by PR I meant just the wrapper for now! But the parser would be nice too

@asinghvi17
Copy link
Member Author

asinghvi17 commented Oct 8, 2024

Yeah I'm on the same page there, just a note for the future :D

The parser could probably go into some hypothetical CFCRS.jl that Proj could depend on?

@asinghvi17
Copy link
Member Author

https://github.com/OSGeo/gdal/blob/2f07a3d6100a258b6a81b3ac08fab9f9e51d38c1/ogr/ogr_srs_cf1.cpp and the associated .h are the GDAL definitions, this looks like something that is trivially translatable to Julia (we might be able to snag the tests as well)

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

No branches or pull requests

2 participants