A Python pipeline that generates Digital Surface Model (DSMs) and converts them into point clouds for City4CFD modeling. Due to the lack of open, high-resolution global DSM datasets, the generation logic differs by target city (see the figure below).
├── code/
│ ├── main.py
│ ├── get_dtm.py
│ ├── get_dsm.py
│ └── convert_dsm_to_las.py
├── output_example/
│ ├── london.laz
│ ├── seoul.laz
│ ├── madrid.laz
└── README.md
- OpenTopography API Key: Required to download DTM datasets (e.g., COP30, NASADEM) for cities outside of England/Netherlands.
- Libraries: Install the required dependencies using the following command:
pip install earthengine-api geemap geopandas pandas shapely rasterio osmnx overturemaps numpy laspy lazrs pyproj tqdm requests
- Download the
/code/directory - Run
main.pywith the necessary arguments Examples by case:- [Case 1] For cities in England/Netherlands (uses Google Earth Engine high-resolution data)
python main.py --region England --city London --crs EPSG:27700 - [Case 2] For cities outside of England/Netherlands (uses OpenTopography for DTM and OSM/Overture Maps for building data)
- Save as uncompressed LAS
python main.py --region "South Korea" --city Seoul --crs EPSG:32652 --dtm_dataset NASADEM --api-key _put_your_api_key_ --no-compress - Convert with subsampling (every 2nd pixel)
python main.py --region Spain --city Madrid --crs EPSG:25830 --bbox "[-3.7050, 40.4430, -3.6750, 40.4850]" --dtm_dataset COP30 --api-key _put_your_api_key_ --subsample 2
- Save as uncompressed LAS
- [Case 1] For cities in England/Netherlands (uses Google Earth Engine high-resolution data)
| File Name | Description | Resolution |
|---|---|---|
[city_name].tif |
Merged DSM | • England: 1m × 1m • Netherlands: 0.5m × 0.5m • Others: 1m × 1m |
[city_name]_dtm.tif |
DTM (Only for non-England/Netherlands cities) | 1m × 1m |
[city_name].las / .laz |
Point Cloud | - |
For the cities outside England/Netherlands:
- Missing Heights: If a building footprint lacks height data, it is assigned a default height of 3.0m (assuming a single-story).
- Level of Detail: LoD1