Load Geneva dataset#

In this tutorial, we will learn how to load Geneva 3D buildings datasets.

Geneva Geneva 3D buildings datasets can be loaded thanks to the geneva.load_data() function. This function will first check if the city’s building geometries files are already present in the dataset folder. You can acces the local geneva dataset directory using the following function:

from ipybuilding.utils import get_config

config = get_config()
path = config["GENEVA_DATASET_PATH"]
path

Out:

'/home/docs/ipybuilding_data/GENEVA'

If not already present on your computer, this function will automatically download the 3 .gpkg files containing the city building’s geometries from a remote serveur and save them in the local geneva dataset directory for futur use. If the file are already present in the local geneva dataset directory, the function will check the hash in case of modification and redownload clean versions if needed.

from ipybuilding.datasets import geneva

base_path, facade_path, roof_path = geneva.load_data()
base_path

Out:

'/home/docs/ipybuilding_data/GENEVA/bases.gpkg'

base_path, facade_path, roof_path are the respective path to the files of base, roof and facade geometries of geneva’s buildings. theses files can esaly be loaded thanks to geopandas:

EGID ALTITUDE_REF SURFACE_SOL DATE_LEVE geometry
0 295171354 409.52 1097.93 2016/03/01 00:00:00 MULTIPOLYGON Z (((6.15889 46.29025 409.51970, ...
1 295157779 395.64 76.86 2016/03/01 00:00:00 MULTIPOLYGON Z (((6.13947 46.25003 395.64210, ...
2 295512808 374.56 47.46 2016/03/01 00:00:00 MULTIPOLYGON Z (((6.15144 46.24978 374.56440, ...
3 295162834 396.68 50.48 2016/03/01 00:00:00 MULTIPOLYGON Z (((6.16284 46.27838 396.68320, ...
4 295514305 422.55 1185.94 2016/03/01 00:00:00 MULTIPOLYGON Z (((6.14091 46.28352 422.55050, ...
... ... ... ... ... ...
80443 2375265 395.75 81.15 2005/08/01 00:00:00 MULTIPOLYGON Z (((6.24301 46.29477 395.75060, ...
80444 3131802 402.03 113.00 2005/08/01 00:00:00 MULTIPOLYGON Z (((6.24360 46.29467 402.12000, ...
80445 295010264 403.82 98.64 2005/08/01 00:00:00 MULTIPOLYGON Z (((6.24419 46.29480 403.82000, ...
80446 295071877 399.65 102.62 2005/08/01 00:00:00 MULTIPOLYGON Z (((6.24351 46.29505 399.82000, ...
80447 1018588 463.09 77.63 2005/08/01 00:00:00 MULTIPOLYGON Z (((6.25714 46.22820 463.23000, ...

80448 rows × 5 columns



Total running time of the script: ( 0 minutes 38.249 seconds)

Gallery generated by Sphinx-Gallery