Skip to content

Tools

The following tools are available for GIS data:

1. Vector

Import Tools

The following tools are available for importing vector data to a feature class.

Import from ASCII file

Category Description
Description This tool imports point features from an ASCII file.
Input items An ASCII file stored on the file system.
Tool properties
Output items A feature class stored in the database.
Technical reference and usage tips The tool reads point data stored in an ASCII file formatted as:
X, Y, attribute_1, attribute_2, …, attribute_n
Xvalue_1, Yvalue_1, value_11, value_12, …, value_1n

Xvalue_m, Yvalue_m, value_m1, value_m2, …, value_mn
Where the first line is the header of the file with the names of the attributes and data starts from the second line.

Further note that: If a line starts with “;” or “#” it shall be ignored X and Y may be located in different columns but are always named X and Y.

Hence, the name is used to locate the columns containing X and Y coordinates Z values can be specified in a column named “Z”
  • The following types of attributes are supported: bool, int, double, string
  • Attribute type is auto-detected by attempting parsing in the order: bool, int, double. The 1st one accepted by the parser is used.
  • If none of the above can be used type “string” is assumed
  • Different rows may contain different attribute types. Hence, the above is done on a row-by-row basis.
  • API reference DHI.Solutions.GISManager.UI.Tools.ASCIIFileImportTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Import from ASCII file’)

    Import from KML file

    Category Description
    Description This tool imports features from a KML file.
    Input items An KML file stored on the file system.
    Tool properties
  • Name of feature class including the group path (see below)
  • Path to KML file on the file system.
  • Output items A feature class stored in the database.
    Technical reference and usage tips The tool imports a standard KML file where a feature class is defined.

    It is not possible to use the tool in cases where features in KML file are loosely defined in a way that attributes are not shared or features are a mix of points and/or lines and/or polygons.
    API reference DHI.Solutions.GISManager.UI.Tools.KMLFileImportTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Import from KML file’)

    Import from RES11 file

    Category Description
    Description This tool imports res11 data.

    It imports the network as GIS data and the time series data as time series associated to the GIS features.

    Res11 files can only be imported if the projection is already defined in the DSS.

    Otherwise, add the projection mapping to ESRIProjections.txt file in the application folder.
    Input items An res11 file stored on the file system.
    Tool properties
  • Name of feature class including the group path (see below)
  • Path to res11 file on the file system.
  • Output items A feature class stored in the database.
    Technical reference and usage tips
    API reference DHI.Solutions.GISManager.UI.Tools.Res11ImportTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Import from Res11 file’)

    Import from shapefile

    Category Description
    Description This tool imports features from a shape file stored on the file system and creates a feature class in the database.
    Input items A shape file stored on the file system.
    Tool properties ./Tools/image3.png
    Feature Class: Holds the group and feature class name as it will appear in the database after import.
    File Path: Holds the file path to the source shape file.
    Coordinate System: If a prj-file is available the coordinate system will be added automatically.

    If a prj-file is not available the user must identify the source file coordinate system on import (from a pull down with a list of coordinate systems known to the MIKE Workbench).
    Output items A feature class stored in the database.
    Technical reference and usage tips As an alternative to specify input data in the property dialogue you may simply press “Run” in the Tool property dialogue.

    This brings up a user interface that supports the data load process.
    API reference DHI.Solutions.GISManager.UI.Tools.ShapeFileImportTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Import from shape file’)

    Geoprocessing

    The following tools are available for processing feature classes.

    Buffer

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Clip feature classes

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Erase feature classes

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Dissolve feature class

    Category Description
    Description Combines multiple polygons with identical attribute values (user selected attribute) into a single feature.
    Input items One feature class of type point, line or polygon.
    Tool properties ./Tools/image4.png
    Attribute : The attribute to be used for dissolving the feature class GIS processor: Defaults settings always apply.
    Output items A feature class holding dissolved features.
    Technical reference and usage tips All features with the same value for the selected “dissolve” attribute will be combined into one feature.
    API reference DHI.Solutions.GISManager.Tools.DissolveTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Dissolve Feature Class’)

    Intersect feature classes

    Category Description
    Description The intersect tool creates a geometric intersection of two input feature classes.

    Only the features, or portions of features, which overlap in all input feature classes will be written to the output feature class.

    Attributes from all input features are mapped to all output features.

    Input items Two feature classes of type polygon.
    Tool properties ./Tools/image6.png
    Name of Intersection feature class: The name of the output feature class (memory object).
    GIS processor: Defaults settings always apply.
    Output items One feature class containing all intersecting features with attributes from all input features.
    Technical Reference and usage tips
    API reference DHI.Solutions.GISManager.Tools.IntersectTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Intersect Feature Classes’)

    Measure

    Category Description
    Description Adds the attributes “area” and “perimeter” to a polygon feature class or attribute “length” to a line feature class
    Input items One feature class of type “polygon” or line
    Tool properties ./Tools/image7.png
    Unit: the unit to be used in calculations.
    Output items A feature class (in memory) with attributes added.
    Technical reference and Usage tips If attributes with names “area”, “perimeter” or “length” are already in the input feature class they will be overwritten.
    API reference DHI.Solutions.GISManager.Tools.MeasureTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Measure’)

    Merge feature classes

    Category Description
    Description The merge tool combines two feature classes into one new feature class.
    All features from both input feature classes are added to the output feature class (including overlapping features).

    Feature geometries are not changed by the merge tool.
    Input items Two feature classes of same type.
    Tool properties ./Tools/image8.png

    Attribute Mapping: Attributes will be kept as in the Master Feature Class.

    Attributes from other feature classes can be mapped to the master feature class attributes as indicated above.

    No selection means “no attribute mapping”.
    Feature Class Name: The name of the output feature class (in memory object).
    Master Feature Class: Attributes from other input feature classes will be mapped to the attributes of the Master Feature Class (hence above the Master attributes are the left ones)
    Output items A feature class (in memory).

    To save use the “To database” tool.
    Usage tips The merge tool combines two feature classes into one new feature class.

    Feature classes to be merged must be of the same type (e.g. type polygon)
    API reference DHI.Solutions.GISManager.Tools.MergeTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew('Merge Feature Classes”)

    Union feature classes

    Category Description
    Description The Union tool creates a geometric intersection of the input feature classes.

    All overlapping and non-overlapping features will be written to the output feature class.
    Input items Two or more feature classes of type polygon
    Tool properties
    Output items One feature class containing the union of input feature classes
    Technical reference and usage tips The tool functioning is illustrated by the graphics below.

    Input contains 3 different feature classes.

    Feature class 1 and feature class 2 both contains attribute “A”.

    Feature class 3 contains attribute B.

    The union tool would create 8 new features holding attributes as outlined in the graphics.
    API reference DHI.Solutions.GISManager.Tools.UnionTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Union Feature Classes’)

    Thiessen polygons

    Category Description
    Description The buffer tool creates a buffer surrounding one or more selected features within the same feature class.
    Input items A feature class with one or more selected features of type point, line or polygon.
    Tool properties ./Tools/image10.png
    Distance: The buffer (distance) to be created around selected feature
    GIS Processor: Default setting is always applicable
    Unit: Applied unit
    Output items A feature class (in memory) containing the buffer delineation
    Technical reference and usage tips Run “To display” to visualize with the source map.

    Use display option “ActiveDataView” to overlay on the active map. Use the “To database” tool to store the feature class in the database.
    API reference DHI.Solutions.GISManager.Tools.BufferTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Buffer’)

    Output Tools

    The following tools are available for exporting data to the file system or for creating different types of outputs.

    Export to KMZ file

    Category Description
    Description This tool exports a feature class to a KML file.
    Input items A selected feature class stored in the database
    Tool properties File system path for KML file storage.
    Output items A KML file saved on the file system.
    Technical reference and usage tips
    API reference DHI.Solutions.GISManager.Tools.KMLFileExportTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Export to KML file’)

    Export to shapefile

    Category Description
    Description This tool exports a feature class to a shape file.
    Input items A selected feature class stored in the database
    Tool properties File system path for shape file storage.
    Output items Shape file saved on the file system.
    Technical reference and usage tips The tool exports to a standard shape file (dbf, prj, shp and shx) as illustrated below.
    API reference DHI.Solutions.GISManager.Tools.ShapeFileExportTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Export to shape file’)

    To attribute table

    Category Description
    Description The “To Table” tool adds the attribute table to a table data view.
    Input items A feature class
    Tool properties The tool has no settings
    Output items A table data view with feature class attribute values
    Technical reference and usage tips
    API reference DHI.Solutions.Generic.UI.Tools.ToTable
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘To table’)

    To database

    Category Description
    Description The “To Database” tool stores an in memory feature class to the database.
    Input items A selected feature class (or selected features in a feature class)
    Tool properties ./Tools/image14.png
    Duplicate Name option: The option in case a feature class with the same name already exists under the same group. Replace the existing feature class, rename the feature class being saved or don't save the feature class.
  • Feature Class Group: The group under which the feature class is saved.
  • Feature Class Name: The name of the feature class to be saved. (Only available if naming option is “By Name”).
  • GIS Data Provider: The GIS data provider to use to save the feature class.
  • Name Postfix: The postfix to add to the name of the feature class when saving. (Only available if naming option is “By Postfix”).
  • Naming Option: The option to define the name of the saved feature class. If Name is selected, the feature class will be saved with the name provided in the Feature Class Name property. Otherwise, if Postfix is selected, the postfix to add to the input feature class name(s) shall be provided.
  • Output items A feature class stored in the database
    Technical reference and usage tips All GIS tools produces memory objects (feature classes stored in memory).

    To store these memory objects in the database the “To Database” tool must be used.

    If query tools have been used to select specific features within a feature class these may be stored in a new feature class using the “To Database” tool.
    API reference DHI.Solutions.GISManager.Tools.ToDatabaseTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘To database’)

    To display

    Category Description
    Description The “To Display” tool adds a feature class to a “New map” or to the “Active map”.
    Input items A feature class to be displayed on the map as a feature layer.
    Tool properties ./Tools/image15.png
    Action:
  • “NewDataView” adds the output feature layer to a new map.
  • “ActiveDataView” adds the output feature layer to the active map.

    Output: Identifies the visualizer. Currently always ThinkGeo, but more visualizers (e.g. ArcMap) may be added in the future.
  • Output items A feature layer added to the Map data view
    Technical reference and usage tips When running GIS processing tools they always run either “to Display” or “to Table”. Note that the current “Action” setting for the “To Display” tool will be used when using “To Display” from other GIS tools.
    API reference DHI.Solutions.GISManager.Tools.ToDisplayTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘To display’)

    Raster Interpolation

    Inverse Distance Weighted interpolation

    Category Description
    Description This tool interpolates point data producing a raster with values given by the specified attribute of the input point feature class.

    The tool uses the Inverse Distance Weighted algorithm which assigns to every grid cell the weighted combination of the in neighboring points.

    The weights are computed using the inverse distance.

    Selection of the points and method the combination of the values is done using modified Shepard method for non-uniform datasets.
    Input items A raster or a feature class.

    One feature class of type point or a selection of point features.
    Tool properties Attribute: The attribute to get values for the points to use in the interpolation Extrapolate values: If true, interpolated values are used even in case where they are bigger than maximum input value or smaller than minimum input value.

    Otherwise maximum and minimum values are used respectively. Raster definition: The output definition of the raster, consisting of:
  • Coordinate System: The output coordinate system (set by the system to the user coordinate system).
  • Height: The number of cells vertically
  • Scale X: The size of the cells in the X-direction
  • Scale Y: The size of the cells in the Y-direction (enter as a negative number)
  • Skew X: The rotation parameter in the X-direction (zero for no rotation)
  • Skew Y: The rotation parameter in the Y-direction (zero for no rotation)
  • Upper Left X: The X-coordinate for the upper left corner of the raster
  • Upper Left Y: The Y-coordinate for the upper left corner of the raster
  • Width: The number of cells horizontally
  • Output items A raster representing the inverse distance weighted interpolated values.
    Technical reference and usage tips For further information on inverse distance weighted interpolation, see http://www.alglib.net/interpolation/inversedistanceweighting.php.
    API reference DHI.Solutions.GISManager.Tools.IDWInterpolationTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Inverse Distance Weighted Interpolation’)

    Kriging interpolation

    Category Description
    Description This tool interpolates point data producing a raster with values given by the specified attribute of the input point feature class using the kriging algorithm which assigns to every grid cell a value calculated using the simple kriging method with specified covariance method.

    The interpolated values are computed using linear regression of input values.
    Input items One feature class of type point or a selection of point features.
    Tool properties Attribute: The attribute to get values for the points to use in the interpolation
    Covariance Type: The covariance type to use to compute covariance of the values in two points using the scaled distance between points.
    Extrapolate values: If true, interpolated values are used even in case where they are bigger than maximum input value or smaller than minimum input value.

    Otherwise maximum and minimum values are used respectively.
    Missing Value: The value to use when the distance to the closest point is bigger than radius.
    Raster Definition: The output definition of the raster.

    See Inverse Distance Weighted Interpolation for more detail on these parameters.
    Raster Processor: The raster processor to use when executing the tool.

    PostGIS Raster Processor is the default processor.

    Other processors can be added and used by the tool.
    Relative Scaling Factor: The scaling factor to normalize point distances (typically 1).
    Output items A raster representing the kriging interpolated values.
    Technical reference and usage tips Simple kriging is used which relies on a covariance function rather than an empirically derived variogram.
    API reference DHI.Solutions.GISManager.Tools.KrigingInterpolationTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Kriging Interpolation’)

    Nearest Neighbour interpolation

    Category Description
    Description This tool interpolates point data producing a raster with values given by the specified attribute of the input feature class using the nearest neighbour algorithm which assigns to every grid cell the value in the closest input point.
    Input items One feature class of type point or a selection of point features.
    Tool properties Attribute: The attribute to get values for the points to use in the interpolation
    Missing Value: The value to use when the distance to the closest point is bigger than radius.
    Radius: The value for the maximum radius to the closest point so it's value is used in the interpolation. -1 means infinite radius.
    Raster Definition: The output definition of the raster. See Inverse Distance Weighted Interpolation for more detail on these parameters.
    Raster Processor: The raster processor to use when executing the tool.

    PostGIS Raster Processor is the default processor.

    Other processors can be added and used by the tool.
    Output items A raster representing the nearest neighbor interpolated values.
    Technical reference and usage tips DK-tree structure of the input points are used to provide best performance.
    API reference DHI.Solutions.GISManager.Tools.NearestNeighbourTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Nearest Neighbour Interpolation’)

    Radial Basis interpolation

    Category Description
    Description This tool interpolates point data producing a raster with values given by the specified attribute of the input point feature class using the radial basis algorithm.

    This assigns to every grid cell a value calculated using a real-valued function whose value depends only on the distance from the origin f(x) = f(||x||) or alternatively on the distance from some other point c, called a center f(x) = f(||x - c||) .

    Any function that satisfies the property is a radial function.

    Radial basis functions are typically used to build up function approximations approximating function y(x) is represented as a sum of N radial basis functions, each associated with a different center xi, and weighted by an appropriate coefficient wi
    Input items One feature class of type point or a selection of point features.
    Tool properties Attribute: the attribute to get values for the points to use in the interpolation
    Extrapolate Value: If true, interpolated values are used even in case where they are bigger than maximum input value or smaller than minimum input value.

    Otherwise maximum and minimum values are used respectively.
    Radial Basis Function: The radial basis function to use to compute approximation functions.
    Raster Definition: The output definition of the raster.

    See Inverse Distance Weighted Interpolation for more detail on these parameters.
    Raster Processor: The raster processor to use when executing the tool.

    PostGIS Raster Processor is the default processor.

    Other processors can be added and used by the tool.
    Output items A raster representing the radial basis interpolated values.
    Technical reference and usage tips
    API reference DHI.Solutions.GISManager.Tools.RadialBasisInterpolationTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Radial Basis Interpolation’)

    Raster Processing

    The following tools are available for raster processing based on vector data.

    Vector to raster

    Category Description
    Description This tool converts a feature class to a raster using attribute values for each of the features in the feature class to fill in the raster.
    Input items One feature class or set of selected features.
    Tool properties Attribute: The attribute to get values to fill in the raster.

    Missing Value: The value to use when data is missing.

    Raster definition: The output definition of the raster, consisting of:
  • Coordinate System: The output coordinate system (set by the system to the user coordinate system).
  • Height: The number of cells vertically
  • Scale X: The size of the cells in the X-direction
  • Scale Y: The size of the cells in the Y-direction (enter as a negative number)
  • Skew X: The rotation parameter in the X-direction (zero for no rotation)
  • Skew Y: the rotation parameter in the Y-direction (zero for no rotation)
  • Upper Left X: The X-coordinate for the upper left corner of the raster
  • Upper Left Y: The Y-coordinate for the upper left corner of the raster
  • Width: The number of cells horizontally
  • Raster processor: The raster processor to use when executing the tool.

    PostGIS Raster Processor is the default processor.

    Other processors can be added and used by the tool.
  • Output items A raster representing values of the attribute for each input feature.
    Technical reference and usage tips None.
    API reference DHI.Solutions.GISManager.Tools.VectorToRasterTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Vector to Raster’)

    Zonal statistics

    Category Description
    Description This tool calculates statistics on raster values for polygons, lines or points.
    Input items One feature class.
    Tool properties ./Tools/image22.png
  • Raster: The path to the raster to get statistics from.
  • Raster Band: The raster band to use to get data from.
  • Raster Data Provider: The raster data provider that the raster belong to.

    The raster is identified by its full path.
  • Raster Processor: The raster processor to use to make the calculations. PostGIS Processor is the default raster processor.
  • Statistics: The list of statistics to be calculated.
  • Output items A feature class with the calculated statistics added as attributes.
    Technical reference and usage tips None.
    API reference DHI.Solutions.GISManager.Tools.RasterProcessing.ZonalStatisticsTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Zonal Statistics’)

    Temporal Tools

    The following tools are available for processing of time varying data.

    Catchment rainfall generation tool

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Temporal disaggregation tool

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Temporal zonal statistics tool

    Category Description
    Description This tool calculates statistics on time varying raster values for polygons, lines or points.

    The output are time series of the selected statistics for each of the features in the feature class.

    The time series can be saved similarly to the “To database” tool or returned as in-memory time series
    Input items One feature class.
    Tool properties ./Tools/image24.png
  • Attribute: The attribute to use to identify the input features when naming the output time series.
  • Raster: The path to the raster to get statistics from.
  • Name Suffix: Adds a suffix to the time series names.
  • Overwrite option: Determines how to handle the output.

    Output time series can be returned as in-memory time series (No Save option) or saved according to one of the options in case a time series with the same name already exists.
  • Save to Database: Indicating whether the output should be saved to the database.
  • Save to group: The group in which to save the output time series.

    The group is identified by its full path.
  • Save with name: If a name has been specified, all input time series shall be given the specified name.

    If more than one input time series have been selected, a number suffix will be added to each time series name.

    If no name has been specified, the input time series shall be saved with their original names (plus suffix, if specified).
  • Unit: This is the unit of the output time series.

    Only allowed units are available in the list.

    The allowed units are defined by the variable type.
  • Variable: This is the variable described by the time series.

    Each variable will have a set of allowed units, and hence changing the variable can potentially change the list of available units.
  • Raster Data Provider: The raster data provider that the raster belong to. The raster is identified by its full path.
  • Raster Processor: The raster processor to use to make the calculations. PostGIS Processor is the default raster processor.
  • Statistics: The list of statistics to be calculated.
  • Output items If “No Save” option is selected, the output are time series of the selected statistics for each of the features in the feature class.

    If a save option is selected, output time series are saved to the database.

    Time series are named according to the statistics method, the value for attribute for each feature and the naming options in the tool properties
    Technical reference and usage tips None.
    API reference DHI.Solutions.GISManager.Tools.Temporal.TemporalZonalStatisticsTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew('Temporal Zonal Statistics Tool')

    Time series step to features tool

    Category Description
    Description This tool copies timeseries values to features in a feature class.
    Input items One feature class for which the attribute table will be edited.
    Tool properties ./Tools/image26.png
    FeatureClass
  • Add Association: Defines whether the timeseries used will be associate to the corresponding feature in the feature class.
  • Target Attribute Name: The attribute to which the timeseries values will written.

    If it does not exist, it will be created. If it exists, values will be overwritten.
  • TS Connection Attribute: The attribute storing the string that will be used to select which timeseries to read the value from.

    This will be used along with the regular expression.

    Timeseries
  • Group Name: The timeseries manager group that contains the timeseries to use to populate the feature class attribute table.
  • Timeseries mask (as Regular expression): Regular expression used to filter timeseries by name.

    If this is left empty, the tool will assume a one to one match between the names written in the attribute table and the timeseries names.
  • Use Timeseries from Feature Association: If set to true, the timeseries associated to each feature will be considered when applying the mask.

    If set to false, a timeseries group will need to be defined.
  • UseLast: If set to True, this will write the last timestep from the selected timeseries to the attribute table.

    If set to False, the timestep to pick will need to be specified.

    If the timestep does not exist, the value will be Null.
  • Timestep: Timestep to read the value from.
  • Output items This tool returns the input edited feature class attribute.
    Technical reference and usage tips This example will consider a feature class showing the forecasted points of a meteorological model, as shown below.

    GIS view

    Attribute table

    Those points correspond to the location of the timeseries below.

    The timeseries Group called “FullTS” stores both the rainfall and temperature from the forecast model.

    In order to indicate the tool that it should use the rainfall timeseries only, a regex mask must be defined.
    The expression (.*) means any number of any character.

    This would correspond to * in SQL. So an expression like this (.*)_rainfall would mean “get any name that has any number of character before _rainfall”.

    Regex expression can be tested online (https://regexr.com).

    In the example below, the names highlighted in blue fulfill the masks defined in Expression and would thus but considered by the tool.

    The tool will then try to match group#1 with a string in the TS Connection Attribute field.

    The tool will first get all the timeseries from Group Name (or the associated ones).

    In the present example, this means _rainfall and _temperature timeseries from /Aladin/FullTS .
    Then it will loop through each of the timeseries and perform a Regex check.

    If successful (i.e. if timeseries ends with _rainfaill), the tool will get theso-called “Group#1” which in our case is everything before “_rainfall”.
    For this Group#1 name, the tool will loop through all the features in the inputfeature class, looking at the value stored in the field pointid (as defined in TS Connection Attribute).
    If a feature is found, the specified timestep will be read from timeseries and written in ts_value (as defined in Target Attribute Name).
    The output will be an update feature class.

    If the AddAssociation was selected, each feature has a new Associated Timeseries.
    API reference DHI.Solutions.GISManager.Tools.Temporal.TimeSeriesStepToFeaturesTool
    Scripting the tool see script

    Time series to temporal raster

    Category Description
    Description This tool creates a temporal raster from a set of timeseries and a point feature class.

    It uses the tool “TimeSeries Step To Feature” and its help should be consulted for more information on the timeseries selection.
    Input items One feature class representing the geographical location of the timeseries.
    Tool properties ./Tools/image33.png
    FeatureClass
    TS Connection Attribute: The attribute storing the string that will be used to select which timeseries to read the value from.

    This will be used along with the regular expression.

    OutputRaster
  • EndTime: The maximum possible end time of the temporal output raster.

    If timeseries do not have timesteps at this particular date/time, no interpolation is carried out and the raster will end at last available timestep (preceeding EndTime).
  • Raster Definition: The definition of the output raster.

    The editable properties corresponds to the raster properties, as defined in World Files.

    This includes the extent, rotation, cell size and origin of the raster to create.

    The extent is by default taken from the feature class extent.

    Scale X and Scale Y correspond to the cell size for a raster that is not rotated.

    The Scale Y is negative because the origin of the raster is the top left corner.

    The read only properties are derived from the editable properties.

  • Raster Group: The Group in which the output raster will be created.
  • Raster Name: The name of the output raster.

    If it already exists it will be overwritten.
  • Start Time: The minimum possible start time of the temporal output raster.

    If timeseries do not have timesteps at this particular date/time, no interpolation is carried out and the raster will start at first available timestep (following StartTime).
  • Timestep (hours): The timestep (in hour) of the output raster.

    This should match the input timeseries timestep.

    The tool looks for a given timestep in each input timeseries.

    If it not found, MissingValue is used.
  • Use autoscale: If auto-scale is true, the tool will automatically adjust the width/height or the scale to keep the overall extent equal to the input extent.

    Changing the width/height will automatically change the scale or vice-versa.

    Timeseries
  • Group Name: The timeseries manager group that contains the timeseriesto use to populate the feature class attribute table.
  • Timeseries mask (asRegular expression): Regular expression used to filter timeseries by name.

    If this is left empty, the tool will assume a one to one match between the nameswritten in the attribute table and the timeseries names.
  • Use Timeseries from Feature Association: If set to true, the timeseries associated to each feature will be considered when applying the mask.

    If set to false, a timeseries group will need to be defined.
  • Output items This tool returns the newly created temporal raster.
    Technical reference and usage tips This example will take the case of a feature class showing the forecasted points of a meteorological model, as shown below.

    GIS view

    Attribute table

    Those points correspond to the location of the timeseries below.

    The timeseries Group called “FullTS” stores both the rainfall and temperaturefrom the forecast model.

    In order to indicate the tool that it should use the rainfall timeseries only, a regex mask must be defined.

    For more information,refer to the documentation of the tool “TimeSeries Step To Feature”.
    The timeseries parameters should include the full path to the folder where the timeseries are stored (because the timeseries are not taken from the list oftimeseries associated to each feature) and the regex expression used to filter relevant timeseries in this group.

    In order to find the timeseries related to each feature in the feature class,the name=ing field is defined.

    Opening the input timeseries, it is apparent that the timestep is 1 hour.

    The time step (hour) parameter is updated accordingly.

    It is required to specify the location of the output raster.

    Everything else can be kept as default in most cases.

    For each timestep, the tool populates the attribute called “ts_values” in feature class with the corresponding timeseries value.

    Then a special interpolation is carried out using the Inverse Distance Weighted Interpolationtool.

    Each output static raster is added as a timestep of the output temporal raster.

    The output of the tool is a temporal raster with the same extent as the input feature class.
    API reference DHI.Solutions.GISManager.Tools.Temporal.TimeSeriesToTemporalRasterTool
    Scripting the tool see script

    2. Raster

    Import Tools

    The following tools are available for importing raster data.

    Import temporal rasters from ASCII files

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Import from ASCII grid file

    Category Description
    Description This tool imports rasters stored in an ASCII formatted grid file (as output by ArcGIS, for example).
    Input items An ASCII grid file stored on the file system.
    Tool properties When running the tool from the Tools Explorer, a user-friendly data view interface will appear to assist in setting the tool properties.

    Coordinate System: The coordinate system of the data to be imported.

    File Path: The path of the file to import.

    Raster: The full path of the raster name to import the data to.
    Output items A raster stored in the database.
    Technical reference and usage tips The tool imports grids stored in what is known as the ArcInfo ASCII Grid format.

    It looks like the following:
    ./Tools/image-1.png
    where
  • ncols and nrows are the numbers of rows and columns, respectively (represented as integers);
  • xllcorner and yllcorner are the western (left) x-coordinate and southern (bottom) y-coordinates, such as easting and northing (represented as real numbers with an optional decimal point)
  • cellsize is the length of one side of a square cell (a real number); and,
  • NODATA_value is the value that is regarded as "missing" or "not applicable"; this line is optional, but highly recommended as some programs expect this line to be declared (a real number). The remainder of the file lists the raster values for each cell, starting at the upper-left corner. These real numbers (with optional decimal point, if needed) and are delimited using a single space character.
  • API reference DHI.Solutions.GISManager.UI.Tools.ASCIIGridImportTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Import from ASCII Grid’)

    Import from DFS2 file

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Import from image file

    Category Description
    Description This tool imports rasters stored in an image file.
    Input items An image file stored on the file system in JPEG, TIFF, BMP, PNG, or EXIF format.
    Tool properties When running the tool from the Tools Explorer, a user-friendly data view interface will appear to assist in setting the tool properties.
  • File Path: The file path of the Image file to import.
  • Raster: The name of the Raster to create to store the imported Image file.
  • Upper Left X: The X coordinate of upper left corner. If “scale image when zooming” is true, this represents the longitude value of the upper left corner in decimal degrees (WGS 84). If scale image when zooming is false, this represents the horizontal offset in pixels from the upper left corner of the map.
  • Upper Left Y: The Y coordinate of upper left corner. If “scale image when zooming” is true, this represents the latitude value of the upper left corner in decimal degrees (WGS 84). If scale image when zooming is false, this represents the vertical offset in pixels from the upper left corner of the map
  • Use scale: A value indicating whether image shall be scaled or not.
  • Output items A raster stored in the database.
    Technical reference and usage tips To import a georeferenced TIFF file, see the Import from TIFF file tool below.
    API reference DHI.Solutions.GISManager.UI.Tools.ImageFileImportTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Import from Image file’)

    Import from IMG file

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Import from NetCDF file

    Category Description
    Description This tool imports a raster from a netCDF file.
    Input items A raster stored in netCDF format.
    Tool properties To see the tool properties, click run. This will show you the interface below, where you can specify the path to the file, coordinate system, and output location.
    Output items This tool does not produce an output, but saves the raster to the specified folder.
    Technical reference and usage tips
    API reference To create an instance of the tool in the scripting environment use tool = app.Tools.CreateNew('Import from NetCDF file').
    Scripting the tool see script

    Import from NetCDF file (Advanced)

    Category Description
    Description This tool imports raster from a NetCDF file.
    Input items A raster group should be added as input or selected in the GIS Explorer.
    Tool properties When running the tool from the Tools Explorer, a user-friendly data view interface will appear to assist in setting the tool properties.
    >
    File Path: The file path of the NetCDF file to import.
    Variable: The name of the variable of the NetCDF file to import.
    Existing Raster Option: The behavior for overwriting when an existing raster is specified. This property is ignored when no raster exists at the specified location.
    - Append - Only adds data from the NetCDF file after existing time steps in the raster.
    - Supersede - Data from the NetCDF file supersedes and replaces existing data at any overlapping time steps and appends new time steps.
    - Replace - A new raster is created overwriting all existing data.
    Raster Group: The full path of the raster group to import the temporal raster(s) to.
    Raster Name: The name of the output raster. If left blank, this will be set to be equal to the variable name plus the NetCDF unit, if available.
    Cell Height: The cell height to apply for the raster. (Defaults to average height between Y points in NetCDF file).
    Cell Width: The cell width to apply for the raster. (Defaults to average width between X points in NetCDF file).
    Coordinate System: The coordinate system of the data to be imported.
    Scale Factor X: The scale factor for the X coordinates. (Coordinates will be multiplied by this factor.)
    Scale Factor Y: The scale factor for the Y coordinates. (Coordinates will be multiplied by this factor.)
    Base Time: The base time for the time dimension. Most time dimensions are of units "XX hours since DDTT" where DDTT is a parsable DateTime. This property allows you to override this base time. It is not necessarily the same as the first time step.
    Start Time: The start time calculated for the current variable's time dimension, the base time, and time offset.
    Time Offset: A time offset in hours used to adjust the time of each time step.
    EUM Item: The MIKE Zero EUM Item (unit type) code.
    EUM Unit: The MIKE Zero EUM Unit code.
    Output items A raster stored in the database.
    Technical reference and usage tips
    API reference DHI.Solutions.GISManager.UI.Tools.NetCDFImportTool.FlexibleNetCDFImportTool
    Scripting the tool

    Import from TIFF file

    Category Description
    Description This tool imports raster from a TIFF file.
    Input items A raster stored in a TIFF file.
    Tool properties When running the tool from the Tools Explorer, a user-friendly data view interface will appear to assist in setting the tool properties.
  • Coordinate System: The coordinate system of the data to be imported.
  • File Path: The file path of the TIFF file to import.
  • Raster: The full path of the raster name to import the data to.
  • World File: File containing information about position, scale and skew of TIFF image.
  • Output items A raster stored in the database.
    Technical reference and usage tips In contrast to the Import from Image file tool, the TIFF image is imported as a Grid type raster rather than an image.

    The tool requires a world file (*.tfw) to be present as well.

    The world file defines the position, scale, and skew (rotation) of the raster.

    More information on world files can be found at http://en.wikipedia.org/wiki/World_file.
    API reference DHI.Solutions.GISManager.UI.Tools.TIFFRasterImportTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Import from TIFF file’)

    Import temporal rasters from TIFF files

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Raster Group

    Raster group tools

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Output Tools

    The following tools are available for creating different types of raster outputs.

    ASCII grid file export tool

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    DFS2 file export tool

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Create GIF from temporal raster

    Category Description
    Description This tool creates a ‘.gif’ file or a series of ‘.png’ files from a temporal raster.
    Input items A raster in the GIS Manager.
    Tool properties ./Tools/image42.png
  • Output Folder: The path of the folder where the file(s) will be saved on the file system.
  • Raster Path: The path of the raster inside the GIS Manager.
  • Tool Mode: Choose between saving the raster image itself and a time stamp label. Further, choose between saving as a ‘.gif’ file and a series of ‘.png’ files.
  • Output items A ‘.gif’ file or a series of ‘.png’ files saved to the file system.
    Technical reference and usage tips The name of the saved file(s) is determined by the choice in Tool Mode.
    API reference DHI.Solutions.GISManager.Tools.TemporalRasterToGifTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Create Gif from Temporal Raster’)

    Raster to database

    Category Description
    Description The “To Database” tool stores an in memory feature class to the database.
    Input items A selected raster or raster layer.
    Tool properties Duplicate Name option: The option in case raster with the same name already exists under the same group. Replace the existing raster, rename the raster being saved or don't save the raster.
  • Naming Option: The option to define the name of the saved raster. If Name is selected, the raster will be saved with the name provided in the Raster Name property. Otherwise, if Postfix is selected, the postfix to add to the input raster name(s) shall be provided.
  • Raster Data Provider: The raster data provider to use to save the raster.
  • Raster Group: The group under which the raster is saved.
  • Raster Name: The name of the raster to be saved. (Only available if naming option is “By Name”).
  • Raster Name Postfix: The postfix to add to the input raster name(s) when saving. (Only available if naming option is “By Postfix”).
  • Output items A raster stored in the database
    Technical reference and usage tips Raster tools produce memory objects (rasters stored in memory).

    To store these memory objects in the database the “To Database” tool must be used.
    API reference DHI.Solutions.GISManager.Tools.RasterToDatabaseTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Raster To Database’)

    Raster to display

    Category Description
    Description The “To Display (Raster)” tool adds a raster to a “New map” or to the “Active map”.
    Input items A raster to be displayed on the map as a raster layer.
    Tool properties Action:
  • NewDataView adds the output raster layer to a new map.
  • ActiveDataView adds the output raster layer to the active map.
  • Output: Identifies the visualizer. Currently always ThinkGeo, but more visualizers (e.g. ArcMap) may be added in the future.
  • Output items A raster layer added to the Map data view
    Technical reference and usage tips When running GIS processing tools they always run either “to Display”.

    Note that the current “Action” setting for the “To Display” tool will be used when using “To Display” from other GIS tools.
    API reference DHI.Solutions.GISManager.UI.Tools.RasterToDisplayTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Raster To Display’)

    Raster Processing

    The following tools are available for processing rasters.

    Flow direction

    Category Description
    Description This tool calculates the flow direction of a raster representing elevation values (DEM) based on the slope of steepest decent from any given cell.
    Input items A digital elevation model (DEM) as a raster or raster layer.
    Tool properties The flow direction tool has no tool properties.
    Output items A raster with values indicating flow direction from each cell.

    Output flow direction values are: 0 = None, 1 = East, 2 = Southest, 4 = South, 8 = Southwest, 16 = West, 32 = Northwest, 64 = North, 128 = Northeast, 256 = Local minimum, -512 = Undefined.
    Technical reference and usage tips Flow direction values are often used as input to other tools, such as catchment delineation. Currently there are no tools that use this tool output directly.

    (The interactive catchment delineation described above calculates the flow direction internally.)
    API reference DHI.Solutions.GISManager.Tools.FlowDirectionTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Flow Direction’)

    Raster project

    Category Description
    Description This tool projects a raster to another coordinate system.
    Input items Raster or raster layers.
    Tool properties
  • Coordinate System : The coordinate system to project to.
  • Interpolation Method: The interpolation method to use. Can be Nearest Neighbor, Bilinear, or Cubic.
  • Raster Processor: The raster processor to use when executing the tool. PostGIS Raster Processor is the default processor. Other processors can be added and used by the tool.
  • Output items A raster projected into the new coordinate system.
    Technical reference and usage tips Since coordinate systems are distorted relative to each other when projected, new cells need to be created, and their values interpolated.

    “Nearest Neighbor” simply selects the nearest value once projected.

    “Bilinear” linearly interpolates between the closest 4 input values in two directions.

    And “Cubic” uses cubic convolution to interpolate between nearby values.
    API reference DHI.Solutions.GISManager.Tools.RasterProjectTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Raster Project’)

    Raster appearance

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Raster calculator

    Category Description
    Description This tool performs raster math on input rasters using syntax commonly found in spreadsheet programs.
    Input items One or more rasters or raster layers.
    Tool properties Formula: The formula to apply to the input rasters. Use syntax normally found in spreadsheets, but instead of cell references, enter raster names as mapped in the Mapping property within square brackets.

    E.g. “[myraster]” The tool can also produce one output for each input in case “[value]” mapping is used, meaning the current raster being iterated.

    Name Mapping: The mapping of raster names used in the formula to the input rasters.

    Do not include brackets. By default the input rasters are mapped to their raster name.
    Output items A raster representing the result of the calculation.
    Technical reference and usage tips The syntax used for the formula is the same as used in the Spreadsheet Manager.

    Formulas can be tested in Spreadsheet Manager and then copied into the tool properties, after replacing cell references with the mapped raster names.
    API reference DHI.Solutions.GISManager.Tools.RasterCalculatorTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Raster Calculator’)

    Raster to vector

    Category Description
    Description This tool creates a feature class with features for each value range specified.

    If value ranges are not specified, it creates features for each unique value in the raster.
    Input items Raster or raster layers.
    Tool properties Raster Band : The band from the input rasters that is to be converted.
    Tolerance: The tolerance in raster coordinate system used for the simplification of geometries.
    Value Ranges: Defines the values ranges to generate features. If not specified, all values are used.
    Output items A feature class holding features derived from the raster values.
    Technical reference and usage tips None.
    API reference DHI.Solutions.GISManager.Tools.RasterToVectorTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Raster to Vector’)

    Reclassification

    Category Description
    Description This tool reclassifies a raster replacing single values or ranges of values with the values to reclassify with.

    All bands in the raster will be reclassified and the output raster(s) will have the same definition as input raster(s).
    Input items A raster or raster layer.
    Tool properties Keep Unmapped Values: If true, unmapped values are kept; otherwise unmapped values are replaced by null.
    Mapping Type: Defines the type of mapping.

    If single value, values are mapped one to one.

    Otherwise, a range of values is mapped to a new value.
    Values Mapping: The mapping of values from the original raster to the reclassified raster.
    Output items A raster with the reclassified values.
    Technical reference and usage tips None.
    API reference DHI.Solutions.GISManager.Tools.RasterReclassificationTool
    Scripting the tool see script

    Raster resample

    Category Description
    Description This tool resamples a raster to a different cell size.
    Input items Any raster or raster layer.
    Tool properties Interpolation Method : The interpolation method to use.

    Raster definition: The output definition of the raster, consisting of:
  • Coordinate System: The output coordinate system (set by the system to the user coordinate system).
  • Height: The number of cells vertically
  • Scale X: The size of the cells in the X-direction
  • Scale Y: The size of the cells in the Y-direction (enter as a negative number)
  • Skew X: the rotation parameter in the X-direction (zero for no rotation)
  • Skew Y: The rotation parameter in the Y-direction (zero for no rotation)
  • Upper Left X: The X-coordinate for the upper left corner of the raster
  • Upper Left Y: The Y-coordinate for the upper left corner of the raster
  • Width: The number of cells horizontally
  • Raster Processor: The raster processor to use when executing the tool.

    PostGIS Raster Processor is the default processor.

    Other processors can be added and used by the tool.
  • Output items A raster with the specified raster definition and resampled values.
    Technical reference and usage tips
    API reference DHI.Solutions.GISManager.Tools.RasterResampleTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Raster Resample’)

    Slope

    Category Description
    Description This tool calculates the slope for a raster in degrees.

    The output raster will have the same definition and as many bands as the corresponding input raster.

    Output data type is always float.
    Input items A digital elevation model (DEM) as a raster or raster layer.
    Tool properties The slope tool has no tool properties.
    Output items A raster showing the average slope within each cell based on elevations of surrounding cells.
    Technical reference and usage tips Given the following representation of a 3x3 neighborhood of pixels:

    A B C
    D E F
    G H I

    The equation for the pixel slope of cell E is: atan(sqrt(((c + 2f + i) - (a + 2d + g) / 8)\^2 + (((g + 2h + i) - (a + 2b + c)) / 8) \^ 2))
    API reference DHI.Solutions.GISManager.Tools.RasterSlopeTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Slope’)

    Slope length

    Category Description
    Description This tool calculates the slope length for each cell in a raster representing elevation values (DEM) by following the slope down from each cell (similar to river tracing) and calculating the change in height and the length when the slope breaks by the SlopeBreak value.
    Input items A digital elevation model (DEM) as a raster or raster layer.
    Tool properties Slope Break: The break in slope in percent that will mark the downstream end of the slope.
    Output items A raster representing the slope length from each cell.
    Technical reference and usage tips None.
    API reference DHI.Solutions.GISManager.Tools.SlopeLengthTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Slope Length’)

    3. Mesh

    The following tools are available for GIS mesh data:

    Import Tools

    The following tool is available for importing mesh data.

    Import from DFSU file

    Category Description
    Description This tool imports unstructured data stored in dfsu format (as output by MIKE 21 FM for example).
    Input items A dfsu file stored on the file system.
    Tool properties When running the tool from the Tools Explorer, a user-friendly data view interface will appear to assist in setting the tool properties.

    For optimal processing of meshes, they are stored in blocks defined by a size space (i.e. number of elements) and time (number of time steps).

    A given block will have a specific timespan, x range and y range for a given item.

    An item will be stored in several blocks of different geographical and temporal extent.

  • Coordinate System: The coordinate system of the data to be imported is picked from the file.
  • File Path: The path of the dfsu file to import.
  • Mesh name: The name of the mesh object to create.
    Depending on the structure of the dfsu file, the tool will propose a way to define the size (in space and time) of the blocks to store in the database.

    In the example above, the blocks will have a maximum of 100 timesteps.

    For a given item and a given geographical extent, the 265 timesteps of the file will thus be stored in 3 different sets of blocks.

    The mesh has 3636 elements that are stored, geographically, in 37 block of up to 100 elements.

    The following parameter can then be refined by experienced users in order to change the temporal and special shape of a block:
  • Space Block Size: Number of elements to store together
  • Time Space Ratio:
  • Time Block Size: The number of timesteps to store together
  • Output items A mesh stored in the database.
    API reference DHI.Solutions.GISManager.UI.Tools.DfsuImportTool
    Scripting the tool see script

    Output Tools

    The following tools are available for visualize and export mesh data.

    To display

    Category Description
    Description The “To Display” tool adds a feature class to a “New map” or to the “Active map”.
    Input items A mesh to be displayed on the map as a feature layer.
    Tool properties ./Tools/image15.png
    Action:
  • “NewDataView” adds the output feature layer to a new map.
  • “ActiveDataView” adds the output feature layer to the active map.

    Output: Identifies the visualizer. Currently always ThinkGeo, but more visualizers (e.g. ArcMap) may be added in the future.
  • Output items A feature layer added to the Map data view
    Technical reference and usage tips When running GIS processing tools they always run either “to Display” or “to Table”.

    Note that the current “Action” setting for the “To Display” tool will be used when using “To Display” from other GIS tools.
    API reference DHI.Solutions.GISManager.Tools.ToDisplayTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘To display’)

    Mesh Processing Tools

    The following tools are available for process mesh data.

    Query feature class

    Category Description
    Description The “Query Feature Class” tool creates a new feature class with attribute(s) storing specific values.

    It can extract a given time step or compute statistics (Minimum, Average, Maximum).
    Input items A mesh object.
    Tool properties When creating a statistics feature class with minimum, average and maximum values for each element, the variable should be set to “Statistics”


    The following parameters should also be filled in:
  • FeatureClass Name: The name of the feature class to create
  • Mesh Item Name: the item to run the statistics on
  • Output: A new feature class with 4 fields (elementid, min, max, avrg)
    ./Tools/image53.png
    ./Tools/image54.png

    When creating a feature class representing a given timesteos, the variable should be set to “Statistics”

    Extra parameters are then enabled:
  • Selection Time: Define whether to select the timestep based on its index or date and time
  • Time: In case the Selection Time is set to “Time”, this parameters is enableand allows the selection of the time step to extract

    The output feature class has one attribute showing the values at that time.
    ./Tools/image56.png
    ./Tools/image57.png
  • Output items A feature class
    API reference DHI.Solutions.GISManager.Tools.MeshProcessing
    Scripting the tool see script

    Query time series

    Category Description
    Description This tool extracts timeseries from a mesh
    Input items A mesh object.
    Tool properties This tool will extract a timeseries given x and y coordinates.


  • Time Series Name: The full path to the time series create
  • Unit: The unit of the new timeseries. By default this is provided by the information from the mesh.
  • Value Type: The type of timestep to create the new timeseries with
  • Variable: The variable of the new timeseries. By default this is provided by the information from the mesh.
  • Mesh item name: The mesh item to extract the timeseries from
  • Selection time: The time span of the new timeseries
  • X Coordinate: The X coordinate of the point to extract from
  • Y Coordinate: The Y coordinate of the point to extract from
    Those coordinates should be in the same projection as the original file.

    Getting the coordinates from the GIS managers
    In case the coordinates to extract are not already known, it is possible to get them from a map in the GIS Manager. To do so, you should first set the default coordinate system to be the one of the mesh object.
    Click on the “Database” node

    In the properties, you can select the coordinate system of the mesh.

    Then you should create a feature class of the mesh using the “To Display” tool

    This will show the mesh in a map. Hovering the mouse over the cell you want to extract a timeseries from, the coordinate (x,y) of the cell are shown at the bottom of the map. These are the values to use in the tool.
  • Output items A timeseries
    API reference DHI.Solutions.GISManager.Tools.MeshProcessing
    Scripting the tool see script

    Soil Erosion Tools

    The following tools are available for calculating soil erosion.

    Soil erosion crop management (C)

    Category Description
    Description Calculates crop management factor (C) for the RUSLE soil erosion equation.
    Input items A raster containing values representing land use (crops) OR a feature class with polygons representing land use (crops).
    Tool properties Crop Type Attribute: The feature class attribute which contains the crop type.

    (Only used when the input is a feature class).

    Mapping: The mapping between the input land use (crop) values and the crop management factor.
    Output items A raster representing the crop management factor (C).
    Technical reference and usage tips This tool works similarly to the raster Reclassification tool.

    The mapped values should be derived from the literature.
    API reference DHI.Solutions.GISManager.Tools.SoilErosionCTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Soil Erosion Crop Management (C)’)

    Soil erosion control (P)

    Category Description
    Description Calculates erosion control factor (P) for the RUSLE soil erosion equation.
    Input items A raster containing values representing erosion control measures OR a feature class with polygons representing erosion control measures.
    Tool properties Control Type Attribute: The feature class attribute which contains the erosion control type. (Only used when the input is a feature class).

    Mapping: The mapping between the input land use (control) values and the erosion control factor.
    Output items A raster representing the erosion control factor (P).
    Technical reference and usage tips This tool works similarly to the raster Reclassification tool.

    The mapped values should be derived from the literature.
    API reference DHI.Solutions.GISManager.Tools.SoilErosionPTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Soil Erosion Erosion Control (P)’)

    Soil erosion mean annual soil loss (A)

    Category Description
    Description Calculates the mean annual soil loss (A) based on the RUSLE soil erosion equation.
    Input items Five rasters representing the RUSLE soil erosion factors:
  • Rainfall erosivity (R)
  • Tool properties The tool properties should be selected from the input rasters.

    Crop Management (C): The raster representing the crop management factor (C) of the RUSLE equation.

    Erosion Control (P): The raster representing the erosion control factor (P) of the RUSLE equation.

    Rainfall Erosivity (R): The raster representing the rainfall erosivity factor (R) of the RUSLE equation.

    Slope Length (LS): The raster representing the slope length factor (LS) of the RUSLE equation.

    Soil Erodibility (K): The raster representing the soil erodibility factor (K) of the RUSLE equation.
  • Soil erodibility (K)
  • Slope length (LS)
  • Crop Management (C)
  • Erosion Control (P)
  • Output items A raster representing the mean annual soil loss.
    Technical reference and usage tips The mean annual soil loss is calculated by multiplying each of the input factors together:
    A = R * K * LS * C * P
    API reference DHI.Solutions.GISManager.Tools.SoilErosionATool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Soil Erosion Mean Annual Soil Loss (A)’)

    Rainfall erosivity (R)

    Category Description
    Description Calculates rainfall erosivity (R) for the RUSLE soil erosion equation.
    Input items Rasters or raster layers representing distributed rainfall data from which to calculate the rainfall erosivity factor.
    Tool properties Formula: The raster calculator formula for calculating rainfall erosivity (R) from the input rainfall intensity and depth rasters.
    Name Mapping: The mapping between the input rasters and the raster names entered in the formula.

    For more information on these parameters, see the Raster Calculator tool.
    Output items A raster representing the rainfall erosivity factor (R).
    Technical reference and usage tips The default formula for rainfall erosivity is as follows, but can be changed by the user as required.

    This equation assumes you have two input grids, “intensity” and “depth”. These need to be mapped in the Name Mapping property to these names.
    =(0.29 * (1 - (0.596*EXP(-0.04*[intensity]))))*[depth]*[intensity]
    API reference DHI.Solutions.GISManager.Tools.SoilErosionRTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Soil Erosion Rainfall Erosivity (R)’)

    Soil erosion slope length (LS)

    Category Description
    Description Calculates slope length (LS) for the RUSLE soil erosion equation.
    Input items A raster or raster layer representing a DEM (digital elevation model).
    Tool properties The slope length tool has no tool properties.
    Output items A raster representing the slope length factor (LS).
    Technical reference and usage tips The tool uses the Slope and SlopeLength tools of the GIS Manager, described in the section on raster geoprocessing tools.

    From this the slope length is calculated as follows:
    LS[^1] = (x / 22.13)n (0.065 + 0.045 s + 0.0065 s\^2)

    where:
  • x = slope length (m)
  • s = slope gradient (%)
  • n = 0.5 for a slope > 5%, 0.4 for slope between 3.5 - 4.5%, 0.3 for a slope l - 3.5%,and 0.2 for a slope less than 1%.

    This translates into the following spreadsheet formula which is called using the Raster Calculator Tool:

    =POWER([length] / 22.13,![n]) * (0.065 + 0.045 *![slope] + 0.0065 *![slope]*![slope])

    This formula is applied 4 times for each possible value of n and then merged by adding (again using the Raster Calculator).
  • API reference DHI.Solutions.GISManager.Tools.SoilErosionLSTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Soil Erosion Slope Length (LS)’)

    [^1]: This method is from Wischmeier & Smith, 1978

    Soil erosion soil erodibility (K)

    Category Description
    Description Calculates soil erodibility (K) for the RUSLE soil erosion equation.
    Input items A raster containing values representing the soil type OR a feature class with polygons representing the soil types.
    Tool properties Mapping: The mapping between the input soil type values and the soil erodibility factor.
    Soil Type Attribute: The feature class attribute which contains the soil type.

    (Only used when the input is a feature class).
    Output items A raster representing the soil erodibility factor (K).
    Technical reference and usage tips This tool works similarly to the raster Reclassification tool.

    The mapped values should be derived from the literature.
    API reference DHI.Solutions.GISManager.Tools.SoilErosionKTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Soil Erosion Soil Erodibility (K)’)

    4. Other

    Data tools

    Feature class query

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Raster query

    Category Description
    Description
    Input items
    Tool properties
    Output items
    Technical reference and usage tips
    API reference
    Scripting the tool

    Interpolation

    The following tools are available both for rasters and feature classes.

    Flood map interpolation tool

    Category Description
    Description The flood map interpolation tool will generate a new flood map from a library of pre-cooked flood maps and a set of gauge timeseries.

    For each gauge, the tool will:
  • Get the time series
  • Optionally run the script for it if specified.
  • Resample it
  • For each timestep it will interpolate the point flood maps from the library based on the water level. Find two flood maps with levels at the gauge above and below and create a new set of values with all pixels linearly interpolated with respect to the value at the gauge.

    This will result in a raster with a band for each output time step and a dictionary of interpolated values from the flood map library for each pixel for each of these timesteps.

    Finally, the tool will perform inverse distance interpolation using all the pixel values as points in each timestep to generate an interpolated flood map for each timestep.
  • Input items A raster or a point feature class with gauges.
    Tool properties ./Tools/image16.png
    DEM: Optional DEM raster used as basis for the flooding. If not specified, the output with be the same size as the floodmap of the first gauge.
  • Flood Map Libraries: Defines the raster for each gauge.
    A flood map must exist for each gauge.
    Each gauge raster is a multiband raster where bands represent different water levels at the gauge. Band at index 0 represents lowest water level.
    There should be at least two bands representing lowest and highest level at the point.
  • Gauge Locations: Selects what gauges to use.
  • Gauge Readings: Time series of water level at the selected gauges. This is specified manually instead of using associated time series
  • Period: A time period and the output interval (number of years/months/days/hours/minutes/seconds). Note that all time series should cover the period to allow resampling.
  • Script: Optional script used for interpolating water levels. The script MUST have 3 parameters:
  • Dictionary\ attribDic \~ a dictionary of the attributes the gauge feature class (attribute name, attribute)
  • Dictionary\ inputParamDic \~ a dictionary of input parameters, “Time Period”, “Frequency”, “Flood Map Library” (for the gauge), and “DEM”
  • InputTS – the time series of the gauge The script may modify or create the gauge level time series from information in the flood map libraries.
  • Output items A raster representing the flood interpolation.
    Technical reference and usage tips
    API reference DHI.Solutions.GISManager.Tools.FloodMapInterpolationTool
    Scripting the tool To create an instance of the tool in the scripting environment use
    tool = app.Tools.CreateNew(‘Flood Map InterpolationTool’)