OSM package
OpenStreetMap data import and GeoJSON conversion module.
Provides Overpass API integration for downloading OSM data and converting it to GeoJSON format for district heating network planning.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- districtheatingsim.osm.import_osm_data_geojson.build_query(city_name, tags, element_type='way')[source]
Build Overpass API query for OSM data download.
- districtheatingsim.osm.import_osm_data_geojson.download_data(query, element_type)[source]
Download OSM data via Overpass API and convert to GeoJSON.
- Parameters:
- Returns:
GeoJSON FeatureCollection with OSM data
- Return type:
geojson.FeatureCollection
- Raises:
OverpassError – If API query fails
Note
Ways create LineString geometries, buildings create Polygon/MultiPolygon.