Fixing with Proj 9.8#2653
Conversation
This eliminates a warning from shapely deprecating the geos submodule.
greglucas
left a comment
There was a problem hiding this comment.
I think this makes sense for Natural Earth at a minimum
https://www.naturalearthdata.com/features/
Projection: Natural Earth’s WGS84 projection is specified in shapefile’s PRJ file. It can also be described as a PROJ4 code [EPSG:4326](http://spatialreference.org/ref/epsg/wgs-84/) string “+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs”.
The thing that I've always wondered though is if we shouldn't just make a class LatLong() instead (or in addition to as an alternative spelling)?
Regarding your question about clipping being worse, do you know if this takes the geodesic interpolator path because pyproj thinks even the native "projection" definition is geodetic?
Implement the shift previously enabled with lon_0 using the prime meridian (pm) argument.
|
I agree we should also have a No, it doesn't trigger Cartopy's geodesic interpolation ( Test failure notes:
|
See also my comments on #2685; grid labelling seems a bit fragile in some ways, but that's a bigger problem to fix. |
This test is a bit weird; it uses default |
A lot of these seem to have been increased to allow newer and newer PROJ. Since we have moved to pyproj and dropped support for several older versions, it may be time to refresh these and reset the tolerances. |
See [1] and [2]. [1]: SciTools/cartopy#2653 [2]: SciTools/cartopy#2634
So in the case of
This may be because tight layout changed the positioning slightly due to the top-right map gaining its 180° labels. The Mercator subplot in the new image is 1 pixel taller than before. I feel like if you try to overlay the other maps, you see a similar issue because they're all a pixel or two different in shape. |



As noted in #2634, Proj 9.8 added support for properly handling ellipsoids to the equidistant cylindrical projection (OSGeo/PROJ#4656). This breaks assumptions we make in PlateCarree, where we try to essentially make it treat lat/lon as unchanged Cartesian coordinates; this is accomplished by undoing the scaling by the Earth's radius (and converting radians back to degrees).
This PR attempts to update PlateCarree to correctly function with Proj 9.8 by avoiding scaling hacks altogether and just use the
latlongprojection to accomplish what we intend with PlateCarree. In order to handle the offsets that were previously supported, we use thepm(Prime Meridian) PROJ parameter. (Usinglon_0in this case created problems with finding transformations in some cases because this ends up encoded as a remark.)pmcauses some challenges in that it ends up attached to the datum, which violates some assumptions we were previously making.This breaks some tests, but nothing that seems to be critical. One oddity is that some clipping around the edges of plots seem to be working less well for reasons I haven't identified.