satpy icon indicating copy to clipboard operation
satpy copied to clipboard

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

Open guidocioni opened this issue 2 years ago • 5 comments

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.

guidocioni avatar Jun 09 '23 07:06 guidocioni

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.

simonrp84 avatar Jun 09 '23 07:06 simonrp84

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 :)

guidocioni avatar Jun 09 '23 08:06 guidocioni

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 :)

mraspaud avatar Jun 09 '23 09:06 mraspaud

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.

guidocioni avatar Jun 09 '23 11:06 guidocioni

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

djhoese avatar Jun 09 '23 12:06 djhoese