pyrosm icon indicating copy to clipboard operation
pyrosm copied to clipboard

get_data for USA subregion georgia pulls data from the country of Georgia.

Open jspalink opened this issue 3 years ago • 2 comments

When pulling data from subregions in the United States, when you get to Georgia, the get_data call will download data from the country of Georgia rather than from the state of Georgia.

import pyrosm

subregions = pyrosm.data.sources.subregions.usa.available
assert subregions[9] == 'georgia'
osm = pyrosm.OSM(pyrosm.get_data(subregions[9]))
pois = osm.get_pois({'amenity':True})

assert len(pois[pois.centroid.x < 0]) == 0

All the POIs that are retrieved will be in the country of Georgia, rather than the USA state of Georgia.

jspalink avatar Dec 09 '21 16:12 jspalink

@jspalink Oh my. 😬 Thanks for reporting, will take a look at this! 👍🏻

HTenkanen avatar Dec 11 '21 07:12 HTenkanen

perhaps get_data could use the "id" of the region provided by the geojson from https://download.geofabrik.de/index-v1.json for download, seems like they have already thought about these conflicts.

jaguardo avatar Sep 01 '22 22:09 jaguardo