0 Votes

Import

Last modified by Christoph Stettler on 2026/08/20 09:09

1777906016506-626.png

The Import tab is used to bring external geodata and time-dependent data into the active Districts project. It provides import tools for OpenStreetMap data, PRN data, elevation data and line or point features from existing QGIS layers or external geodata files.

Use this tab when you want to create or enrich a Districts model from existing spatial data, such as streets, buildings, network lines, customer locations, energy plant locations, terrain elevation or measurement and simulation result files.

OpenStreetMap

The OpenStreetMap section is used to import streets and buildings from OpenStreetMap data.

Import streets
Imports street geometries from OpenStreetMap data. Streets can be used as spatial reference data when preparing a district energy model, for example when planning network routes or checking the location of existing infrastructure.

Import buildings
Imports building geometries from OpenStreetMap data. Buildings can be used as context information or as a basis for later modelling steps, depending on the available data and the project workflow.

PRN data

The PRN data section is used to import temporal data into QGIS layers. This type of data can be used for values that vary over time, such as measurements, calculated profiles or simulation-related result data.

Use this function when you want to add time-dependent information to model elements or make time-series data available for further analysis and visualization.

Elevation data

The Elevation data section is used to import terrain elevation data. Elevation data can be relevant for network modelling because pipe routes, pressure conditions and spatial analysis may depend on terrain height.

Use this function when elevation information is available and should be added to the project before further preprocessing or simulation preparation.

SHP / GeoPackage data

The SHP / GeoPackage data section is used to import line and point features from existing QGIS vector layers. These imported features can be mapped to Districts model objects such as lines, customers or energy plants.

Two main functions in this section:

Import network topology from layer
Imports line features as network topology. This function is used when an existing line layer should be converted into Districts network lines. The import dialog lets you select a line layer, choose whether the imported data should extend the existing topology or replace it and map fields from the source layer to the target Districts line fields.

Import feature points
Imports point features as either customers or energy plants. The import dialog lets you select a point layer, choose whether the points represent energy plants or customers, decide whether to extend or replace the existing layer, and map fields from the source layer to the corresponding Districts feature fields.

Field mapping

When importing line or point features, the import dialogs provide a field mapping workflow. The source layer fields are shown on one side and the target Districts fields are shown on the other side. The selected mappings are displayed in a table with expressions and target fields.

This mapping step is important because external data often uses different field names or structures than the Districts model. By mapping fields explicitly, you define which values from the source layer should be written into the corresponding Districts attributes.

The Plugin source code shows that the import dialogs use layer fields, target feature fields, expressions and a mapping table to connect source attributes to Districts attributes.

Extend or replace existing data

Some import dialogs allow you to choose whether imported data should be added to the existing data or whether existing data should be replaced.

Extend existing data
Adds the imported features to the current model data.

Replace or truncate existing data
Removes existing features of the selected type before importing the new data.

Use the replace option carefully. It should only be used when the existing data is no longer needed or when the imported dataset is intended to become the new complete dataset.

The Plugin source code includes options such as extend_topology, truncate_existing_topology, extend_layer, and truncate_existing_layer.

Notes

Before importing data, make sure that the coordinate reference system of the project and the source data is correct. Incorrect coordinate systems can cause imported features to appear in the wrong location.

Use clear and consistent field names in source layers whenever possible. This makes the field mapping process easier and reduces the risk of missing or incorrectly assigned attributes.

For important datasets, keep a backup of the original file and consider creating a new project version before importing or replacing existing data.