AdrianKriger / osm_LoD1_3DCityModel

LoD1 3D City Model from OpenStreetMap contributions and raster DEM
https://adriankriger.github.io/osm_LoD1_3DCityModel/
MIT License
8 stars 1 forks source link

cull osm.pbf #4

Closed AdrianKriger closed 2 years ago

AdrianKriger commented 2 years ago

I'm starting with a city-level osm.pbf -> available from either Geofrabik and BBBike via pyrosm

It might be helpful to iteratively trim the osm.pbf before the focus area is selected and buildings are harvested. Here osmfilter or osmconvert with poly files could do the necessary.

This will generalize the solution to country-level osm.pbf's

A few timing tests: a) country.pbf -> focus area; ~ too long b) country.pbf -> region -> focus area ~ 5 min. ~ trim + full run would make for an evidence based decision.

AdrianKriger commented 2 years ago

added with c9bf9cd.

parameters as example

    "osm-pbf": "South Africa",
    "update": "False",
    "pbf_directory": "data",

    "trim": "yes",
    "osmconvert": "osmconvert64",                                # in the root folder ~ where `osm3DMainDistricts.py` is
    "osm_poly": "tshwane_gauteng.poly",                          # in the `data` folder
    "trim_pbf": "Tshwane_gauteng_extract.pbf",

    "Focus_area": "Tshwane Ward 58",
...