From a02cc4d2a645c26f90ad88a441e6488eea11bb85 Mon Sep 17 00:00:00 2001 From: Do Ngoc Khanh <14163153+epn09@users.noreply.github.com> Date: Tue, 3 Feb 2026 15:24:07 +0900 Subject: [PATCH] Expose +gamma for Oblique Mercator --- lib/cartopy/crs.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/cartopy/crs.py b/lib/cartopy/crs.py index 8a6dd4ccf..bb72e1557 100644 --- a/lib/cartopy/crs.py +++ b/lib/cartopy/crs.py @@ -3160,7 +3160,7 @@ class ObliqueMercator(Projection): def __init__(self, central_longitude=0.0, central_latitude=0.0, false_easting=0.0, false_northing=0.0, - scale_factor=1.0, azimuth=0.0, globe=None): + scale_factor=1.0, azimuth=0.0, gamma=None, globe=None): """ Parameters ---------- @@ -3178,6 +3178,9 @@ def __init__(self, central_longitude=0.0, central_latitude=0.0, azimuth: optional Azimuth of centerline clockwise from north at the center point of the centre line. Defaults to 0. + gamma: optional + Azimuth of centerline clockwise from north of the rectified bearing + of centre line. If omitted, `alpha` determines the values of `gamma`. globe: optional An instance of :class:`cartopy.crs.Globe`. If omitted, a default globe is created. @@ -3198,6 +3201,9 @@ def __init__(self, central_longitude=0.0, central_latitude=0.0, ('x_0', false_easting), ('y_0', false_northing), ('alpha', azimuth), ('units', 'm')] + if gamma is not None: + proj4_params.append(('gamma', gamma)) + super().__init__(proj4_params, globe=globe) # Couple limits to those of Mercator - delivers acceptable plots, and