opengeos / open-buildings

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

Option to just get the 'count' of buildings, but not actually download the results. #30

Open cholmes opened 9 months ago

cholmes commented 9 months ago

It'd be nice to be able to quickly see how many buildings a request would result in, instead of downloading all the buildings. This can be done by just doing a select count (*) (instead of select *) in DuckDB, and then just printing that out and not downloading anything.

To add this just start with --verbose to see what type of queries DuckDB will issue, and then try out a similar query that will just get the count and make sure it works. Then try just changing the core 'download' command to do a count and print that out. Once that is working then you just need to add the flag, to the cli.py and pass in the count flag to the download function in download_buildings.

If you want to take this on and have more questions feel free to comment here and I can explain more.

mtravis commented 8 months ago

@cholmes happy to take this one on.

cholmes commented 8 months ago

Go for it! Just make a PR and I can review it.