Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEPR: implement API changes that were scheduled for cartopy>0.18 #1957

Merged
merged 1 commit into from
Dec 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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