@@ -1172,7 +1172,9 @@ def __init__(self, central_longitude=-96.0, central_latitude=39.0,
11721172 elif secant_latitudes is not None :
11731173 warnings .warn ('secant_latitudes has been deprecated in v0.12. '
11741174 'The standard_parallels keyword can be used as a '
1175- 'direct replacement.' )
1175+ 'direct replacement.' ,
1176+ DeprecationWarning ,
1177+ stacklevel = 2 )
11761178 standard_parallels = secant_latitudes
11771179 elif standard_parallels is None :
11781180 # The default. Put this as a keyword arg default once
@@ -1436,12 +1438,14 @@ def __init__(self, central_latitude=0.0, central_longitude=0.0,
14361438 'The Stereographic projection in Proj older than '
14371439 '5.0.0 incorrectly transforms points when '
14381440 'central_latitude=0. Use this projection with '
1439- 'caution.' )
1441+ 'caution.' ,
1442+ stacklevel = 2 )
14401443 else :
14411444 warnings .warn (
14421445 'Cannot determine Proj version. The Stereographic '
14431446 'projection may be unreliable and should be used with '
1444- 'caution.' )
1447+ 'caution.' ,
1448+ stacklevel = 2 )
14451449
14461450 proj4_params = [('proj' , 'stere' ), ('lat_0' , central_latitude ),
14471451 ('lon_0' , central_longitude ),
@@ -1451,7 +1455,8 @@ def __init__(self, central_latitude=0.0, central_longitude=0.0,
14511455 if central_latitude not in (- 90. , 90. ):
14521456 warnings .warn ('"true_scale_latitude" parameter is only used '
14531457 'for polar stereographic projections. Consider '
1454- 'the use of "scale_factor" instead.' )
1458+ 'the use of "scale_factor" instead.' ,
1459+ stacklevel = 2 )
14551460 proj4_params .append (('lat_ts' , true_scale_latitude ))
14561461
14571462 if scale_factor is not None :
@@ -1529,11 +1534,13 @@ def __init__(self, central_longitude=0.0, central_latitude=0.0,
15291534 warnings .warn (
15301535 'The Orthographic projection in the v5.0.x series of Proj '
15311536 'incorrectly transforms points. Use this projection with '
1532- 'caution.' )
1537+ 'caution.' ,
1538+ stacklevel = 2 )
15331539 else :
15341540 warnings .warn (
15351541 'Cannot determine Proj version. The Orthographic projection '
1536- 'may be unreliable and should be used with caution.' )
1542+ 'may be unreliable and should be used with caution.' ,
1543+ stacklevel = 2 )
15371544
15381545 proj4_params = [('proj' , 'ortho' ), ('lon_0' , central_longitude ),
15391546 ('lat_0' , central_latitude )]
@@ -1865,11 +1872,13 @@ def __init__(self, central_longitude=0, globe=None,
18651872 warnings .warn ('The Robinson projection in the v4.8.x series '
18661873 'of Proj contains a discontinuity at '
18671874 '40 deg latitude. Use this projection with '
1868- 'caution.' )
1875+ 'caution.' ,
1876+ stacklevel = 2 )
18691877 else :
18701878 warnings .warn ('Cannot determine Proj version. The Robinson '
18711879 'projection may be unreliable and should be used '
1872- 'with caution.' )
1880+ 'with caution.' ,
1881+ stacklevel = 2 )
18731882
18741883 proj4_params = [('proj' , 'robin' ), ('lon_0' , central_longitude )]
18751884 super (Robinson , self ).__init__ (proj4_params , central_longitude ,
@@ -2291,11 +2300,13 @@ def __init__(self, central_longitude=0.0, central_latitude=0.0,
22912300 warnings .warn ('The Azimuthal Equidistant projection in Proj '
22922301 'older than 4.9.2 incorrectly transforms points '
22932302 'farther than 90 deg from the origin. Use this '
2294- 'projection with caution.' )
2303+ 'projection with caution.' ,
2304+ stacklevel = 2 )
22952305 else :
22962306 warnings .warn ('Cannot determine Proj version. The Azimuthal '
22972307 'Equidistant projection may be unreliable and '
2298- 'should be used with caution.' )
2308+ 'should be used with caution.' ,
2309+ stacklevel = 2 )
22992310
23002311 proj4_params = [('proj' , 'aeqd' ), ('lon_0' , central_longitude ),
23012312 ('lat_0' , central_latitude ),
0 commit comments