Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am working on a project which uses pyrosm to get static .PBF files and need this functionality rather than manually determining the .PBF files for each location. I believe this implementation allows for the use cases mentioned in #165 and #197.
`suggest = Suggest()
chicago = shapely.geometry.box(-87.629, 41.878, -87.614, 41.902)
abuja = shapely.geometry.box(7.5, 9.5, 7.6, 9.6)
suggest.continents(chicago)
Out[2]: array(['north-america'], dtype=object)
suggest.cities(chicago)
Out[3]: array(['chicago'], dtype=object)
suggest.cities(chicago, url=True)
Out[4]:
array(['https://download.bbbike.org/osm/bbbike/Chicago/Chicago.osm.pbf'],
dtype=object)
suggest.continents(abuja)
Out[5]: array(['africa'], dtype=object)
suggest.subregions(abuja)
Out[6]: array([], dtype=object)
suggest.regions(abuja, url=True)
Out[7]:
array(['http://download.geofabrik.de/africa/nigeria-latest.osm.pbf'],
dtype=object)
`