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

Alternative to Cartopy #7

Open
chadhutchins182 opened this issue Aug 2, 2023 · 3 comments
Open

Alternative to Cartopy #7

chadhutchins182 opened this issue Aug 2, 2023 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@chadhutchins182
Copy link
Contributor

Hey @ahuang11 I've been working on converting xnrl to use Python Poetry and pyproject.toml. Everything is mostly ok and more testing is needed but the big hangup is using cartopy with grid lines, states, countries, etc with the notebooks and I would imagine that would carry over to the runtime.

The problem with cartopy is the system level requirements (geos and gdal) and getting a venv created each time or in a CI situation. Is there an alternative pure python library that could be used to provide those drawing features?

Thanks!

@chadhutchins182 chadhutchins182 added enhancement New feature or request question Further information is requested labels Aug 2, 2023
@ahuang11
Copy link
Contributor

ahuang11 commented Aug 2, 2023

One workaround is using tile sources instead of coastlines/grid lines/states/etc), but the downside is that you need your other data projected in GOOGLE_MERCATOR https://holoviews.org/reference/elements/bokeh/Tiles.html

A suggestion is to use a Docker image with conda + cartopy (something like https://huggingface.co/spaces/ahuang11/esip-presentation-meeting/blob/main/Dockerfile but it could probably be optimized).

It also seems Cartopy maintainers have been working on removing GEOS from requirements SciTools/cartopy#2083 so it can be pip installed in the near future!

@chadhutchins182
Copy link
Contributor Author

One workaround is using tile sources instead of coastlines/grid lines/states/etc), but the downside is that you need your other data projected in GOOGLE_MERCATOR https://holoviews.org/reference/elements/bokeh/Tiles.html

A suggestion is to use a Docker image with conda + cartopy (something like https://huggingface.co/spaces/ahuang11/esip-presentation-meeting/blob/main/Dockerfile but it could probably be optimized).

It also seems Cartopy maintainers have been working on removing GEOS from requirements SciTools/cartopy#2083 so it can be pip installed in the near future!

Thanks @ahuang11

I think I'll take the easy way out for now and move cartopy to a docs group dependency and then create a Docker container with Conda and use that to build the mkdocs for xnrl (that way the notebooks will work). With FNMOC not supporting Conda/Anaconda it's hard to stay with them even though I would rather do that!

Though if someone used xnrl to draw coastlines they would need cartopy... I guess I could make it an extra and a docs dependency.

Thoughts?
Chad

@ahuang11
Copy link
Contributor

ahuang11 commented Aug 5, 2023

Not sure if it was a coincidence, but cartopy is now simply pip installable!!
https://github.com/SciTools/cartopy/releases/tag/v0.22.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants