opengeos / open-buildings

Tools for working with open building datasets
https://opengeos.github.io/open-buildings
Other
124 stars 17 forks source link

Warn users if their geojson is not in `iso_country` #34

Open cholmes opened 11 months ago

cholmes commented 11 months ago

Adding a wrong iso_country will result in 0 buildings coming down, since it'll just query the wrong country. It'd be good to warn users about that possibility.

I think this can be pretty simple - just check if there are 0 features that are downloaded and if the user provided a country_iso. If both of those are true then print out something like 'WARNING: You supplied country_iso BR and your geojson got 0 buildings. Check to be sure your GeoJSON is actually in the right country'. Note that if we do #29 then there will hopefully be no need for this warning.