Skip to content

Conversation

@shoyer
Copy link

@shoyer shoyer commented Oct 24, 2025

This allows for plotting other popular cylindrical projections (e.g., Gall-Peters)

Fixes #1098

Example usage:

import matplotlib.pyplot as plt
import cartopy.crs as ccrs

plt.figure(figsize=(9.42477796077, 6))
ax = plt.axes(projection=ccrs.LambertCylindrical(latitude_true_scale=45))
ax.coastlines(resolution='110m')
ax.gridlines()
image

This allows for plotting other popular cylindrical projections
(e.g., Gall-Peters)

Fixes SciTools#1098
@CLAassistant
Copy link

CLAassistant commented Oct 24, 2025

CLA assistant check
All committers have signed the CLA.

@shoyer
Copy link
Author

shoyer commented Oct 27, 2025

I think the tests will need to be updated to add new cached images. Is that something I can do, or that happens automatically?

Copy link
Contributor

@greglucas greglucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can/should update images on your end.

See here for a directory of where it is looking for them: https://github.com/SciTools/cartopy/actions/runs/18792338970/job/53625345081?pr=2588#step:9:206
I typically grab the result produced from CI linux runners and then put that in the spot it is expecting them in the repo renamed appropriately.
https://github.com/SciTools/cartopy/actions/runs/18792338970?pr=2588#artifacts

GOOGLE_MERCATOR = Mercator.GOOGLE


class LambertCylindrical(_RectangularProjection):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we actually create a different class GallPeters with a fixed lat_ts=45 and/or a CylindricalEqualArea superclass that takes the new keyword argument. It looks like the Lambert version is specifically for lat_ts=0
https://proj.org/en/stable/operations/projections/cea.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add cylindrical equal-area projection (epsg 6933) support

3 participants