Import GIS vector data
GIS data can be imported to a schematisation using the Rana Schematisation Editor’s vector data importer.
Note
Currently, this is supported for:
Cross section data
A generic importer is available to import any schematisation object, but this does not support extensive integration in the schematisation such as linking to connection nodes and integration in existing channels and pipes.
How to use the vector data importer
Use the following steps:
Add the vector data you want to import to your project.
Load the schematisation you want to import the data to using the Rana Schematisation Editor toolbar.
If you have loaded multiple schematisations, choose the correct schematisation in the Rana Schematisation Editor toolbar dropdown menu.
In the Rana Schematisation Editor toolbar, click the vector data importer button
and choose the layer you want to import data into.Follow the wizard that appears. The options are explained below.
Source layer page
The first wizard page is used to select the source layer and features to import.
- Select layer to import:
Choose the layer from which you want to import features.
Selected features only: Check this box if you only want to import the selected features.
Select features with expression: Add an expression to select features to import; all features will be used if this is left empty.
Load import configuration from template: Load previously saved import settings from a template (JSON file).
Import settings
The second wizard page is used to specify how the source data should be interpreted and written to the target schematisation. This page contains several sections that are used for one or more importers.
Importer |
Sections |
|---|---|
Culvert, Orifice, Weir |
Connection node settings; Point to line conversion settings; Integration settings |
Channel, Pipe |
|
Connection nodes |
NA |
Cross section data |
|
Cross section location |
|
Pump |
Pump linking settings; Connection node settings; Point to line conversion settings; Integration settings |
Surfaces |
Connection node settings
Create new connection nodes if needed: Check this box if you want to create connection nodes at the start and end of the schematisation object.
Snap to existing connection nodes within: Check this box to snap the start and end of the schematisation object to existing connection nodes within the specified distance.
Point to line conversion setting
When sources are point geometries they need to be converted to line geometries.
Structure length: length of the create line
Structure direction (azimuth): direction of the created line in degrees
Integration settings
Structures can be integrated in existing channels or pipes.
Edit: choose conduit to integrate the structure in.
Snap to channel/pipe within: set distance to snap the structure to the conduit.
Minimum length of a channel/pipe after edit: set minimum length of the conduit after integration. The integrator will try to shift structures to ensure this minimum length is met. If this is not possible, the integration will fail.
Align cross section table to reference level
Set lowest point to zero: check this box to set the lowest value of the cross section table to zero and normalize the other values accordingly.
Use lowest point as reference level: check this box to set the lowest value of the cross section table to zero and normalize the other values accordingly.
Join to channel by attribute
Cross section locations can be linked to a channel based on field in the source layer that matches to field in the channel layer:
Reference field in channel layer: specifies how the channel field in the target schematisation should be mapped
Join field in source layer: specifies how the source layer field should be mapped
Snap to geometry object within: set this to > 0 to use as a fallback or alternative for attribute based matching
Surface settings
Surfaces can be supplied in two input formats:
One sewerage type per row: each row in the source layer contains a single sewerage type. Optionally there is a column with the sewerage type. When this is not supplied surfaces can be matched to any pipe independent of the sewerage type.
Multiple sewerage types per row: each row contains multiple columns that define the percentage for each sewerage type. The user much map each column to the corresponding sewerage type.
Surfaces can be linked to pipes based on field in the source layer that matches to field in the pipe layer or connection node, and/or based on finding the nearest connection node linked to a valid pipe. When liking to a pipe or connection node based on attributes, choose that option and select a column from the source layer. Then choose the column in the pipe or connection node table to match to.
Use spatial matching with search distance: check this box to use spatial matching as a fallback or alternative for attribute based matching. The search distance is used to find the nearest connection node linked to a valid pipe.
Only match selected pipes: check this box to only match to pipes that are selected in the pipe layer.
Pump to Connection Node linking settings
When this option is enabled, pumps and pump maps be linked to connections nodes based on field in the source layer that matches to field in the connection node layer. If no match can be found the connection node settings are used as a fallback.
Mapping source data to target schematisation attributes
The importer specific settings are followed by one or more pages where source attributes are mapped to target schematisation attributes.
Field name: Name of the target field.
Method: Method with which the target field should be filled. Choose from the following options.
Auto: for ID, auto-increment from the current highest value.
Attribute: read the value from the specified attribute of the source feature. This can be a direct copy, or a value map (see below). If the source feature’s attribute value is NULL, the Default value will be used (if specified).
Default: use the specified Default value.
Ignore: leave this attribute empty (NULL) in the target feature.
Expression: use an expression to calculate the attribute value in the target feature
Source attribute: the attribute in the source feature to be used when the chosen method is Attribute
Value map (optional): when using the method Attribute here you can specify how to translate the values encountered in the source layer (e.g. “Manning”) to values in the target layer (e.g. 2).
Default value: value to be used as fallback value when using the method Attribute or as value for all target features when using the method Default
Expression: expression to be used when using the method Expression. This expression will be evaluated for each source feature and the result written to the target feature attribute.
Processing algorithm
The vector data importer is also available as a set of Processing Algorithms in the Rana Processing Algorithms, in the category Rana Schematisation Editor.
The processing algorithms work in the same way as when using the graphical user interface explained above, but most of the options are read from the configuration file (JSON) that is supplied.
Source layer: Choose the layer from which you want to import features.
Import configuration file: Choose the JSON file that contains the import settings you want to use. The easiest way to create this JSON file is by using the Save as template option in the graphical user interface.
Target schematisation database: Choose the schematisation database file (*.gpkg).
Configuration file (JSON)
This file contains all the settings that determine how the source data is read and interpreted and written to the target geopackage. The easiest way to create such a file and how to use the specific options is by using the Save as template option in the graphical user interface.