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.
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.