Skip to content

Commit

Permalink
Data download hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
MKuranowski committed Aug 21, 2018
1 parent 4158e0b commit 578d570
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions pyroutelib3.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from warnings import warn
from datetime import datetime
from collections import OrderedDict
from urllib.request import urlretrieve

__title__ = "pyroutelib3"
__description__ = "Library for simple routing on OSM data"
Expand All @@ -50,7 +51,7 @@
__copyright__ = "Copyright 2007, Oliver White; Modifications: Copyright 2017-2018, Mikolaj Kuranowski"
__credits__ = ["Oliver White", "Mikolaj Kuranowski"]
__license__ = "GPL v3"
__version__ = "1.0"
__version__ = "1.0post1"
__maintainer__ = "Mikolaj Kuranowski"
__email__ = "[email protected]"

Expand Down Expand Up @@ -213,7 +214,8 @@ def getArea(self, lat, lon):
downloadedSecondsAgo = math.inf

if downloadedSecondsAgo >= self.expire_data:
urlretrieve("https://api.openstreetmap.org/api/0.6/map?bbox={0},{1},{2},{3}".format(_tileBoundary(x, y, 15)), filename)
left, bottom, right, top = _tileBoundary(x, y, 15)
urlretrieve("https://api.openstreetmap.org/api/0.6/map?bbox={0},{1},{2},{3}".format(left, bottom, right, top), filename)

self.loadOsm(filename)

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
name = "pyroutelib3",
py_modules = ["pyroutelib3"],
license = "GPL v3",
version = "1.0",
version = "1.0post1",
description = "Library for simple routing on OSM data",
long_description = readme,
long_description_content_type = "text/markdown",
author = "Oliver White",
maintainer = "Mikolaj Kuranowski",
maintainer_email = "[email protected]",
url = "https://github.com/MKuranowski/pyroutelib3",
download_url = "https://github.com/MKuranowski/pyroutelib3/archive/1.0.tar.gz",
download_url = "https://github.com/MKuranowski/pyroutelib3/archive/1.0.post1.tar.gz",
keywords = "osm routing pyroutelib",
classifiers = [],
install_requires = ["osmapi", "python-dateutil"]
Expand Down

0 comments on commit 578d570

Please sign in to comment.