Skip to content

Commit

Permalink
Merge pull request #52 from openaddresses/update-deps
Browse files Browse the repository at this point in the history
Mapbox Vector Tile Updates
  • Loading branch information
ingalls authored Sep 6, 2023
2 parents e2b69c7 + b484b7d commit c484161
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM osgeo/gdal:alpine-normal-3.6.1
FROM ghcr.io/osgeo/gdal:alpine-normal-3.7.1

RUN apk add nodejs yarn git python3 python3-dev py3-pip \
make bash sqlite-dev zlib-dev geos geos-dev \
Expand Down
1 change: 0 additions & 1 deletion openaddr/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import shutil
import re
import csv
import simplejson as json

from os import mkdir
from hashlib import md5
Expand Down
5 changes: 3 additions & 2 deletions openaddr/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ def projected_geom(geometry, mx, bx, my, by):

for (row, col) in row_cols:
url = uritemplate.expand(TILE_URL, dict(z=zoom, x=col, y=row, access_token=mapbox_key))

_L.debug('Getting tile {}'.format(url))

got = requests.get(url)
tile = mapbox_vector_tile.decode(got.content)
bounds = tile_bounds(row, col, zoom)
Expand All @@ -213,8 +216,6 @@ def projected_geom(geometry, mx, bx, my, by):
if feature['properties'].get('class') in ('motorway', 'motorway_link', 'trunk', 'primary', 'secondary', 'tertiary', 'link', 'street', 'street_limited', 'pedestrian', 'construction', 'track', 'service', 'major_rail', 'minor_rail'):
roads_geoms.append(projected_geom(feature['geometry'], *road_xform))

_L.debug('Getting tile {}'.format(url))

return landuse_geoms, water_geoms, roads_geoms

def get_projection():
Expand Down
2 changes: 1 addition & 1 deletion openaddr/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

from requests import get
from httmock import response, HTTMock
import mock
from unittest import mock

from .. import cache, conform, process_one
from ..cache import CacheResult
Expand Down
2 changes: 1 addition & 1 deletion openaddr/tests/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import shutil
import mimetypes

from mock import patch
from unittest.mock import patch
from esridump.errors import EsriDownloadError
import unittest
import httmock
Expand Down
2 changes: 1 addition & 1 deletion openaddr/tests/slippymap.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import unittest
import tempfile
import mock
from unittest import mock

from os.path import join, dirname
from zipfile import ZipFile
Expand Down
2 changes: 1 addition & 1 deletion openaddr/tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from mimetypes import guess_type
from urllib.parse import urlparse, parse_qs
from httmock import HTTMock, response
from mock import Mock, patch
from unittest.mock import Mock, patch

from .. import util, __version__

Expand Down
19 changes: 8 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,28 @@
},
test_suite = 'openaddr.tests',
install_requires = [
'dateutils == 0.6.12', 'ijson == 2.4',

'simplejson == 3.18.0',
'gdal == 3.7.1',

# http://www.voidspace.org.uk/python/mock/
'mock == 3.0.5',
'dateutils == 0.6.12', 'ijson == 2.4',

# https://github.com/uri-templates/uritemplate-py/
'uritemplate == 4.1.1',

# http://docs.python-requests.org/en/master/
'requests == 2.28.1',
'requests == 2.31.0',

# https://github.com/patrys/httmock
'httmock == 1.4.0',

# https://github.com/openaddresses/pyesridump
'esridump == 1.11.0',
'esridump == 1.13.0',

# Used in openaddr.parcels
'Shapely == 2.0.0',
'Shapely == 2.0.1',

# https://github.com/tilezen/mapbox-vector-tile
'mapbox-vector-tile @ git+https://github.com/tilezen/mapbox-vector-tile.git@5249a23da696515f118564dbcc83b39216792454#egg=mapbox-vector-tile',
'future==0.18.2',
'protobuf==4.21',
'mapbox-vector-tile == 2.0.1',
'future==0.18.3',
'protobuf==4.24',
]
)

0 comments on commit c484161

Please sign in to comment.