uesgraphs.examples.e9_generate_ues_from_osm_example

Generate complex Urban Energy System (UES) Graph from OpenStreetMap (OSM) data.

This script processes OSM data to create and visualize district heating networks. It performs building clustering, street network analysis, and generates various visualization outputs.

Output Files

e9_simple_melaten_osm.png

Basic network visualization without detailed features

e9_example_melaten_osm.png

Network layout including street labels

e9_example_melaten_osm_bldgs.png

Network layout with building identifiers

e9_example_melaten_osm_wo_large_bldgs.png

Network layout after removing large buildings Note: Only building 1121 is removed in this example

e9_simple_melaten_osm_wo_large_bldgs.png

Simplified network view without building 1121

e9_melaten_dhc_network.png

District heating network visualization after: - Street crossing detection - Building clustering - Supply node integration - Network optimization

e9_melaten_dhc_network_detail.png

Detailed view of the final district heating network

Dependencies

  • uesgraphs

  • os

Author

MichaMans

Review

rka-lko

Functions

add_district_heating_buildings(input_graph, ...)

Set the given osm id as supply and remaining buildings as demand.

area_list(input_graph)

List the average area of small, medium and large buildings

generate_ues()

Loads an osm file and plots it.

main()

Main function.

remove_small_buildings(input_graph, min_area)

Remove all buildings from the graph that have area less than `min_area´.

uesgraphs.examples.e9_generate_ues_from_osm_example.main()[source]

Main function.

uesgraphs.examples.e9_generate_ues_from_osm_example.generate_ues()[source]

Loads an osm file and plots it.

uesgraphs.examples.e9_generate_ues_from_osm_example.remove_small_buildings(input_graph, min_area)[source]

Remove all buildings from the graph that have area less than `min_area´.

Parameters:
  • input_graph (uesgraphs.uesgraph.UESGraph object) – An UESGraph that will be analysed for data

  • min_area (float) – Minimum area for a building to remain in the graph

Returns:

input_graph – An UESGraph that will be analysed for data

Return type:

uesgraphs.uesgraph.UESGraph object

uesgraphs.examples.e9_generate_ues_from_osm_example.add_district_heating_buildings(input_graph, supply_id_osm)[source]

Set the given osm id as supply and remaining buildings as demand.

Parameters:
  • input_graph (uesgraphs.uesgraph.UESGraph object) – An UESGraph that will be analysed for data

  • supply_id_osm – The osm id of the building which is used as the supply node

Return type:

None

uesgraphs.examples.e9_generate_ues_from_osm_example.area_list(input_graph)[source]

List the average area of small, medium and large buildings

Small: < 200 m² Medium: 200 m² < 1000 m² Large: > 1000 m²

Parameters:

input_graph (uesgraphs.uesgraph.UESGraph object) – An UESGraph that will be analysed for data