pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.07k stars 298 forks source link

Any examples using `basemap` instead than `cartopy`? #2505

Open guidocioni opened 1 year ago

guidocioni commented 1 year ago

Feature Request

Even though cartopy is the preferred solution for geospatial plotting in Python, its development has slowed down in the past few years, and there are still many parts of the code that are much slower than in basemap (e.g. https://github.com/SciTools/cartopy/issues/2102).

It would be beneficial to have some examples illustrating how to plot the data coming from satpy with basemap. At the moment there are only examples including cartopy and, to me, it is not clear how to convert the projection crs to something that basemap could understand, besides generating the lat/lon coordinates from the array and then plotting it into an arbitrarily defined projection.

simonrp84 commented 1 year ago

While I'm sure someone will be able to provide an example, I just wanted to point out that Basemap is deprecated and is not recommended for use any more.

guidocioni commented 1 year ago

While I'm sure someone will be able to provide an example, I just wanted to point out that Basemap is deprecated and is not recommended for use any more.

This is exactly why I wrote this

Even though cartopy is the preferred solution for geospatial plotting in Python, its development has slowed down in the past few years, and there are still many parts of the code that are much slower than in basemap (e.g. https://github.com/SciTools/cartopy/issues/2102).

You'll find plenty of posts online describing how the tool is still not mature enough for many applications. In my case, as there is a factor of 20 in time when plotting coastlines at high resolution, it is simply not possible to use cartopy. Believe me, I'd like to :)

mraspaud commented 1 year ago

I'm not against having an example using basemap as long as it is clearly stated that it's for legacy installations only. @guidocioni feel free to open a PR :)

guidocioni commented 1 year ago

I'm not against having an example using basemap as long as it is clearly stated that it's for legacy installations only. @guidocioni feel free to open a PR :)

I would like to, the problem is that I do no really know how to do that, and this is the reason why I opened this issue in the first place :D

With cartopy one just has to use to_cartopy_crs() to get the projection definition, but I'm not sure how I would use that for basemap. It seems that the conversion string to proj is not working every time.

djhoese commented 1 year ago

https://pyresample.readthedocs.io/en/latest/howtos/plot.html#getting-a-basemap-object