SciTools / cartopy

Cartopy - a cartographic python library with matplotlib support
https://scitools.org.uk/cartopy/docs/latest
BSD 3-Clause "New" or "Revised" License
1.41k stars 359 forks source link

set_extent over 360 longitudes #1633

Open qdnse opened 4 years ago

qdnse commented 4 years ago

Description

For a routing purpose, i need to plot a route which do more than a world tour (360+ in longitudes). But, you can't set an extent more than -180/180 longitude.

Is there any way to create a map similar to the next one, using the set_extent method like this : set_extent([-180, 540, -90, 90]) map

Thanks for the amazing work done!

dopplershift commented 4 years ago

I don't know that any of the projections are set up to even handle that--that's PROJ limitation. Everything I can think of is going to map a longitude of 470 to the same location as longitude 110.

The best I can come up with is to plot without a projection (straight matplotlib) and plot two copies of the map information, with one having all longitudes offset by 360.

mdaeron commented 4 months ago

@qdnse did you ever work out a solution to this problem? I'm working on some oceanographic maps, and it would be really useful to have a modest degree of overlap at the left and right edges of the plot.

lgolston commented 4 months ago

This feels like it should be possible now if support for +over is added, per: https://proj.org/en/9.4/usage/projections.html#longitude-wrapping