opengeos / open-buildings

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

Don't create empty files if there are 0 features #35

Closed cholmes closed 11 months ago

cholmes commented 11 months ago

Right now if you put in a geojson of an area that has no buildings (like the middle of the ocean, or the middle of the desert) then the get_buildings command will write out a geospatial file with 0 rows. This is not ideal - instead it should warn the user and then not actually call the DuckDB command to write it out.

This should be pretty simple to do - somewhere in here just check if the count is 0, and if it is then print out to the user that 0 buildings were found and that no file was written, and then just return / skip the rest.