Skip to content

Commit 8e10681

Browse files
committed
Use new pyproj style
1 parent 1097e79 commit 8e10681

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

label_maker/label.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,5 +329,6 @@ def _create_empty_label(ml_type, classes):
329329
# Use with 'transform' to project to EPSG:4326
330330
project = partial(
331331
pyproj.transform,
332-
pyproj.Proj(init='epsg:3857'),
333-
pyproj.Proj(init='epsg:4326'))
332+
pyproj.Proj('epsg:3857'),
333+
pyproj.Proj('epsg:4326')
334+
)

label_maker/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def get_tile_tif(tile, imagery, folder, kwargs):
4949
imagery_offset = kwargs.get('imagery_offset') or [0, 0]
5050
with rasterio.open(imagery) as src:
5151
x_res, y_res = src.transform[0], src.transform[4]
52-
p1 = Proj({'init': 'epsg:4326'})
53-
p2 = Proj(**src.crs)
52+
p1 = Proj('epsg:4326')
53+
p2 = Proj(str(src.crs))
5454

5555
# offset our imagery in the "destination pixel" space
5656
offset_bound = dict()
@@ -106,8 +106,8 @@ def get_tile_wms(tile, imagery, folder, kwargs):
106106

107107
# find our tile bounding box
108108
bound = bounds(*[int(t) for t in tile.split('-')])
109-
p1 = Proj({'init': 'epsg:4326'})
110-
p2 = Proj({'init': wms_srs})
109+
p1 = Proj('epsg:4326')
110+
p2 = Proj(wms_srs)
111111

112112
# project the tile bounding box from lat/lng to WMS SRS
113113
tile_ll_proj = transform(p1, p2, bound.west, bound.south)

0 commit comments

Comments
 (0)