@@ -76,12 +76,12 @@ def _make_crs(
76
76
return (crs , crs_str , epsg )
77
77
78
78
79
- def _make_crs_transform_key (from_crs , to_crs , always_xy ):
80
- return (id (from_crs ), id (to_crs ), always_xy )
79
+ def _make_crs_transform_key (from_crs , to_crs , always_xy , force_over = False ):
80
+ return (id (from_crs ), id (to_crs ), always_xy , force_over )
81
81
82
82
83
83
@cachetools .cached ({}, key = _make_crs_transform_key )
84
- def _make_crs_transform (from_crs : _CRS , to_crs : _CRS , always_xy : bool ) -> Transformer :
84
+ def _make_crs_transform (from_crs : _CRS , to_crs : _CRS , always_xy : bool , force_over : bool = False ) -> Transformer :
85
85
return Transformer .from_crs (from_crs , to_crs , always_xy = always_xy , force_over = force_over )
86
86
87
87
@@ -299,7 +299,7 @@ def crs_str(self) -> str:
299
299
return self ._str
300
300
301
301
def transformer_to_crs (
302
- self , other : "CRS" , always_xy : bool = True
302
+ self , other : "CRS" , always_xy : bool = True , force_over : bool = False
303
303
) -> Callable [[Any , Any ], Tuple [Any , Any ]]:
304
304
"""
305
305
Build coordinate transformer to other projection.
@@ -318,7 +318,7 @@ def transformer_to_crs(
318
318
"""
319
319
320
320
# pylint: disable=protected-access
321
- tr = _make_crs_transform (self ._crs , other ._crs , always_xy = always_xy )
321
+ tr = _make_crs_transform (self ._crs , other ._crs , always_xy = always_xy , force_over = force_over )
322
322
323
323
def result (x , y , ** kw ):
324
324
rx , ry = tr .transform (x , y , ** kw ) # pylint: disable=unpacking-non-sequence
0 commit comments