Skip to content

Commit

Permalink
Merge pull request #1957 from neutrinoceros/implement_deprecations
Browse files Browse the repository at this point in the history
DEPR: implement API changes that were scheduled for cartopy>0.18
  • Loading branch information
greglucas authored Dec 5, 2021
2 parents ecabeb8 + fcb784d commit d35c910
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions lib/cartopy/crs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ class TransverseMercator(Projection):

def __init__(self, central_longitude=0.0, central_latitude=0.0,
false_easting=0.0, false_northing=0.0,
scale_factor=1.0, globe=None, approx=None):
scale_factor=1.0, globe=None, approx=False):
"""
Parameters
----------
Expand All @@ -1428,12 +1428,6 @@ def __init__(self, central_longitude=0.0, central_latitude=0.0,
will change to False in the next release.
"""
if approx is None:
warnings.warn('The default value for the *approx* keyword '
'argument to TransverseMercator will change '
'from True to False after 0.18.',
stacklevel=2)
approx = True
proj4_params = [('proj', 'tmerc'), ('lon_0', central_longitude),
('lat_0', central_latitude), ('k', scale_factor),
('x_0', false_easting), ('y_0', false_northing),
Expand Down Expand Up @@ -1462,13 +1456,7 @@ def y_limits(self):


class OSGB(TransverseMercator):
def __init__(self, approx=None):
if approx is None:
warnings.warn('The default value for the *approx* keyword '
'argument to OSGB will change from True to '
'False after 0.18.',
stacklevel=2)
approx = True
def __init__(self, approx=False):
super().__init__(central_longitude=-2, central_latitude=49,
scale_factor=0.9996012717,
false_easting=400000, false_northing=-100000,
Expand All @@ -1491,13 +1479,7 @@ def y_limits(self):


class OSNI(TransverseMercator):
def __init__(self, approx=None):
if approx is None:
warnings.warn('The default value for the *approx* keyword '
'argument to OSNI will change from True to '
'False after 0.18.',
stacklevel=2)
approx = True
def __init__(self, approx=False):
globe = Globe(semimajor_axis=6377340.189,
semiminor_axis=6356034.447938534)
super().__init__(central_longitude=-8, central_latitude=53.5,
Expand Down

0 comments on commit d35c910

Please sign in to comment.