Skip to content

Create shapefiles for terrain, roads and LOD-1 buildings of European Capital Cities with Python and Grasshopper for Rhino

Notifications You must be signed in to change notification settings

vertragus/EUcities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EUcities

Purpose

This notebook employs open source databases to create a shapefile that includes terrain, roads and buildings LOD-1 data, including an estimation of building heights.

Sources

Outputs

Requirements Python 3.0 with the following libraries:

  • osmnx
  • geopandas
  • pandas
  • numpy
  • rasterio
  • rasterstats

More specs on building heights calculation Building heights are issued from zonal statistics between the building footprints in the selected area and the building heights 2012 raster. Such raster, classifies the heights in 10 bins (2-4, 4-6, 6-8, 8-10, 10-15, 15-20, 20-30, 30-60, 60-100, >100 meters height). Per each building footprint, the weighted average of the number of pixels in a given bin times a random height within the bin range is calculated. This gives the calculated height.

Use

  • Open the script with Jupyter Notebook.
  • Indicate the work directory and the sampling distance resolution for the raster DEM.
  • Create a dictionary containing the cities as keys and a list of OSM regions (relations IDs) as value.
    • To gather the relation ID of a OSM region, simply go to https://www.openstreetmap.org
    • On the right-side toolbar, select the "query on object" tool, i.e. a mousepointer with a questionmark
    • click on a point on the map
    • scroll the frame that appears on the left to the "encapsulating objects" list
    • select the boundary of interest. It will be highlighted in the map
    • the number in parentheses () after the region name is the relation ID
  • Run the script for the chosen city.

Grasshopper module

About

Create shapefiles for terrain, roads and LOD-1 buildings of European Capital Cities with Python and Grasshopper for Rhino

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published