Skip to content

GIS Manager Tools

Properties of a tool (if any) can be specified in the Properties window in MIKE WORKBENCH.

ASCII Grid File Export Tool

The ASCII Grid File Export Tool exports an input raster to an ESRI ASCII file with a associated .prj file containing projection information.

Tool Info ASCII Grid File Export Tool
Tools Explorer /Output Tools/ASCII Grid File Export Tool
NuGet Package DHI.MikeOperations.GISManager.Tools.ASCIIGridFileExport
API Reference DHI.Solutions.GISManager.Tools.ASCIIGridFileExportTool.IASCIIGridFileExportTool
Input Items A single raster
Output Items No output items

Tool Properties

Display Name Name Description
Raster Band RasterBand Gets or sets the index of the Rater band to be exported. In case of temporal raster it is time step.
ASCII Grid file path FilePath Gets or sets the path of the file where the file be saved on the file system.
Export Metadata ExportMetadata Gets or sets a value indicating whether the metadata of the entity should be exported.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("ASCII Grid File Export Tool") as DHI.Solutions.GISManager.Tools.ASCIIGridFileExportTool.ASCIIGridFileExportTool;

// Set the tool properties and execute.
var gisModule = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var raster = gisModule.RasterList.Fetch("/group/raster");
tool.InputItems.Add(raster);
tool.FilePath = @"c:\temp\export_grid.asc";
tool.Execute();

Buffer

Calculates a polygon representing the buffer around the input geometry(ies) at the given distance, inclusive of the input geometry(ies) area. The output will be a feature class with a single polygon feature.

Tool Info Buffer
Tools Explorer /Geo Processing/Buffer
NuGet Package DHI.MikeOperations.GISManager.Tools.GeoProcessing
API Reference DHI.Solutions.GISManager.Tools.GeoProcessing.IBufferTool
Input Items A single features or a single feature class
Output Items A feature class

Tool Properties

Display Name Name Description
GIS Processor GISProcessor Gets or sets the GIS processor to use when executing the tool
Distance Distance Gets or sets the distance from the geometry where the buffer will be calculated
Unit Unit Gets or sets the unit for the distance

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Buffer") as DHI.Solutions.GISManager.Tools.GeoProcessing.BufferTool;

// Create a features object containing features.
var gisModule = application.Modules.Get(typeof(DHI.Solutions.GISManager.Interfaces.IGISModule)) as DHI.Solutions.GISManager.Interfaces.IGISModule;
var featureClass = gisModule.FeatureClassList.Fetch("/Sava/Reservoirs");
var featureList = featureClass.FetchAll();
var features = new DHI.Solutions.GISManager.Business.Features();
features.Add(featureList);

// Add input, set properties and execute the tool.
tool.InputItems.Add(features);
tool.Distance = 1;
tool.Unit = DHI.Solutions.GISManager.Interfaces.DisplayUnit.Kilometer;
tool.Execute();

// Get the output of the tool.
var outputFeatureClass = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IFeatureClass;

Catchment Rainfall Generation Tool

The Catchment Rainfall Generation tool, combines the two tools “Time Series to Temporal Raster” and “Temporal Zonal Statistics Tool” into one tool calling the two tools in sequence to calculate feature statistics.

  • Creates a new raster based on time series associated to point features in a feature class using the “Time Series to Temporal Raster” tool.
  • Based on the created raster, calculate statistics for every feature(polygon, lines or points) in a feature class using the “Temporal Zonal statistics” tool.

Note that the “Catchment Rainfall Generation Tool” uses the same feature class as input for both tools, hence only point feature classes are supported. Refer to the “Time Series to Temporal Raster” tool and the “Temporal Zonal statistics” tool for more information.

Tool Info Catchment Rainfall Generation Tool
Tools Explorer /Temporal Tools/Catchment Rainfall Generation Tool
NuGet Package DHI.MikeOperations.GISManager.Tools.TemporalRaster
API Reference DHI.Solutions.GISManager.Tools.Temporal.ICatchmentRainfallGenerationTool
Input Items A single feature class
Output Items No output items

Tool Properties

Display Name Name Description
Timeseries mask (as Regular expression) TSNamePattern Gets or sets a 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.
Group Name TSGroupName Gets or sets the time series group name.
Use Timeseries from Feature Association UseAssociation Gets or sets a value indicating whether the last timestep from the selected timeseries are written 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.
TS Connection Attribute TsNameFeatureAttributeName Gets or sets the value of TS name feature attribute
Start Time StartTime Gets or sets 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).
End Time EndTime Gets or sets the end 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 (preceding EndTime).
Time Step TimeStep Gets or sets the timestep 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.
Raster Definition RasterDefinition Gets or sets the definition of the output raster. The editable properties correspond 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.
Use autoscale AutoScale Gets or sets a value indicating whether 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.
Raster Name RasterName Gets or sets the name of the output raster. If it already exists, it will be overwritten.
Value type TimeSeriesValueType Gets or sets the value of time series value type.
Variable TimeSeriesVariable Gets or sets 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.
Unit TimeseriesUnit Gets or sets the unit of the output time series. Only allowed units are available in the list. The allowed units are defined by the variable type.
Catchments Feature Class Name CatchmentsFeatureClassName Gets or sets the full path to the feature class obtaining catchment polygons.
Catchment TS Attribute Name CatchmentTSAttributeName Gets or sets the attribute name of the catchment feature to be used for naming of result time series names.
Save to group RasterGroup Gets or sets the value of raster group
Save to group OutputTSGroup Gets or sets the group in which to save the timeseries (in format: /Group1/Group2). If this field is left empty, series will be saved in the root.
Name suffix NameSuffix Gets or sets the suffix added to all time series names. If left empty, no suffix will be added.
Statistics SelectedStatistic Gets or sets the statistics to be used in Zonal Statistic computation.
Associate Rainall TS To Catchments AssociateTsToFeatures Gets or sets a value indicating whether output rainfall should be associated to features in the input feature class.
Interpolation Method InterpolationMethod Gets or sets the value of the interpolation method
Add Input TS Association AddAssociation Gets or sets a value indicating whether an association should be added.
Time Step Unit TimeStepUnit Gets or sets the time step unit (second, minute, day ...)

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Catchment Rainfall Generation Tool") as DHI.Solutions.GISManager.Tools.Temporal.CatchmentRainfallGenerationTool;

// Set the tool properties and execute.
var gisModule = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var featureClass = gisModule.FeatureClassList.Fetch("/TemporalTest");
tool.InputItems.Add(featureClass);
tool.AddAssociation = false;
tool.UseAssociation = false;
tool.TSNamePattern = @"([\w\s\d\.]*)_rainfall";
tool.TsNameFeatureAttributeName = "tsname";
tool.TimeStep = 1;
tool.AutoScale = true;
tool.RasterName = "outputraster";
tool.RasterGroup = "/temprasters";
tool.TSGroupName = "/tsdata";
tool.RasterDefinition.Height = 100;
tool.StartTime = new DateTime(1961, 8, 24, 0, 0, 0);
tool.EndTime = new DateTime(1961, 8, 24, 8, 0, 0);
tool.CatchmentsFeatureClassName = "/TemporalCatchment";
tool.CatchmentTSAttributeName = "catchname";
tool.TimeseriesUnit = "mm";
tool.TimeSeriesValueType = DHI.Solutions.Generic.DataSeriesValueType.Step_Accumulated;
tool.TimeSeriesVariable = "Rainfall";
tool.OutputTSGroup = "/catchTS";
tool.NameSuffix = "_catch";
tool.Execute();

// Get the output of the tool.

Clip Feature Classes

A tool for clipping a feature class to the features of another.

Tool Info Clip Feature Classes
Tools Explorer /Geo Processing/Clip Feature Classes
NuGet Package DHI.MikeOperations.GISManager.Tools.GeoProcessing
API Reference DHI.Solutions.GISManager.Tools.GeoProcessing.IClipTool
Input Items Two feature classes
Output Items A feature class

Tool Properties

Display Name Name Description
GIS Processor GISProcessor Gets or sets the GIS processor to use when executing the tool
Feature Class Name ClippedFeatureClassName Gets or sets name of the new clipped feature class
Clipping Feature Class FeatureClassToClipTo Gets or sets the feature class to clip to. This feature class shall be of polygon type.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Clip Feature Classes") as DHI.Solutions.GISManager.Tools.GeoProcessing.ClipTool;

// Set the tool properties and execute.
var gisModule = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var cities = gisModule.DefaultGISDataProvider.FeatureClassList.Fetch("/Cities");
var polygon = gisModule.DefaultGISDataProvider.FeatureClassList.Fetch("/1Polygon");
tool.InputItems.Add(cities);
tool.InputItems.Add(polygon);
tool.FeatureClassToClipTo = polygon;
tool.ClippedFeatureClassName = "ClippedCities";
tool.Execute();

// Get the output of the tool.
var output = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IFeatureClass;

Create Gif from Temporal Raster

This tool creates a ".gif" file or a series of ".png" files from a temporal raster. The tool is designed to be called from code, and not executed from the Platform Shell. This is because the tool output items are comprised of two .NET image objects, and a .Net class containing geographic extent information.

Tool Info Create Gif from Temporal Raster
Tools Explorer /Output Tools/Create Gif from Temporal Raster
NuGet Package DHI.MikeOperations.GISManager.Tools.GifFileExport
API Reference DHI.Solutions.GISManager.Tools.TemporalRasterToGifTool.ITemporalRasterToGifTool
Input Items A single raster
Output Items No output items

Tool Properties

Display Name Name Description
Output Folder OutputFolder Gets or sets the path of the folder where the file(s) will be saved on the file system.
Raster Path RasterPath Gets or sets the path of the raster inside the GIS Manager.
Tool Mode ToolMode Gets or sets the 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.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Create Gif from Temporal Raster") as DHI.Solutions.GISManager.Tools.TemporalRasterToGifTool.TemporalRasterToGifTool;

// Set the tool properties and execute.
var module = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var raster = module.RasterList.Fetch("/Aladin_4km");
tool.InputItems.Add(raster);
tool.OutputFolder = @"c:\temp";
tool.RasterPath = "/Aladin_4km";
tool.ToolMode = DHI.Solutions.GISManager.Tools.TemporalRasterToGifTool.ToolMode.RasterGif;
tool.Execute();

DFS2 File Export Tool

This tool creates DFS2 file from a temporal raster. Item EUM and Unit EUM are in database, DFS2 file and in scripts are saved as integer enumeration. Available codes can be found in EUM.ubg. If Item EUM is empty Item and units are written as Unknown type in DFS2. If Start Time is empty all time steps are exported.

Tool Info DFS2 File Export Tool
Tools Explorer /Output Tools/DFS2 File Export Tool
NuGet Package DHI.MikeOperations.GISManager.Tools.Dfs2TemporalRasterFileExport
API Reference DHI.Solutions.GISManager.Tools.DFS2TemporalRasterFileExportTool.IDFS2TemporalRasterFileExportTool
Input Items A single raster
Output Items No output items

Tool Properties

Display Name Name Description
DFS2 file path FilePath Gets or sets the path of the file where the file be saved on the file system.
Export Metadata ExportMetadata Gets or sets a value indicating whether the metadata of the entity should be exported.
Start Time Start_Time Gets or sets the start time of time steps of the temporal raster to be exported. If the start time is not set, all time steps are exported.
Item EUM Enum_Item Gets or sets the MIKE Zero item code to be used in DFS2 file. Combo is filled by the available MIKE Zero item types. Preselected if the raster definition contains this info.
Unit EUM Enum_Unit Gets or sets the MIKE Zero unit code to be used in DFS2 file. Combo is filled by the available MIKE Zero item types. Preselected if the raster definition contains this info.
Coordinate system as string CoordinateSystemAsString Gets or sets the coordinate system as string. By default, the source coordinate system of the input raster is used.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("DFS2 File Export Tool") as DHI.Solutions.GISManager.Tools.DFS2TemporalRasterFileExportTool.DFS2TemporalRasterFileExportTool;

// Set the tool properties and execute.
var module = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var raster = module.RasterList.Fetch("/Aladin_4km");
tool.InputItems.Add(raster);
tool.FilePath = @"c:\temp\aladin.dfs2";
tool.Execute();

Dissolve Feature Class

The Dissolve tool combines multiple polygons with identical attribute values (user selected attribute) into a single feature.

Tool Info Dissolve Feature Class
Tools Explorer /Geo Processing/Dissolve Feature Class
NuGet Package DHI.MikeOperations.GISManager.Tools.GeoProcessing
API Reference DHI.Solutions.GISManager.Tools.GeoProcessing.IDissolveTool
Input Items A single feature class
Output Items A feature class

Tool Properties

Display Name Name Description
GIS Processor GISProcessor Gets or sets the GIS processor to use when executing the tool
Attribute Attribute Gets or sets the attribute to dissolve on.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Dissolve Feature Class") as DHI.Solutions.GISManager.Tools.GeoProcessing.DissolveTool;

// Set the tool properties and execute.
tool.InputItems.Add(featureClass);
tool.Attribute = "Attrib1";
tool.Execute();

// Get the output of the tool.
var outputFeatureClass = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IFeatureClass;

Erase Feature Classes

A tool for erasing a feature class to the features of another.

Tool Info Erase Feature Classes
Tools Explorer /Geo Processing/Erase Feature Classes
NuGet Package DHI.MikeOperations.GISManager.Tools.GeoProcessing
API Reference DHI.Solutions.GISManager.Tools.GeoProcessing.IEraseTool
Input Items Two feature classes
Output Items A feature class

Tool Properties

Display Name Name Description
GIS Processor GISProcessor Gets or sets the GIS processor to use when executing the tool
Feature Class Name ErasedFeatureClassName Gets or sets name of the new erased feature class
Erasing Feature Class FeatureClassToErase Gets or sets the feature class to erase from the other. This feature class shall be of polygon type.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Erase Feature Classes") as DHI.Solutions.GISManager.Tools.GeoProcessing.EraseTool;

// Set the tool properties and execute.
var cities = _gisModule.DefaultGISDataProvider.FeatureClassList.Fetch("/Cities");
var polygon = _gisModule.DefaultGISDataProvider.FeatureClassList.Fetch("/1Polygon");
tool.InputItems.Add(cities);
tool.InputItems.Add(polygon);
tool.FeatureClassToErase = polygon;
tool.ErasedFeatureClassName = "ErasedCities";
tool.Execute();

// Get the output of the tool.
var outputFeatureClass = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IFeatureClass;

Export to KMZ/KML file

Tool for exporting a feature class to a KML file or a zipped KMZ file.

Tool Info Export to KMZ/KML file
Tools Explorer /Output Tools/Export to KMZ/KML file
NuGet Package DHI.MikeOperations.GISManager.Tools.KmlFileExport
API Reference DHI.Solutions.GISManager.Tools.KMLFileExportTool.IKMLFileExportTool
Input Items A single feature class
Output Items No output items

Tool Properties

Display Name Name Description
File path FilePath Gets or sets file path of exported file. Specifying file extension .kmz, will zip the KML file generated.
Export Metadata ExportMetadata Gets or sets a value indicating whether the metadata of the entity should be exported.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Export to KMZ/KML file") as DHI.Solutions.GISManager.Tools.KMLFileExportTool.KMLFileExportTool;

// Set the tool properties and execute.
var module = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var featureClass = module.FeatureClassList.Fetch("/Sava/Lakes");
tool.InputItems.Add(featureClass);
tool.FilePath = @"c:\temp\lakes.kml";
tool.Execute();

Export to shape file

Tool for exporting a feature class into a shape file.

Tool Info Export to shape file
Tools Explorer /Output Tools/Export to shape file
NuGet Package DHI.MikeOperations.GISManager.Tools.ShapeFileExport
API Reference DHI.Solutions.GISManager.Tools.ShapeFileExportTool.IShapeFileExportTool
Input Items A single feature class
Output Items No output items

Tool Properties

Display Name Name Description
Shape file path FilePath Gets or sets file path of exported file.
Export Metadata ExportMetadata Gets or sets a value indicating whether the metadata of the feature class should be exported.
CoordinateSystem Gets or sets the coordinate system of the shape file to export. By default, the source coordinate system if the input feature class will be used.
Coordinate System CoordinateSystemName Gets or sets the coordinate system name.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Export to shape file") as DHI.Solutions.GISManager.Tools.ShapeFileExportTool.ShapeFileExportTool;

// Set the tool properties and execute.
var module = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var featureClass = module.FeatureClassList.Fetch("/Sava/Lakes");
tool.InputItems.Add(featureClass);
tool.FilePath = @"c:\temp\lakes.shp";
tool.Execute();

Feature Class query

This tool queries for feature classes by name and group.

Tool Info Feature Class query
Tools Explorer /Data tools/Feature Class query
NuGet Package DHI.MikeOperations.GISManager.Tools.FeatureClassQuery
API Reference DHI.Solutions.GISManager.Tools.FeatureClassQueryTool.IFeatureClassQueryTool
Input Items No input items required
Output Items No output items

Tool Properties

Display Name Name Description
Name FeatureClassName Gets or sets the feature class name (or name pattern) to search for.
Within Group WithinGroup Gets or sets name name of the group name (or name pattern) that the feature class should be in.
Metadata Metadata Gets or sets the metadata to search for.
HasMetadataModule Gets a value indicating whether the Metadata Manager module is present.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Feature Class query") as DHI.Solutions.GISManager.Tools.FeatureClassQueryTool.IFeatureClassQueryTool;
# Get the tool.
tool = app.Tools.CreateNew("Feature Class query")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.FeatureClassQueryTool.IFeatureClassQueryTool(app.Tools.CreateNew("Feature Class query"))

Flood Map InterpolationTool

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.

Tool Info Flood Map InterpolationTool
Tools Explorer /Raster Interpolation/Flood Map InterpolationTool
NuGet Package DHI.MikeOperations.GISManager.Tools.FloodMapInterpolation
API Reference DHI.Solutions.GISManager.UI.Tools.FloodMapInterpolationTool.IFloodMapInterpolationTool
Input Items No input items required
Output Items A raster

Tool Properties

Display Name Name Description
Gauge Locations GaugeLocations Gets or sets the path of the gauge feature class
Flood Map Libraries FloodMapLibrary Gets or sets the path of a library of temporal rasters - one per gauge location. These libraries defines the zone of influences
DEM DEM Gets or sets the DEM path that is used as template for the output flood map
Gauge Readings GaugeReadings Gets or sets the gauge time series - one time series per gauge location
Period TimePeriod Gets or sets the value of a start and stop time for the interpolation and a time period frequency
Interplolated Flood Map InterpolatedFloodMap Gets or sets the path for the interpolation raster, which is stored in the database
Script Script Gets or sets the path of the script

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Flood Map Interpolation Tool") as DHI.Solutions.GISManager.UI.Tools.FloodMapInterpolationTool;

// Set the tool properties and execute.
tool.GaugeLocations = new GaugeLocation();
tool.GaugeLocations.FeatureClassPath = "/gauges";
IFeatureClass gaugeFeatureClass = _gisModule.FeatureClassList.Fetch(tool.GaugeLocations.FeatureClassPath);
List <IFeature> features = gaugeFeatureClass.FetchAll();
int index = 1;
foreach (var feature in features)
{
   string gaugeName = "Gauge" + index.ToString();
   tool.GaugeLocations.Locations.Add(feature.Id, gaugeName);
   index++;
}
tool.FloodMapLibrary = new LocationsPath();
tool.FloodMapLibrary.Add("Gauge1","/floodLib_raster");
tool.GaugeReadings = new LocationsPath();
tool.GaugeReadings.Add("Gauge1","/TS1_one_timeSeries");
tool.DEM = "/dem";
tool.Script = "";
tool.TimePeriod.StartTime = new DateTime(2022,8,1,15,45,0);
tool.TimePeriod.StopTime = new DateTime(2022,8,1,16,45,0);
tool.TimePeriod.Period = 5;
tool.TimePeriod.PeriodType = EnumPeriod.Minutes;
tool.Execute();

Flood tool

FloodedAreaTool exports input feature to file

Tool Info Flood tool
Tools Explorer /Flood Tools/Flood tool
NuGet Package DHI.MikeOperations.GISManager.Tools.FloodedArea
API Reference DHI.Solutions.GISManager.Tools.FloodedAreaTool.IFloodedAreaTool
Input Items A single feature class or a single features
Output Items No output items

Tool Properties

Display Name Name Description
Flooding feature FloodingFeatureClassName Gets or sets the name of the feature class to be used as flooding
Threshold Treshold Gets or sets the treshold used for the flooding status
Return only flooded features ReturnFloodedOnly Gets or sets a value indicating whether return only flooded features. true if [return flooded only]; otherwise, false.
Return flooded area ReturnFlooding Gets or sets a value indicating whether return flooding feature classs. true if [return flooding]; otherwise, false.
Flood area feature class name MergedFloodFeatureName Gets or sets the name of the merged flood feature. The name of the merged flood feature.
Flooding Attribute FloodingAttribute Gets or sets attibute name used for flooding
Results name prefix OutputAttributePrefix Gets or sets output attribute prefix
Output feature class name ResultFeatureClassName Gets or sets the name of the feature class where the results will be stored

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Flood tool") as DHI.Solutions.GISManager.Tools.FloodedAreaTool.IFloodedAreaTool;
# Get the tool.
tool = app.Tools.CreateNew("Flood tool")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.FloodedAreaTool.IFloodedAreaTool(app.Tools.CreateNew("Flood tool"))

Flow Direction

Tool for calculating the flow direction of a raster representing elevation values (DEM) based on the slope of steepest decent from any given 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.

Tool Info Flow Direction
Tools Explorer /Raster Processing/Flow Direction
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterProcessing
API Reference DHI.Solutions.GISManager.Tools.RasterProcessing.IFlowDirectionTool
Input Items One or more rasters
Output Items A raster

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Flow Direction") as DHI.Solutions.GISManager.Tools.RasterProcessing.FlowDirectionTool;

// Set the tool properties and execute.
tool.InputItems.Add(raster);
tool.Execute();

// Get the output of the tool.
var outRaster = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IRaster;

Generic Raster Importer

The tool enables import of GDAL-supported raster formats. This tool supports the formats below: GTiff; HFA;ADRG; BT; EHdr; ENVI; ERS; HFA; ILWIS; RRASTER; RMF; CTable2; IDA; INGR;MFF; PCIDSK; SAGA; SGI; PCRaster; RST; GTX; MRF; GSBG; GS7BG;JP2ECW;ZIP;ASC.

Tool Info Generic Raster Importer
Tools Explorer /Import/Generic Raster Importer
NuGet Package DHI.MikeOperations.GISManager.Tools.GenericRasterImporter
API Reference DHI.Solutions.GISManager.Tools.GenericRasterImporterTool.IGenericRasterImporterTool
Input Items A single raster group
Output Items A raster

Tool Properties

Display Name Name Description
Raster RasterName Gets or sets the full path of the Raster to create to store the imported raster. By default the raster is placed in the input raster group in input items. Specifying the rastpath will overwrite the location of the raster imported.
File Path FilePath Gets or sets the file path of the file to import. The coordinate system will be read from the file when the file path property is changed.
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the file, in case the file does not contain coordinate system information.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Generic Raster Importer") as DHI.Solutions.GISManager.Tools.GenericRasterImporterTool.GenericRasterImporterTool;

// Set the tool properties and execute.
var module = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var featureClassGroup = module.RasterGroupList.Fetch("/Aladin");
tool.InputItems.Add(featureClassGroup);
tool.FilePath = @"c:\temp\gdal_20121104160000.tif";
// Place the raster in another path than the in the raster group in input items.
tool.RasterName = "/Aladin54/MyGdalRaster";
tool.Execute();

// Get the output of the tool.
var raster = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IRaster:

Generic Vector Exporter

This tool exports a feature class to a GDAL file. Metadata for feature class is also written in case ExportMetadata is true. The tool supports the following formats: ESRI Shapefile; KML; GPX; GeoJSON; XLSX; CSV; PDF; BNA; DGN; Geoconcept; GMT; MapInfo File; GPSTrackMaker;PGDUMP.

Tool Info Generic Vector Exporter
Tools Explorer /Output Tools/Generic Vector Exporter
NuGet Package DHI.MikeOperations.GISManager.Tools.GenericVectorExport
API Reference DHI.Solutions.GISManager.Tools.GenericVectorExportTool.IGenericVectorExportTool
Input Items A single feature class
Output Items No output items

Tool Properties

Display Name Name Description
File Path FilePath Gets or sets file path of exported file.
Vector Format VectorFormat Gets or sets the vector format to use to get the GDAL vector driver from.
Export Metadata ExportMetadata Gets or sets a value indicating whether the metadata of the entity should be exported.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Generic Vector Exporter") as DHI.Solutions.GISManager.Tools.GenericVectorExportTool.GenericVectorExportTool;

// Set the tool properties and execute.
var module = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var featureClass = module.FeatureClassList.Fetch("/Sava/Rivers");
tool.InputItems.Add(featureClass);
tool.VectorFormat = "KML";
tool.FilePath = @"C:\temp\Rivers5.kml";
tool.Execute();

Generic Vector Importer

This tool enables import of GDAL-supported vector formats. The tool supports the following formats: ESRI Shapefile; KML; KMZ; GPX; GeoJSON; PDF; DGN; GMT; MapInfoFile; GPSTrackMaker; ZIP; DXF.

Tool Info Generic Vector Importer
Tools Explorer /Import/Generic Vector Importer
NuGet Package DHI.MikeOperations.GISManager.Tools.GenericVectorImporter
API Reference DHI.Solutions.GISManager.Tools.GenericVectorImporterTool.IGenericVectorImporterTool
Input Items A single feature class group
Output Items A feature class

Tool Properties

Display Name Name Description
Feature Class Name FeatureClassName Gets or sets the name of the Feature Class to create to store the imported feature class.
File Path FilePath Gets or sets the input file path to import.
CoordinateSystem Gets or sets the coordinate system of the data to be imported, in case the coordinate system cannot be detected from the file.
Coordinate System CoordinateSystemName Gets or sets the coordinate system name.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Generic Vector Importer") as DHI.Solutions.GISManager.Tools.GenericVectorImporterTool.GenericVectorImporterTool;

// Set the tool properties and execute.
var module = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var featureClassGroup = module.FeatureClassGroupList.Fetch("/Sava");
tool.InputItems.Add(featureClassGroup);
tool.FilePath = @"C:\temp\Rivers.kml";
tool.FeatureClassName = "/Sava/Rivers1";
tool.Execute();

// Get the output of the tool.
var featureClass = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IFeatureClass;

Import from ASCII file

This tool imports point features from a comma separated ASCII file or from a folder which contains ASCII files (.csv or .txt). First row should contain column headers. The column header row should contain column names X and Y, but does also support columns for feature attributes. Feature X and Y values should be in the specified coordinate system.

Tool Info Import from ASCII file
Tools Explorer /Import/Import from ASCII file
NuGet Package DHI.MikeOperations.GISManager.Tools.ASCIIFileImport
API Reference DHI.Solutions.GISManager.UI.Tools.ASCIIFileImportTool.IASCIIFileImportTool
Input Items A single feature class group
Output Items A feature class

Tool Properties

Display Name Name Description
CoordinateSystem Gets or sets the coordinate system of the ASCII file to import
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the ASCII file to import.
Feature Class FeatureClassName Gets or sets the name of the feature class to create to store the imported ASCII file
Group Group Gets or sets the full group path holding the feature classes to where the file will be imported
File Path FilePath Gets or sets the file path fo the ASCII file to import. Enabled when ImportFromOption = SingleFile.
Folder Folder Gets or sets the Folder from which the file will be imported from. Enabled when ImportFromOption = Folder.
Save To Database SaveToDatabase Gets or sets a value indicating whether to save the feature class to the database.
Import from ImportFromOption Gets or sets the import option. The import option determines if a single file, or all files in a specified folder shall be imported.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Import from ASCII file") as DHI.Solutions.GISManager.UI.Tools.ASCIIFileImportTool.ASCIIFileImportTool;

// Set the tool properties and execute.
var gisModule = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
tool.ImportFromOption = DHI.Solutions.GISManager.Tools.ImportTypeOption.SingleFile;
tool.FilePath = @"c:\temp\file1.csv";
tool.FeatureClassName = "/Group/ASCIItst";
tool.CoordinateSystem = gisModule.DefaultCoordinateSystem;
tool.Execute();

Import from ASCII grid file

The Import from ASCII grid file tool imports an ESRI ASCII file into a raster.

Tool Info Import from ASCII grid file
Tools Explorer /Import/Import from ASCII grid file
NuGet Package DHI.MikeOperations.GISManager.Tools.ASCIIGridFileImport
API Reference DHI.Solutions.GISManager.UI.Tools.ASCIIGridImportTool.IASCIIGridImportTool
Input Items A single raster group
Output Items No output items

Tool Properties

Display Name Name Description
CoordinateSystem Gets or sets the coordinate system of the ASCII grid file to import
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the ASCII grid file to import.
Raster RasterName Gets or sets the name of the Raster to create to store the imported ASCII file
File Path FilePath Gets or sets the file path fo the ASCII Grid file to import

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Import from ASCII grid file") as DHI.Solutions.GISManager.UI.Tools.ASCIIGridImportTool.ASCIIGridImportTool;

// Set the tool properties and execute.
var gisModule = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
tool.FilePath = @"c:\temp\small_grid.asc";
tool.RasterName = "/Group/ASCIItst";
// Set the coordinate system of the ESRI ASCII file to import (here the default coordinate system of the GIS module is used).
tool.CoordinateSystem = gisModule.DefaultCoordinateSystem;
tool.Execute();

Import from Dfs2 file

Tool for importing Dfs2 files.

Tool Info Import from Dfs2 file
Tools Explorer /Import/Import from Dfs2 file
NuGet Package DHI.MikeOperations.GISManager.Tools.Dfs2Import
API Reference DHI.Solutions.GISManager.UI.Tools.Dfs2ImportTool.IDfs2ImportTool
Input Items A single raster group
Output Items A raster

Tool Properties

Display Name Name Description
CoordinateSystem Gets or sets the coordinate system of the Dfs2 file to import
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the Dfs2 file to import.
Raster Group RasterGroupName Gets or sets the name of the Raster Group to create to store rasters imported Dfs2 file
File Path FilePath Gets or sets the file path fo the Dfs2 file to import
Include derived items AdditionalItems Gets or sets a value indicating whether additional items will be computed during DFS2 loading.
Raster Items RasterItem Gets or sets the raster item to import.
FileCoordinateSystem Gets or sets the coordinate system.
FileTypes Gets the value for supported file types. Supported file types correspond to the extension (without .) of supported file types and separated by ; in case more than one file type is supported

Tool Methods

  • FillChangeLog(System.String fileName ,System.Int32 position ,System.String logName ,DHI.Solutions.Generic.IEntity entity ,DHI.Solutions.Generic.IChangeLogModule changeLogModule): Fills the change log.
  • FillRasterBand(DHI.Solutions.GISManager.Interfaces.IRasterBand rasterBand ,System.String fileName ,System.Int32 position ,System.Boolean keepOpened): Fills the raster band.
  • CloseFile(System.String fileName): Closes the file.
  • GetRastersList(System.String fileName): Gets the rasters list.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Import from Dfs2 file") as DHI.Solutions.GISManager.UI.Tools.Dfs2ImportTool.Dfs2ImportTool;

// Set the tool properties and execute.
var module = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var rasterGroup = module.RasterGroupList.Fetch("/MyRasterGroup");
// Set input items before specifying the file name in order to read the coordinate system from the file.
tool.InputItems.Add(rasterGroup);
tool.FilePath = @"c:\temp\raster.dfs2";
tool.Execute();

// Get the output of the tool.
var rasterOutput = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IRaster;

Import from Dfs3 file

This tool imports data from Dfs3.

Tool Info Import from Dfs3 file
Tools Explorer /Import/Import from Dfs3 file
NuGet Package DHI.MikeOperations.GISManager.Tools.Dfs3Import
API Reference DHI.Solutions.GISManager.UI.Tools.Dfs3ImportTool.IDfs3ImportTool
Input Items A single raster group
Output Items A raster

Tool Properties

Display Name Name Description
CoordinateSystem Gets or sets the coordinate system of the Dfs3 file to import
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the Dfs3 file to import.
Raster Group RasterGroupName Gets or sets the name of the Raster Group to create to store rasters imported Dfs3 file
File Path FilePath Gets or sets the file path fo the Dfs3 file to import
Include derived items AdditionalItems Gets or sets a value indicating whether additional items will be computed during DFS3 loading.
Layer Numbers LayerNumbers Gets or sets the value of LayerNumbers
Raster Items RasterItem Gets or sets the raster item to import.
FileCoordinateSystem Gets or sets the coordinate system.
FileTypes Gets the value for supported file types. Supported file types correspond to the extension (without .) of supported file types and separated by ; in case more than one file type is supported

Tool Methods

  • FillChangeLog(System.String fileName ,System.Int32 position ,System.String logName ,DHI.Solutions.Generic.IEntity entity ,DHI.Solutions.Generic.IChangeLogModule changeLogModule): Fills the change log.
  • FillRasterBand(DHI.Solutions.GISManager.Interfaces.IRasterBand rasterBand ,System.String fileName ,System.Int32 position ,System.Boolean keepOpened): Fills the raster band.
  • CloseFile(System.String fileName): Closes the file.
  • GetRastersList(System.String fileName): Gets the rasters list.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Import from Dfs3 file") as DHI.Solutions.GISManager.UI.Tools.Dfs3ImportTool.IDfs3ImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Import from Dfs3 file")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.Dfs3ImportTool.IDfs3ImportTool(app.Tools.CreateNew("Import from Dfs3 file"))

Import from Dfsu file

This tool imports unstructured data stored in dfsu format (as output by MIKE 21 FM for example). 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.A item will be stored in several blocks of different geographical and temporal extent.

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.

Tool Info Import from Dfsu file
Tools Explorer /Import/Import from Dfsu file
NuGet Package DHI.MikeOperations.GISManager.Tools.DfsuImport
API Reference DHI.Solutions.GISManager.UI.Tools.DfsuImportTool.IDfsuImportTool
Input Items No input items required
Output Items No output items

Tool Properties

Display Name Name Description
CoordinateSystem Gets or sets the coordinate system of the data to be imported is picked from the file.
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the Dfsu file to import.
Mesh Name MeshName Gets or sets the name of the mesh object to create.
File Path FilePath Gets or sets the file path fo the Dfsu file to import
Time Block Size TimeBlockSize Gets or sets the number of timesteps to store together.
Space Block Size SpaceBlockSize Gets or sets the number of elements to store together.
Time Steps Count TimeStepsCount Gets the time steps count.
Elements Count ElementsCount Gets the elements count.
Time Space Ratio TimeSpaceRatio Gets or sets the time / space blok side ratio.
Time Blocks Count TimeBlocksCount Gets the time blocks count.
Space Blocks Count SpaceBlocksCount Gets the space blocks count.

Tool Methods

  • SetOptimalBlockSize(System.Int32 numTimeSteps ,System.Int32 numElements ,System.Double timeSpaceRatio): Sets the size of the optimal block.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Import from Dfsu file") as DHI.Solutions.GISManager.UI.Tools.DfsuImportTool.IDfsuImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Import from Dfsu file")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.DfsuImportTool.IDfsuImportTool(app.Tools.CreateNew("Import from Dfsu file"))

Import from Dfsu file to feature class

This tool imports data from Dfsu to feature class.

Tool Info Import from Dfsu file to feature class
Tools Explorer /Import/Import from Dfsu file to feature class
NuGet Package DHI.MikeOperations.GISManager.Tools.DfsuToFeaturesImport
API Reference DHI.Solutions.GISManager.UI.Tools.DfsuToFeaturesImportTool.IDfsuFcImportTool
Input Items A single feature class group
Output Items No output items

Tool Properties

Display Name Name Description
CoordinateSystem Gets or sets the coordinate system of the Dfsu file to import
Feature Class FeatureClassName Gets or sets the name of the feature class to create to store the imported shape file
File Path FilePath Gets or sets the file path fo the Dfsu file to import
Time Steps Count TimeStepsCount Gets the time steps count.
Variable(s) SelectionVariable Gets or sets the selection variable.
Time interval for import TimeInterval Gets or sets the time interval for read in case of Temporal feature class. The time interval in num of steps.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Import from Dfsu file to feature class") as DHI.Solutions.GISManager.UI.Tools.DfsuToFeaturesImportTool.IDfsuFcImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Import from Dfsu file to feature class")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.DfsuToFeaturesImportTool.IDfsuFcImportTool(app.Tools.CreateNew("Import from Dfsu file to feature class"))

Import from Image file

This tool imports rasters stored in an image file.

Tool Info Import from Image file
Tools Explorer /Import/Import from Image file
NuGet Package DHI.MikeOperations.GISManager.Tools.ImageFileImport
API Reference DHI.Solutions.GISManager.UI.Tools.ImageFileImportTool.IImageFileImportTool
Input Items A single raster group
Output Items No output items

Tool Properties

Display Name Name Description
Raster RasterName Gets or sets the name of the Raster to create to store the imported Image file
File Path FilePath Gets or sets the file path of the Image file to import
Use scale ScaleImageWhenZooming Gets or sets a value indicating whether image shall be scaled or not.
Upper Left X UpperLeftX Gets or sets the X coordinate of upper Left corner If is true, this represents the longitude value of the upper left corner in decimal degrees (WGS 84) If is false, this represents the horizontal offset in pixels from the upper left corner of the map
Upper Left Y UpperLeftY Gets or sets the Y coordinate of upper Left corner If is true, this represents the latitude value of the upper left corner in decimal degrees (WGS 84) If is false, this represents the vertical offset in pixels from the upper left corner of the map

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Import from Image file") as DHI.Solutions.GISManager.UI.Tools.ImageFileImportTool.IImageFileImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Import from Image file")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.ImageFileImportTool.IImageFileImportTool(app.Tools.CreateNew("Import from Image file"))

Import from IMG file

Tool for importing Erdas Imagine (.img) files as raters into the MIKE OPERATIONS database.

Tool Info Import from IMG file
Tools Explorer /Import/Import from IMG file
NuGet Package DHI.MikeOperations.GISManager.Tools.ImgRasterImport
API Reference DHI.Solutions.GISManager.UI.Tools.IMGRasterImportTool.IIMGRasterImportTool
Input Items A single raster group
Output Items No output items

Tool Properties

Display Name Name Description
CoordinateSystem Gets or sets the coordinate system of the IMG file to import
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the IMG file to import.
Raster RasterName Gets or sets the name of the Raster to create to store the imported IMG file
File Path FilePath Gets or sets the file path fo the Erdas Imagine (.img) file to import.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Import from IMG file") as DHI.Solutions.GISManager.UI.Tools.IMGRasterImportTool.IIMGRasterImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Import from IMG file")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.IMGRasterImportTool.IIMGRasterImportTool(app.Tools.CreateNew("Import from IMG file"))

Import from KML/KMZ file

This tool imports features from a KML/KMZ file or from a folder which contains KML/KMZ files.

Tool Info Import from KML/KMZ file
Tools Explorer /Import/Import from KML/KMZ file
NuGet Package DHI.MikeOperations.GISManager.Tools.KmlFileImport
API Reference DHI.Solutions.GISManager.UI.Tools.KMLFileImportTool.IKMLFileImportTool
Input Items A single feature class group
Output Items No output items

Tool Properties

Display Name Name Description
Feature Class FeatureClassName Gets or sets the name of the feature class to create to store the imported KML file
Group Group Gets or sets the full group path holding the feature classes to where the file will be imported
File Path FilePath Gets or sets the file path fo the KML file to import. Enabled when ImportFromOption = SingleFile.
Folder Folder Gets or sets the Folder from which the file will be imported from. Enabled when ImportFromOption = Folder.
Import from ImportFromOption Gets or sets the import option. The import option determines if a single file, or all files in a specified folder shall be imported.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Import from KML/KMZ file") as DHI.Solutions.GISManager.UI.Tools.KMLFileImportTool.IKMLFileImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Import from KML/KMZ file")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.KMLFileImportTool.IKMLFileImportTool(app.Tools.CreateNew("Import from KML/KMZ file"))

Import from NetCDF file

This tool imports a raster from a netCDF file.

Tool Info Import from NetCDF file
Tools Explorer /Import/Import from NetCDF file
NuGet Package DHI.MikeOperations.GISManager.Tools.NetCdfImport
API Reference DHI.Solutions.GISManager.UI.Tools.NetCDFImportTool.INetCDFImportTool
Input Items A single raster group
Output Items No output items

Tool Properties

Display Name Name Description
CoordinateSystem Gets or sets the coordinate system of the NetCDF file to import.
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the NetCDF file to import.
Raster Group RasterGroupName Gets or sets the name of the Raster Group to create to store the imported NetCDF file
File Path FilePath Gets or sets the file path for the NetCDF file to import
NetCDF Parser NetCDFEngine Gets or sets the NetCDF engine to use (DHI or IKVM_OpenJDK)
Configuration Configuration Gets or sets the configuration for engine type IKVM_OpenJDK.
Output dfs2 OutputDfs2 Gets or sets the output dfs2 for engine type IKVM_OpenJDK.
FileCoordinateSystem Gets or sets the coordinate system.
FileTypes Gets the value for supported file types. Supported file types correspond to the extension (without .) of supported file types and separated by ; in case more than one file type is supported

Tool Methods

  • FillChangeLog(System.String fileName ,System.Int32 position ,System.String logName ,DHI.Solutions.Generic.IEntity entity ,DHI.Solutions.Generic.IChangeLogModule changeLogModule): Fills the change log.
  • FillRasterBand(DHI.Solutions.GISManager.Interfaces.IRasterBand rasterBand ,System.String fileName ,System.Int32 position ,System.Boolean keepOpened): Fills the raster band.
  • CloseFile(System.String fileName): Closes the file.
  • GetRastersList(System.String fileName): Gets the rasters list.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Import from NetCDF file") as DHI.Solutions.GISManager.UI.Tools.NetCDFImportTool.INetCDFImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Import from NetCDF file")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.NetCDFImportTool.INetCDFImportTool(app.Tools.CreateNew("Import from NetCDF file"))

Import from NetCDF file (Advanced)

This tool imports raster from a NetCDF file.

Tool Info Import from NetCDF file (Advanced)
Tools Explorer /Import/Import from NetCDF file (Advanced)
NuGet Package DHI.MikeOperations.GISManager.Tools.NetCdfImport
API Reference DHI.Solutions.GISManager.UI.Tools.NetCDFImportTool.IFlexibleNetCDFImportTool
Input Items A single raster group
Output Items No output items

Tool Properties

Display Name Name Description
Raster Group RasterGroupName Gets or sets the name of the Raster Group to create to store the imported NetCDF file.
Raster Name RasterName Gets or sets 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.
File Path FilePath Gets or sets the file path for the NetCDF file to import.
Variable Variable Gets or sets the variable name to be imported from the NetCDF file.
CoordinateSystem Gets or sets the coordinate system of the NetCDF file to import.
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the NetCDF file to import.
Cell Width CellWidth Gets or sets the cell width to apply for the raster. (Defaults to average width between X points in NetCDF file.)
Cell Height CellHeight Gets or sets the cell height to apply for the raster. (Defaults to average height between Y points in NetCDF file.)
Scale Factor X ScaleX Gets or sets the scale factor for the X coordinates. (Coordinates will be multiplied by this factor.)
Scale Factor Y ScaleY Gets or sets the scale factor for the Y coordinates. (Coordinates will be multiplied by this factor.)
Base Time BaseTime Gets or sets 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 StartTime Gets the start time calculated for the current variable's time dimension, the base time, and time offset.
Time Offset TimeOffset Gets or sets a time offset in hours used to adjust the time of each time step. This can be used to adjust for time zone differences, for example.
EUM Item EumItem Gets or sets the MIKE Zero EUM Item (unit type) code.
EUM Unit EumUnit Gets or sets the MIKE Zero EUM Unit code.
Existing Raster Option ExistingRasterOption Gets or sets The behavior for overwriting when an existing raster is specified. This property is ignored when no raster exists at the specified location.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Import from NetCDF file (Advanced)") as DHI.Solutions.GISManager.UI.Tools.NetCDFImportTool.IFlexibleNetCDFImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Import from NetCDF file (Advanced)")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.NetCDFImportTool.IFlexibleNetCDFImportTool(app.Tools.CreateNew("Import from NetCDF file (Advanced)"))

Import from Res11 file

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.

Tool Info Import from Res11 file
Tools Explorer /Import/Import from Res11 file
NuGet Package DHI.MikeOperations.GISManager.Tools.Res11Import
API Reference DHI.Solutions.GISManager.UI.Tools.Res11ImportTool.IRes11ImportTool
Input Items A single feature class group
Output Items No output items

Tool Properties

Display Name Name Description
CoordinateSystem Gets or sets the coordinate system of the res11 data to import
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the res11 data to import.
Group Group Gets or sets the full group path holding the feature classes to where the network will be imported
File Path FilePath Gets or sets the file path for the res11 file to import. Enabled when ImportFromOption = SingleFile.
Folder Folder Gets or sets the Folder from which the file will be imported from. Enabled when ImportFromOption = Folder.
Import from ImportFromOption Gets or sets the import option. The import option determines if a single file, or all files in a specified folder shall be imported.
TimeSeries Group TimeSeriesGroup Gets or sets the group where time series will be imported to

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Import from Res11 file") as DHI.Solutions.GISManager.UI.Tools.Res11ImportTool.IRes11ImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Import from Res11 file")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.Res11ImportTool.IRes11ImportTool(app.Tools.CreateNew("Import from Res11 file"))

Import from shape file

This tool imports features from one or more shape file(s) stored on the file system and creates a feature class in the database.

Tool Info Import from shape file
Tools Explorer /Import/Import from shape file
NuGet Package DHI.MikeOperations.GISManager.Tools.ShapeFileImport
API Reference DHI.Solutions.GISManager.UI.Tools.ShapeFileImportTool.IShapeFileImportTool
Input Items A single feature class group
Output Items No output items

Tool Properties

Display Name Name Description
IsOneFeatureClass IsOneFeatureClass Gets a value indicating whether this instance create one feature class. true if this instance create one feature class; otherwise, false.
Import as temporal ImportTemporal Gets or sets a value indicating whether [import into temporal feature class]. true if [import into temporal feature class]; otherwise, false.
CoordinateSystem Gets or sets the coordinate system of the shape file to import
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the shape file to import.
Group Group Gets or sets the full group path holding the feature classes to where the file will be imported
Feature Class FeatureClassName Gets or sets the name of the feature class to create to store the imported shape file
File Path FilePath Gets or sets the file path of the shape file to import. Enabled when ImportFromOption = SingleFile.
Folder Folder Gets or sets the Folder from which the file will be imported from. Enabled when ImportFromOption = Folder.
Import from ImportFromOption Gets or sets the import option. The import option determines if a single file, or all files in a specified folder shall be imported.
Folder DirectoryPath Gets or sets the directory path of the Shp files (*.shp) to import.
Add to existing feature class AddToExistingFeatureClass Gets or sets a value indicating whether add to existing raster.
File name time mask DateTimeFilenameMask Gets or sets the date time filename mask.
Codepage Value CodePageValue Gets or sets the code page value to use. Default is codepage 1252.
Save To Database SaveToDatabase Gets or sets a value indicating whether to save the feature class to the database.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Import from shape file") as DHI.Solutions.GISManager.UI.Tools.ShapeFileImportTool.IShapeFileImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Import from shape file")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.ShapeFileImportTool.IShapeFileImportTool(app.Tools.CreateNew("Import from shape file"))

Import from TIFF file

This tool imports raster from a TIFF file.

Tool Info Import from TIFF file
Tools Explorer /Import/Import from TIFF file
NuGet Package DHI.MikeOperations.GISManager.Tools.TiffImport
API Reference DHI.Solutions.GISManager.UI.Tools.TIFFRasterImportTool.ITIFFRasterImportTool
Input Items A single raster group
Output Items No output items

Tool Properties

Display Name Name Description
CoordinateSystem Gets or sets the coordinate system of the TIFF file to import
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the TIFF file to import.
Raster RasterName Gets or sets the name of the Raster to create to store the imported TIFF file
File Path FilePath Gets or sets the file path fo the TIFF file to import
World File WorldFile Gets or sets the file path fo the TIFF world file

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Import from TIFF file") as DHI.Solutions.GISManager.UI.Tools.TIFFRasterImportTool.ITIFFRasterImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Import from TIFF file")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.TIFFRasterImportTool.ITIFFRasterImportTool(app.Tools.CreateNew("Import from TIFF file"))

Import temporal rasters from TIFF files

This class imports data from TIFF.

Tool Info Import temporal rasters from TIFF files
Tools Explorer /Import/Import temporal rasters from TIFF files
NuGet Package DHI.MikeOperations.GISManager.Tools.TiffTemporalImport
API Reference DHI.Solutions.GISManager.UI.Tools.TIFFTemporalImportTool.ITIFFTemporalImportTool
Input Items A single raster group
Output Items No output items

Tool Properties

Display Name Name Description
CoordinateSystem Gets or sets the coordinate system of the TIFF file to import
Coordinate System CoordinateSystemName Gets or sets the coordinate system name of the TIFF file to import.
Raster Name RasterName Gets or sets the name of the Raster to create to store rasters imported from TIFF files
Folder Path DirectoryPath Gets or sets the directory path fof the TIFF file to import
World File WorldFile Gets or sets the file path fo the TIFF world file
Extend existing raster AddToExistingRaster Gets or sets a value indicating whether add to existing raster.
File name mask DateTimeFilenameMask Gets or sets the date time filename mask.
Item EUM Enum_Item Gets or sets the enum item.
Unit EUM Enum_Unit Gets or sets the enum unit.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Import temporal rasters from TIFF files") as DHI.Solutions.GISManager.UI.Tools.TIFFTemporalImportTool.ITIFFTemporalImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Import temporal rasters from TIFF files")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.TIFFTemporalImportTool.ITIFFTemporalImportTool(app.Tools.CreateNew("Import temporal rasters from TIFF files"))

Intersect Feature Classes

The intersect tool creates a geometric intersection of two input polygon 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.

Tool Info Intersect Feature Classes
Tools Explorer /Geo Processing/Intersect Feature Classes
NuGet Package DHI.MikeOperations.GISManager.Tools.GeoProcessing
API Reference DHI.Solutions.GISManager.Tools.GeoProcessing.IIntersectTool
Input Items Two feature classes
Output Items A feature class

Tool Properties

Display Name Name Description
GIS Processor GISProcessor Gets or sets the GIS processor to use when executing the tool
Name of Intersection feature class IntersectFeatureClassName Gets or sets the Name of new Intersection Feature Class.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Intersect Feature Classes") as DHI.Solutions.GISManager.Tools.GeoProcessing.IntersectTool;

// Set the tool properties and execute.
var cities = _gisModule.DefaultGISDataProvider.FeatureClassList.Fetch("/Cities");
var polygon = _gisModule.DefaultGISDataProvider.FeatureClassList.Fetch("/1Polygon");
tool.InputItems.Add(cities);
tool.InputItems.Add(polygon);
tool.IntersectFeatureClassName= "IntersectedFeatureClass";
tool.Execute();

// Get the output of the tool.
var outputFeatureClass = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IFeatureClass;

Inverse Distance Weighted Interpolation

A tool for nearest inverse-distance weighted interpolation.

Tool Info Inverse Distance Weighted Interpolation
Tools Explorer /Raster Interpolation/Inverse Distance Weighted Interpolation
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterInterpolation
API Reference DHI.Solutions.GISManager.Tools.RasterInterpolation.IIDWInterpolationTool
Input Items A single features or a single feature class
Output Items A raster

Tool Properties

Display Name Name Description
Attribute Attribute Gets or sets the attribute to get values for the points to use in the interpolation
Raster Definition RasterDefinition Gets or sets the definition for the output raster Coordinate system is not used. Instead, coordinate system for input feature class is used
Extrapolate values ExtrapolateValues Gets or sets a value indicating whether 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.
Auto-Scale AutoScale Gets or sets a value indicating whether the tool should automatically calculate scale when changing height and width, or height and width when changing scale. When AutoScale is true, the tool will keep the overall extent of the output raster the same as the input feature class within the precision of the scale factor in each dimension.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Inverse Distance Weighted Interpolation") as DHI.Solutions.GISManager.Tools.RasterInterpolation.IIDWInterpolationTool;
# Get the tool.
tool = app.Tools.CreateNew("Inverse Distance Weighted Interpolation")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.RasterInterpolation.IIDWInterpolationTool(app.Tools.CreateNew("Inverse Distance Weighted Interpolation"))

Kriging Interpolation

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.

Tool Info Kriging Interpolation
Tools Explorer /Raster Interpolation/Kriging Interpolation
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterInterpolation
API Reference DHI.Solutions.GISManager.Tools.RasterInterpolation.IKrigingInterpolationTool
Input Items A single features or a single feature class
Output Items A raster

Tool Properties

Display Name Name Description
Attribute Attribute Gets or sets the attribute to get values for the points to use in the interpolation
Covariance Type CovarianceType Gets or sets the to use to compute covariance of the values in two points using the scaled distance between points
Missing Value MissingValue Gets or sets the missing value when the distance to the closest point is bigger than radius
Relative Scaling Factor RelativeScalingFactor Gets or sets the scaling factor to normalize point distances (typically 1)
Raster Definition RasterDefinition Gets or sets the definition for the output raster
Extrapolate values ExtrapolateValues Gets or sets a value indicating whether 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.
Auto-Scale AutoScale Gets or sets a value indicating whether the tool should automatically calculate scale when changing height and width, or height and width when changing scale. When AutoScale is true, the tool will keep the overall extent of the output raster the same as the input feature class within the precision of the scale factor in each dimension.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Kriging Interpolation") as DHI.Solutions.GISManager.Tools.RasterInterpolation.KrigingInterpolationTool;

// Set the tool properties and execute.
tool.InputItems.Add(featureClass);
tool.Execute();

// Get the output of the tool.
var output = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IRaster;

Measure

Tool for adding the attributes “area” and “perimeter” to a polygon feature class or attribute “length” to a line feature class.

Tool Info Measure
Tools Explorer /Geo Processing/Measure
NuGet Package DHI.MikeOperations.GISManager.Tools.GeoProcessing
API Reference DHI.Solutions.GISManager.Tools.GeoProcessing.IMeasureTool
Input Items One or more feature classes
Output Items A feature class

Tool Properties

Display Name Name Description
Unit Unit Gets or sets the unit for the measures

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Measure") as DHI.Solutions.GISManager.Tools.GeoProcessing.MeasureTool;

// Set the tool properties and execute.
tool.InputItems.Add(featureClass);
tool.Unit = DHI.Solutions.GISManager.Interfaces.DisplayUnit.Kilometer;
tool.Execute();

// Get the output of the tool.
var outputFeatureClass = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IFeatureClass;

Merge Feature Classes

Merge tool. This tool takes 2 feature classes and generates a 3rd feature class with merged geometries.

Tool Info Merge Feature Classes
Tools Explorer /Geo Processing/Merge Feature Classes
NuGet Package DHI.MikeOperations.GISManager.Tools.GeoProcessing
API Reference DHI.Solutions.GISManager.Tools.GeoProcessing.IMergeTool
Input Items Two feature classes
Output Items A feature class

Tool Properties

Display Name Name Description
GIS Processor GISProcessor Gets or sets the GIS processor to use when executing the tool
Feature Class Name MergeFeatureClassName Gets or sets name of the new merged feature class
Master Feature Class MasterFeatureClass Gets or sets the feature class to act as master feature class. Master feature class is the feature class whose attribute will be used for merging
Attributes Mapping AttributesMapping Gets the dictionary of mapping between attributes in master feature class and attribute in feature class to merge

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Merge Feature Classes") as DHI.Solutions.GISManager.Tools.GeoProcessing.MergeTool;

// Set the tool properties and execute.
tool.InputItems.Add(featureClass1);
tool.InputItems.Add(featureClass2);
tool.MergeFeatureClassName = "MergeFeatureClassName";
tool.MasterFeatureClass = featureClass1;
tool.AttributesMapping.Clear();
tool.AttributesMapping.Add("Attrib1", "Attrib1");
tool.AttributesMapping.Add("Attrib2", "Attrib2");
tool.AttributesMapping.Add("Attrib3", "Attrib3");
tool.Execute();

// Get the output of the tool.
var outputFeatureClass = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IFeatureClass;

MikeCloudSharedDataDownloadTool

The Mike Cloud Shared Data Download tool download data into a feature class.

Tool Info MikeCloudSharedDataDownloadTool
Tools Explorer /Mike Cloud/MikeCloudSharedDataDownloadTool
NuGet Package DHI.MikeOperations.GISManager.Tools.MikeCloudSharedData
API Reference DHI.Solutions.GISManager.Tools.MikeCloudSharedDataTool.IMikeCloudSharedDataDownloadTool
Input Items A single feature class
Output Items No output items

Tool Properties

Display Name Name Description
GIS Processor GISProcessor Gets or sets the GIS processor to use when executing the tool
Dataset Dataset Gets or sets the dataset.
First timestep for extraction From Gets or sets the datetime from.
Last timestep for extraction To Gets or sets the datetime to.
Output Name OutputName Gets or sets the output name.
Output Type OutputType Gets or sets the output type.
Output Location OutputLocation Gets or sets the output location.
Output Folder OutputDiskFolder Gets or sets the output path.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("MikeCloudSharedDataDownloadTool") as DHI.Solutions.GISManager.Tools.MikeCloudSharedDataTool.MikeCloudSharedDataDownloadTool;

// Set the tool properties and execute.
tool.InputItems.Add(featureClass);
tool.Attribute = "Attrib1";
tool.Execute();

// Get the output of the tool.
var outputFeatureClass = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IFeatureClass;

Nearest Neighbour Interpolation

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.

Tool Info Nearest Neighbour Interpolation
Tools Explorer /Raster Interpolation/Nearest Neighbour Interpolation
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterInterpolation
API Reference DHI.Solutions.GISManager.Tools.RasterInterpolation.INearestNeighbourInterpolationTool
Input Items A single features or a single feature class
Output Items A raster

Tool Properties

Display Name Name Description
Attribute Attribute Gets or sets the attribute to get values for the points to use in the interpolation
Missing Value MissingValue Gets or sets the value to use when the distance to the closest points is bigger than radius
Radius Radius Gets or sets 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 RasterDefinition Gets or sets the definition for the output raster Coordinate system is not used. Instead, coordinate system for input feature class is used
Auto-Scale AutoScale Gets or sets a value indicating whether the tool should automatically calculate scale when changing height and width, or height and width when changing scale. When AutoScale is true, the tool will keep the overall extent of the output raster the same as the input feature class within the precision of the scale factor in each dimension.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Nearest Neighbour Interpolation") as DHI.Solutions.GISManager.Tools.RasterInterpolation.NearestNeighbourInterpolationTool;

// Set the tool properties and execute.
too.InputItems.Add(featureClass);
tool.Execute();

// Get the output of the tool.
var outputRaster = _testTool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IRaster;

Radial Basis Interpolation

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, which 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.

Tool Info Radial Basis Interpolation
Tools Explorer /Raster Interpolation/Radial Basis Interpolation
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterInterpolation
API Reference DHI.Solutions.GISManager.Tools.RasterInterpolation.IRadialBasisInterpolationTool
Input Items A single features or a single feature class
Output Items A raster

Tool Properties

Display Name Name Description
Attribute Attribute Gets or sets the attribute to get values for the points to use in the interpolation
Radial Basis Function RadialBasisFunction Gets or sets a value for the to use to compute approximation functions
Raster Definition RasterDefinition Gets or sets the definition for the output raster Coordinate system is not used. Instead, coordinate system for input feature class is used
Extrapolate values ExtrapolateValues Gets or sets a value indicating whether 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.
Auto-Scale AutoScale Gets or sets a value indicating whether the tool should automatically calculate scale when changing height and width, or height and width when changing scale. When AutoScale is true, the tool will keep the overall extent of the output raster the same as the input feature class within the precision of the scale factor in each dimension.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Radial Basis Interpolation") as DHI.Solutions.GISManager.Tools.RasterInterpolation.IRadialBasisInterpolationTool;
# Get the tool.
tool = app.Tools.CreateNew("Radial Basis Interpolation")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.RasterInterpolation.IRadialBasisInterpolationTool(app.Tools.CreateNew("Radial Basis Interpolation"))

Raster appearance

This tool will set the appearance for the raster by updating the symbology of the raster. The symbology is used when displaying the raster.

Tool Info Raster appearance
Tools Explorer /Raster Processing/Raster appearance
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterProcessing
API Reference DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterAppearanceTool
Input Items A single raster
Output Items A raster

Tool Properties

Display Name Name Description
Raster Processor RasterProcessor Gets or sets the raster processor to use when executing the tool
Style Type RasterStyleType Gets or sets the layer style type. Based on selected type, layer style definition parameters are changed. Available types are Gradient and Value Ranges.
Layer style LayerStyle Gets or sets the layer style to be used for the raster added to the map. Style definition is identical to the style definition used in map.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Raster appearance") as DHI.Solutions.GISManager.Tools.RasterProcessing.RasterAppearanceTool;

// Set the tool properties and execute.
tool.InputItems.Add(raster);
tool.RasterStyleType = DHI.Solutions.GISManager.Interfaces.RasterStyleType.ValueRanges;
tool.Execute();

// Get the output of the tool.
var outRaster = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IRaster;

Raster Calculator

This tool performs raster math on input rasters using syntax commonly found in spreadsheet programs.

Tool Info Raster Calculator
Tools Explorer /Raster Processing/Raster Calculator
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterProcessing
API Reference DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterCalculatorTool
Input Items One or more rasters
Output Items A raster

Tool Properties

Display Name Name Description
Formula Formula Gets or sets 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. 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.
Name Mapping NameMapping Gets or sets 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.
Temporal Output TemporalOutput Gets or sets a value indicating whether the output is a temporal raster

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Raster Calculator") as DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterCalculatorTool;
# Get the tool.
tool = app.Tools.CreateNew("Raster Calculator")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterCalculatorTool(app.Tools.CreateNew("Raster Calculator"))

Raster Group Tools

This tool run different tools for all rasters in raster group. Speed up process, where area is for example covered by more rasters. Individual tool and their combinations can be used for (significantly) increasing of raster(s) presentation in map. Useful in case of big raster of many rasters covering area of interest. Set/modify default symbology for individual rasters. Example of such chain can be – Project and/or Resample; Copy default style; Tiles; Resample; Set Visibility. Typically used for the final project delivery. Data analysis are done on the original full scale rasters.

Tool Info Raster Group Tools
Tools Explorer /Raster Group Tools/Raster Group Tools
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterGroupProcessing
API Reference DHI.Solutions.GISManager.Tools.RasterGroupProcessing.IRasterGroupTool
Input Items A single raster group
Output Items No output items

Tool Properties

Display Name Name Description
Raster Processor RasterProcessor Gets or sets the raster processor to use when executing the tool
Output Group Root Path OutputGroupRootPath Gets or sets the Output Group Root Path - be used as the root, where copy of the processed rasters will be stored.
New cell size CellSize Gets or sets the size of the cell.
Tile Width TileWidth Gets or sets the width of the tile.
Tile Height TileHeight Gets or sets the height of the tile.
CoordinateSystem Gets or sets the coordinate system to project to
Interpolation Method InterpolationMethod Gets or sets the interpolation method to use
Duplicate Name Options DuplicateNameOption Gets or sets the option to be chosen when a feature with the same name is already present in the group
Processing type RasterGroupProcesingType Gets or sets the type of the raster group procesing.
Symbology templete raster TemplateRaster Gets or sets the template raster.
Add Source Root AddSourceRoot Gets or sets a value indicating whether [add source root].
Keep Visibility Scale KeepVisibilityScale Gets or sets a value indicating whether [keep visibility scale].
Keep Raster Location KeepResampelingLocation Gets or sets a value indicating whether [keep resampeling location].
Lower Scale LowerScaleVisibility Gets or sets the lower scale visibility.
Upper Scale UpperrScaleVisibility Gets or sets the upperr scale visibility.
Zoom Level ZoomLevel Gets or sets the zoom level.
Coordinate System CoordinateSystemName Gets or sets the coordinate system name.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Raster Group Tools") as DHI.Solutions.GISManager.Tools.RasterGroupProcessing.IRasterGroupTool;
# Get the tool.
tool = app.Tools.CreateNew("Raster Group Tools")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.RasterGroupProcessing.IRasterGroupTool(app.Tools.CreateNew("Raster Group Tools"))

Raster Project

A tool for projecting rasters to a different coordinate system.

Tool Info Raster Project
Tools Explorer /Raster Processing/Raster Project
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterProcessing
API Reference DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterProjectTool
Input Items One or more rasters
Output Items A raster

Tool Properties

Display Name Name Description
Raster Processor RasterProcessor Gets or sets the raster processor to use when executing the tool
CoordinateSystem Gets or sets the coordinate system to project to.
Interpolation Method InterpolationMethod Gets or sets the interpolation method to use. Can be Nearest Neighbor, Bilinear, or Cubic.
Coordinate System CoordinateSystemName Gets or sets the coordinate system name.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Raster Project") as DHI.Solutions.GISManager.Tools.RasterProcessing.RasterProjectTool;

// Set the tool properties and execute.
var module = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var raster = module.RasterList.Fetch("/smallOresund/H Water Depth m");
tool.InputItems.Add(raster);
tool.CoordinateSystemName = "WGS 84 / UTM zone 33N";
tool.InterpolationMethod = DHI.Solutions.GISManager.Interfaces.RasterInterpolationMethod.Cubic;
tool.Execute();

// Get the output of the tool.
var projectedTaster = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IRaster;

Raster query

RasterQueryTool class

Tool Info Raster query
Tools Explorer /Data tools/Raster query
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterQuery
API Reference DHI.Solutions.GISManager.Tools.RasterQueryTool.RasterQueryTool
Input Items No input items required
Output Items No output items

Tool Properties

The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Raster query") as DHI.Solutions.GISManager.Tools.RasterQueryTool.RasterQueryTool;
# Get the tool.
tool = app.Tools.CreateNew("Raster query")

Raster Resample

This tool resamples a raster to a different cell size.

Tool Info Raster Resample
Tools Explorer /Raster Processing/Raster Resample
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterProcessing
API Reference DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterResampleTool
Input Items One or more rasters
Output Items A raster

Tool Properties

Display Name Name Description
Raster Processor RasterProcessor Gets or sets the raster processor to use when executing the tool
Raster Definition RasterDefinition Gets or sets 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
Interpolation Method InterpolationMethod Gets or sets the interpolation method to use.
Auto-Scale AutoScale Gets or sets a value indicating whether the tool should automatically calculate scale when changing height and width, or height and width when changing scale. When AutoScale is true, the tool will keep the overall extent of the output raster the same as the input raster within the precision of the scale factor in each dimension.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Raster Resample") as DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterResampleTool;
# Get the tool.
tool = app.Tools.CreateNew("Raster Resample")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterResampleTool(app.Tools.CreateNew("Raster Resample"))

Raster To Database

The "To Database" tool stores an in memory feature class to the database. Raster tools produce memory objects (rasters stored in memory). To store these memory objects in the database the "To Database" tool must be used.

Tool Info Raster To Database
Tools Explorer /Output Tools/Raster To Database
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterToDatabase
API Reference DHI.Solutions.GISManager.Tools.RasterToDatabaseTool.IRasterToDatabaseTool
Input Items One or more rasters
Output Items No output items

Tool Properties

Display Name Name Description
Duplicate Name Options DuplicateNameOption Gets or sets 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.
Raster Group Group Gets or sets the group in which to save the raster
Naming Option NameOption Gets or sets 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 RasterDataProvider Gets or sets the to save the raster to
Raster Name RasterName Gets or sets the name of the raster to be saved. (Only available if naming option is "By Name"). Requires
Raster Name Postfix NamePostFix Gets or sets the postfix to add to the input raster name(s) when saving. (Only available if naming option is "By Postfix"). Requires

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Raster To Database") as DHI.Solutions.GISManager.Tools.RasterToDatabaseTool.IRasterToDatabaseTool;
# Get the tool.
tool = app.Tools.CreateNew("Raster To Database")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.RasterToDatabaseTool.IRasterToDatabaseTool(app.Tools.CreateNew("Raster To Database"))

Raster To Display

The "To Display (Raster)" tool adds a raster to a "New map" or to the "Active map". When running GIS processing tools they always run "To Display". Note that the current "Action" setting for the "To Display" tool will be used when using "To Display" from other GIS tools.

Tool Info Raster To Display
Tools Explorer /Output Tools/Raster To Display
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterToDisplay
API Reference DHI.Solutions.GISManager.UI.Tools.RasterToDisplayTool.IRasterToDisplayTool
Input Items One or more rasters
Output Items No output items

Tool Properties

Display Name Name Description
AvailableOutputs Gets the list of available outputs that can be used to display
Action Action Gets or sets the action to perform when displaying data in output. "NewDataView" adds the output raster layer to a new map. "ActiveDataView" adds the output raster layer to the active map.
Output Output Gets or sets the visualizer. Currently always ThinkGeo.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Raster To Display") as DHI.Solutions.GISManager.UI.Tools.RasterToDisplayTool.IRasterToDisplayTool;
# Get the tool.
tool = app.Tools.CreateNew("Raster To Display")
# Get the tool.
tool = DHI.Solutions.GISManager.UI.Tools.RasterToDisplayTool.IRasterToDisplayTool(app.Tools.CreateNew("Raster To Display"))

Raster to Vector

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.

Tool Info Raster to Vector
Tools Explorer /Raster Processing/Raster to Vector
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterProcessing
API Reference DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterToVectorTool
Input Items One or more rasters
Output Items A feature class

Tool Properties

Display Name Name Description
Raster Processor RasterProcessor Gets or sets the raster processor to use when executing the tool
Value Ranges ValueRanges Gets or sets the values ranges to generate features. If not specified, all values are used.
Raster Band RasterBand Gets or sets the band from the input rasters that is to be converted.
Tolerance Tolerance Gets or sets the tolerance in raster coordinate system used for the simplification of geometries.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Raster to Vector") as DHI.Solutions.GISManager.Tools.RasterProcessing.RasterToVectorTool;

// Set the tool properties and execute.
var module = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var raster = module.RasterList.Fetch("/small_raster");
tool.InputItems.Add(raster);
tool.RasterBand = 0;
tool.Tolerance = 0.5;
var valueRanges = new System.Collections.Generic.List<DHI.Solutions.GISManager.Interfaces.IValueRange>();
valueRanges.Add(new DHI.Solutions.GISManager.Common.ValueRange() { MinValue = 0, MaxValue = 5 });
valueRanges.Add(new DHI.Solutions.GISManager.Common.ValueRange() { MinValue = 5, MaxValue = 10 });
valueRanges.Add(new DHI.Solutions.GISManager.Common.ValueRange() { MinValue = 10, MaxValue = 20 });
valueRanges.Add(new DHI.Solutions.GISManager.Common.ValueRange() { MinValue = 20, MaxValue = 50 });
tool.ValueRanges = valueRanges;
tool.Execute();

// Get the output of the tool.
var featureClass = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IFeatureClass;

Reclassification

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).

Tool Info Reclassification
Tools Explorer /Raster Processing/Reclassification
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterProcessing
API Reference DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterReclassificationTool
Input Items One or more rasters
Output Items A raster

Tool Properties

Display Name Name Description
Keep Unmapped Values KeepUnmappedValues Gets or sets a value indicating whether unmapped values are kept or replaced by null.
Values Mapping Mapping Gets or sets the mapping of values from the original raster to the reclassified raster. If is SingleValue, the keys in the dictionary shall be single values. If is ValueRange, the keys in the dictionary shall be The mapping values data type depends on the and values will be converted accordingly.
Mapping Type MappingType Gets or sets the type of mapping. If single value, values are mapped one to one. Otherwise, a range of values is mapped to a new value.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Reclassification") as DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterReclassificationTool;
# Get the tool.
tool = app.Tools.CreateNew("Reclassification")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterReclassificationTool(app.Tools.CreateNew("Reclassification"))

Slope

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. 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))

Tool Info Slope
Tools Explorer /Raster Processing/Slope
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterProcessing
API Reference DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterSlopeTool
Input Items One or more rasters
Output Items A raster

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Slope") as DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterSlopeTool;
# Get the tool.
tool = app.Tools.CreateNew("Slope")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.RasterProcessing.IRasterSlopeTool(app.Tools.CreateNew("Slope"))

Slope Length

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.

Tool Info Slope Length
Tools Explorer /Raster Processing/Slope Length
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterProcessing
API Reference DHI.Solutions.GISManager.Tools.RasterProcessing.ISlopeLengthTool
Input Items One or more rasters
Output Items A raster

Tool Properties

Display Name Name Description
Slope Break SlopeBreak Gets or sets the break in slope in percent that will mark the downstream end of the slope.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Slope Length") as DHI.Solutions.GISManager.Tools.RasterProcessing.ISlopeLengthTool;
# Get the tool.
tool = app.Tools.CreateNew("Slope Length")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.RasterProcessing.ISlopeLengthTool(app.Tools.CreateNew("Slope Length"))

Soil Erosion Crop Management (C)

Calculates crop management factor (C) for the RUSLE soil erosion equation. This tool works similarly to the raster Reclassification tool. The mapped values should be derived from the literature.

Tool Info Soil Erosion Crop Management (C)
Tools Explorer /Soil Erosion/Soil Erosion Crop Management (C)
NuGet Package DHI.MikeOperations.GISManager.Tools.SoilErosion
API Reference DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionCTool
Input Items A single raster or a single feature class
Output Items A raster

Tool Properties

Display Name Name Description
Crop Type Attribute CropTypeAttribute The feature class attribute which contains the crop type. (Only used when the input is a feature class).
Mapping Mapping Gets or sets the mapping of values. The keys in the dictionary shall be values representing each type. The mapping values data type shall be single values.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Soil Erosion Crop Management (C)") as DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionCTool;
# Get the tool.
tool = app.Tools.CreateNew("Soil Erosion Crop Management (C)")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionCTool(app.Tools.CreateNew("Soil Erosion Crop Management (C)"))

Soil Erosion Erosion Control (P)

Calculates erosion control factor (P) for the RUSLE soil erosion equation. This tool works similarly to the raster Reclassification tool. The mapped values should be derived from the literature.

Tool Info Soil Erosion Erosion Control (P)
Tools Explorer /Soil Erosion/Soil Erosion Erosion Control (P)
NuGet Package DHI.MikeOperations.GISManager.Tools.SoilErosion
API Reference DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionPTool
Input Items A single raster or a single feature class
Output Items A raster

Tool Properties

Display Name Name Description
Control Type Attribute ControlTypeAttribute Gets or sets the feature class attribute which contains the erosion control type. (Only used when the input is a feature class).
Mapping Mapping Gets or sets the mapping of values. The keys in the dictionary shall be values representing each type. The mapping values data type shall be single values.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Soil Erosion Erosion Control (P)") as DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionPTool;
# Get the tool.
tool = app.Tools.CreateNew("Soil Erosion Erosion Control (P)")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionPTool(app.Tools.CreateNew("Soil Erosion Erosion Control (P)"))

Soil Erosion Mean Annual Soil Loss (A)

Calculates the mean annual soil loss (A) based on the RUSLE soil erosion equation. The mean annual soil loss is calculated by multiplying each of the input factors together: A = R * K * LS * C * P

Tool Info Soil Erosion Mean Annual Soil Loss (A)
Tools Explorer /Soil Erosion/Soil Erosion Mean Annual Soil Loss (A)
NuGet Package DHI.MikeOperations.GISManager.Tools.SoilErosion
API Reference DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionATool
Input Items One or more rasters
Output Items A raster

Tool Properties

Display Name Name Description
Rainfall Erosivity (R) RainfallErosivityFactor Gets or sets the raster representing the rainfall erosivity factor (R) of the RUSLE soil erosion formula.
Soil Erodibility (K) SoilErodibilityFactor Gets or sets the raster representing the soil erodibility factor (K) of the RUSLE soil erosion formula.
Slope Length (LS) SlopeLengthFactor Gets or sets the raster representing the slope length factor (LS) of the RUSLE soil erosion formula.
Crop Management (C) CropManagementFactor Gets or sets the raster representing the crop management factor (C) of the RUSLE soil erosion formula.
Erosion Control (P) ErosionControlFactor Gets or sets the raster representing the erosion control factor (P) of the RUSLE soil erosion formula.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Soil Erosion Mean Annual Soil Loss (A)") as DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionATool;
# Get the tool.
tool = app.Tools.CreateNew("Soil Erosion Mean Annual Soil Loss (A)")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionATool(app.Tools.CreateNew("Soil Erosion Mean Annual Soil Loss (A)"))

Soil Erosion Rainfall Erosivity (R)

Calculates rainfall erosivity (R) for the RUSLE soil erosion equation.

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]

Tool Info Soil Erosion Rainfall Erosivity (R)
Tools Explorer /Soil Erosion/Soil Erosion Rainfall Erosivity (R)
NuGet Package DHI.MikeOperations.GISManager.Tools.SoilErosion
API Reference DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionRTool
Input Items One or more rasters
Output Items A raster

Tool Properties

Display Name Name Description
Formula Formula Gets or sets the raster calculator formula for calculating rainfall erosivity (R) from the input rainfall intensity and depth rasters.
Name Mapping NameMapping Gets or sets the mapping between the input rasters and the raster names entered in the formula.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Soil Erosion Rainfall Erosivity (R)") as DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionRTool;
# Get the tool.
tool = app.Tools.CreateNew("Soil Erosion Rainfall Erosivity (R)")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionRTool(app.Tools.CreateNew("Soil Erosion Rainfall Erosivity (R)"))

Soil Erosion Rainfall Erosivity (R) (extended)

Soil erosion tool

Tool Info Soil Erosion Rainfall Erosivity (R) (extended)
Tools Explorer /Soil Erosion/Soil Erosion Rainfall Erosivity (R) (extended)
NuGet Package DHI.MikeOperations.GISManager.Tools.SoilErosionR
API Reference DHI.Solutions.GISManager.Tools.SoilErosionRTool.ISoilErosionRTool
Input Items One or more time series
Output Items A raster

Tool Properties

Display Name Name Description
Resampling time step interval ResampligTimeStepInterval Gets or sets the time step interval. The interval to use to resample the input data so that correct multiplication factor to convert fixed intervals into break points (where rainfall intensity changes during a storm) can be applied. Multiplication factors according to resampling time step interval are: 60 min: 1.730, 30 min: 1.161, 15 min: 1.078, 10 min: 1.044 and 5 min: 1.014
Catchment feature class CatchmentFeatureClass Gets or sets the feature class with catchments. Shall have the same coordinate system as StationsFeatureClass
Stations feature class StationsFeatureClass Gets or sets the feature class with rainfall stations. Shall have the same coordinate system as CatchmentFeatureClass
Raster height RasterHeight Gets or sets the value of raster height
Raster width RasterWidth Gets or sets the value of raster width

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Soil Erosion Rainfall Erosivity (R) (extended)") as DHI.Solutions.GISManager.Tools.SoilErosionRTool.ISoilErosionRTool;
# Get the tool.
tool = app.Tools.CreateNew("Soil Erosion Rainfall Erosivity (R) (extended)")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.SoilErosionRTool.ISoilErosionRTool(app.Tools.CreateNew("Soil Erosion Rainfall Erosivity (R) (extended)"))

Soil Erosion Slope Length (LS)

Calculates slope length (LS) for the RUSLE soil erosion equation.

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 = (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).

Tool Info Soil Erosion Slope Length (LS)
Tools Explorer /Soil Erosion/Soil Erosion Slope Length (LS)
NuGet Package DHI.MikeOperations.GISManager.Tools.SoilErosion
API Reference DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionLSTool
Input Items A single raster
Output Items A raster

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Soil Erosion Slope Length (LS)") as DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionLSTool;
# Get the tool.
tool = app.Tools.CreateNew("Soil Erosion Slope Length (LS)")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionLSTool(app.Tools.CreateNew("Soil Erosion Slope Length (LS)"))

Soil Erosion Soil Erodibility (K)

Calculates soil erodibility (K) for the RUSLE soil erosion equation. This tool works similarly to the raster Reclassification tool. The mapped values should be derived from the literature. Input items should be a raster containing values representing the soil type OR a feature class with polygons representing the soil types. Output is a raster representing the soil erodibility factor (K).

Tool Info Soil Erosion Soil Erodibility (K)
Tools Explorer /Soil Erosion/Soil Erosion Soil Erodibility (K)
NuGet Package DHI.MikeOperations.GISManager.Tools.SoilErosion
API Reference DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionKTool
Input Items A single raster or a single feature class
Output Items A raster

Tool Properties

Display Name Name Description
Soil Type Attribute SoilTypeAttribute Gets or sets the feature class attribute which contains the soil type. (Only used when the input is a feature class).
Mapping Mapping Gets or sets the mapping of values. The keys in the dictionary shall be values representing each type. The mapping values data type shall be single values.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Soil Erosion Soil Erodibility (K)") as DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionKTool;
# Get the tool.
tool = app.Tools.CreateNew("Soil Erosion Soil Erodibility (K)")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.SoilErosion.ISoilErosionKTool(app.Tools.CreateNew("Soil Erosion Soil Erodibility (K)"))

Temporal DisaggregationTool

A tool for convert vector to raster.

Tool Info Temporal DisaggregationTool
Tools Explorer /Temporal Tools/Temporal DisaggregationTool
NuGet Package DHI.MikeOperations.GISManager.Tools.TemporalRaster
API Reference DHI.Solutions.GISManager.Tools.Temporal.ITemporalDisaggregationTool
Input Items A single feature class
Output Items A time series

Tool Properties

Display Name Name Description
Attribute Attribute Gets or sets the name of the attribute to disaggregated into time series
Fractions Fractions Gets or sets the fractions to use in the disaggregation. A fraction is a definition of the time series, the weight and the threshold to use
Attribute for identification IdAttribute Gets or sets the name of the attribute to identify feature in the input feature class
Unit Unit Gets or sets the unit.
Variable Variable Gets or sets the variable.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Temporal DisaggregationTool") as DHI.Solutions.GISManager.Tools.Temporal.ITemporalDisaggregationTool;
# Get the tool.
tool = app.Tools.CreateNew("Temporal DisaggregationTool")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.Temporal.ITemporalDisaggregationTool(app.Tools.CreateNew("Temporal DisaggregationTool"))

Temporal Zonal Statistics Tool

Temporal zonal statistics tool

Tool Info Temporal Zonal Statistics Tool
Tools Explorer /Temporal Tools/Temporal Zonal Statistics Tool
NuGet Package DHI.MikeOperations.GISManager.Tools.TemporalRaster
API Reference DHI.Solutions.GISManager.Tools.Temporal.ITemporalZonalStatisticsTool
Input Items A single feature class
Output Items A time series

Tool Properties

Display Name Name Description
Raster Processor RasterProcessor Gets or sets the raster processor to use when executing the tool
Attribute Attribute Gets or sets the the name of the attribute to identify features in the input feature class and be used when naming time series
Raster Raster Gets or sets the raster to calculate zonal statistics.
Save to group Group Gets or sets the group in which to save the timeseries
Name suffix NamePostFix Gets or sets the postfix string to be added to the timeseries name.e.g. TimeseriesA Postfix
Save with name TimeseriesName Gets or sets the name to be added to the timeseries, e.g. MyTs, MyTs (1), MyTs(2) etc
Overwrite option DuplicateNameOption Gets or sets the option to be chosen when a timeseres with the same name is already present in the group and if time series will be saved in database
Statistics SelectedStatistics Gets or sets the selected statistics.
Value type TimeSeriesValueType Gets or sets the time series value type
Variable TimeSeriesVariable Gets or sets the value of time series variable
Unit TimeseriesUnit Gets or sets the value of time series unit
Save to database SaveToDatabase Gets or sets a value indicating whether to save to database
Associate TS to Features AssociateTsToFeatures Gets or sets a value indicating whether to associate TS with features
Raster Data Provider RasterDataProvider Gets or sets the raster data provider to use.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Temporal Zonal Statistics Tool") as DHI.Solutions.GISManager.Tools.Temporal.ITemporalZonalStatisticsTool;
# Get the tool.
tool = app.Tools.CreateNew("Temporal Zonal Statistics Tool")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.Temporal.ITemporalZonalStatisticsTool(app.Tools.CreateNew("Temporal Zonal Statistics Tool"))

Thiessen Polygons

A tool for calculating Thiessen polygons from a set of points.

Tool Info Thiessen Polygons
Tools Explorer /Geo Processing/Thiessen Polygons
NuGet Package DHI.MikeOperations.GISManager.Tools.GeoProcessing
API Reference DHI.Solutions.GISManager.Tools.GeoProcessing.IThiessenPolygonTool
Input Items A single feature class or a single features
Output Items A feature class

Tool Properties

Display Name Name Description
GIS Processor GISProcessor Gets or sets the GIS processor to use when executing the tool
Feature Class Name ThiessenPolygonsFeatureClassName Gets or sets name of the new feature class containing the Thiessen Polygons.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Thiessen Polygons") as DHI.Solutions.GISManager.Tools.GeoProcessing.ThiessenPolygonTool;

// Set the tool properties and execute.
var gisModule = application.Modules.Get("GIS Manager") as DHI.Solutions.GISManager.Interfaces.IGISModule;
var cities = gisModule.DefaultGISDataProvider.FeatureClassList.Fetch("/Cities");
cities.Query(new DHI.Solutions.Generic.Query());
tool.InputItems.Add(cities);
tool.ThiessenPolygonsFeatureClassName = "ThiessenPolygonsCities";
tool.Execute();

// Get the output of the tool.
var outputFeatureClass = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IFeatureClass;

Time Series to Temporal Raster

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.

Tool Info Time Series to Temporal Raster
Tools Explorer /Temporal Tools/Time Series to Temporal Raster
NuGet Package DHI.MikeOperations.GISManager.Tools.TemporalRaster
API Reference DHI.Solutions.GISManager.Tools.Temporal.TimeSeriesToTemporalRasterTool
Input Items A single feature class
Output Items A raster

Tool Properties

Display Name Name Description
Timeseries mask (as Regular expression) TSNamePattern Gets or sets the value of TS name pattern
Group Name TSGroupName Gets or sets the value of TS group name
Use Timeseries from Feature Association UseAssociation Gets or sets a value indicating whether to use association
TS Connection Attribute TsNameFeatureAttributeName Gets or sets the value of TS name feature attribute
Start Time StartTime Gets or sets the start time.
End Time EndTime Gets or sets the end time.
Time Step TimeStep Gets or sets the time step.
Time Step Unit TimeStepUnit Gets or sets the time step unit.
Raster Definition RasterDefinition Gets or sets the definition for the output raster Coordinate system is not used. Instead, coordinate system for input feature class is used
Use autoscale AutoScale Gets or sets a value indicating whether the tool should automatically calculate scale when changing height and width, or height and width when changing scale. When AutoScale is true, the tool will keep the overall extent of the output raster the same as the input feature class within the precision of the scale factor in each dimension.
Raster Name RasterName Gets or sets the rastername.
Save to group RasterGroup Gets or sets the value of raster group
Add Input TS Association AddAssociation Gets or sets a value indicating whether to add an association.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Time Series to Temporal Raster") as DHI.Solutions.GISManager.Tools.Temporal.TimeSeriesToTemporalRasterTool;
# Get the tool.
tool = app.Tools.CreateNew("Time Series to Temporal Raster")

TimeSeries Step To Features Tool

This tool copies timeseries values to features in a feature class.

Tool Info TimeSeries Step To Features Tool
Tools Explorer /Temporal Tools/TimeSeries Step To Features Tool
NuGet Package DHI.MikeOperations.GISManager.Tools.TemporalRaster
API Reference DHI.Solutions.GISManager.Tools.Temporal.TimeSeriesStepToFeaturesTool
Input Items A single feature class
Output Items No output items

Tool Properties

Display Name Name Description
Raster Processor RasterProcessor Gets or sets the raster processor to use when executing the tool
Timeseries mask (as Regular expression) TSNamePattern Gets or sets a rtegular 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.
Group Name TSGroupName Gets or sets the value of time series group name group that contains the timeseries to use to populate the feature class attribute table.
Use Timeseries from Feature Association UseAssociation Gets or sets a value indicating whether timeseries associated to each feature will be considered when applying the mask. If set to false, a timeseries group will need to be defined.
Target Attribute Name TargetFeatureAttributeName Gets or sets 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 TsNameFeatureAttributeName Gets or sets 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.
AssociatedTS Gets the value of TS and feature association dictionary
TimeStep TimeStep Gets or sets the value of time step
UseLast UseLastValue Gets or sets a value indicating whether the last timestep from of the selected timeseries will be written 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.
AddAssociation AddAssociation Gets or sets a value indicating whether the timeseries used will be associate to the corresponding feature in the feature class.

Tool Methods

  • ResetAssociation(): Resets associations, so that associated time series and features to update matches the tool properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("TimeSeries Step To Features Tool") as DHI.Solutions.GISManager.Tools.Temporal.TimeSeriesStepToFeaturesTool;

// Set the tool properties and execute.
tool.InputItems.Add(featureClass);
tool.AddAssociation = true;
tool.TSNamePattern = @"([\w\s\d\.]*)_rainfall";
tool.TargetFeatureAttributeName = "val1";
tool.TsNameFeatureAttributeName = "tsname";
tool.TimeStep = new DateTime(1961, 8, 24, 5, 0, 0);
tool.UseLastValue = false;
tool.TSGroupName = "/tsdata";
tool.UseAssociation = false;
tool.Execute();

To attribute table

Tool for adding feature class attributes to an attribute table.

Tool Info To attribute table
Tools Explorer /Output Tools/To attribute table
NuGet Package DHI.MikeOperations.GISManager.Tools.ToAttributeTable
API Reference DHI.Solutions.GISManager.UI.Tools.ToAttributeTable.ToAttributeTable
Input Items One or more feature classes
Output Items No output items

Tool Properties

Display Name Name Description
Table option TableDisplayOptions This setting determines whether the input values shall be added to an existing or new table.
Output table name. TableOutputName This is the name of the table that will be created by the tool.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("To attribute table") as DHI.Solutions.GISManager.UI.Tools.ToAttributeTable.ToAttributeTable;
# Get the tool.
tool = app.Tools.CreateNew("To attribute table")

To database

ToDatabaseTool exports input feature to file

Tool Info To database
Tools Explorer /Output Tools/To database
NuGet Package DHI.MikeOperations.GISManager.Tools.ToDatabase
API Reference DHI.Solutions.GISManager.Tools.ToDatabaseTool.IToDatabaseTool
Input Items One or more feature classes or one or more features
Output Items No output items

Tool Properties

Display Name Name Description
Duplicate Name Options DuplicateNameOption Gets or sets the option to be chosen when a feature with the same name is already present in the group
Feature Class Group Group Gets or sets the group in which to save the feature class
Naming Option NameOption Gets or sets the option to specify the name of the saved feature class
GIS Data Provider DataProvider Gets or sets the to save the feature class to
Feature Class Name FeatureClassName Gets or sets the name of the feature class to be saved Requires
Name Postfix NamePostFix Gets or sets the postfix string to be added to the feature class name

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("To database") as DHI.Solutions.GISManager.Tools.ToDatabaseTool.IToDatabaseTool;
# Get the tool.
tool = app.Tools.CreateNew("To database")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.ToDatabaseTool.IToDatabaseTool(app.Tools.CreateNew("To database"))

To display

The "To Display" tool adds a feature class to a "New map" or to the "Active map". 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.

Tool Info To display
Tools Explorer /Output Tools/To display
NuGet Package DHI.MikeOperations.GISManager.Tools.ToDisplay
API Reference DHI.Solutions.GISManager.Tools.ToDisplayTool.IToDisplayTool
Input Items One or more feature classes or one or more meshs
Output Items No output items

Tool Properties

Display Name Name Description
AvailableOutputs Gets the list of available outputs that can be used to display
Action Action Gets or sets the action to perform when displaying data in output. "NewDataView" adds the output feature layer to a new map. "ActiveDataView" adds the output feature layer to the active map.
Output Output Gets or sets the the visualizer. Currently always ThinkGeo.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("To display") as DHI.Solutions.GISManager.Tools.ToDisplayTool.IToDisplayTool;
# Get the tool.
tool = app.Tools.CreateNew("To display")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.ToDisplayTool.IToDisplayTool(app.Tools.CreateNew("To display"))

Union Feature Classes

The Union Feature Classes tool creates a geometric intersection of the input feature classes. All overlapping and non-overlapping features will be written to the output feature class.

Tool Info Union Feature Classes
Tools Explorer /Geo Processing/Union Feature Classes
NuGet Package DHI.MikeOperations.GISManager.Tools.GeoProcessing
API Reference DHI.Solutions.GISManager.Tools.GeoProcessing.IUnionTool
Input Items Two feature classes
Output Items A feature class

Tool Properties

Display Name Name Description
GIS Processor GISProcessor Gets or sets the GIS processor to use when executing the tool
Name of union feature class UnionFeatureClassName Gets or sets the Name of new Union Feature Class.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Union Feature Classes") as DHI.Solutions.GISManager.Tools.GeoProcessing.UnionTool;

// Set the tool properties and execute.
tool.InputItems.Add(featureClass1);
tool.InputItems.Add(featureClass2);
tool.UnionFeatureClassName = "UnionFeatureClassName";
tool.Execute();

// Get the output of the tool.
var outputFeatureClass = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IFeatureClass;

Vector to Raster

Tool for converting a feature class to a raster using attribute values for each of the features in the feature class to fill in the raster.

Tool Info Vector to Raster
Tools Explorer /Raster Processing/Vector to Raster
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterProcessing
API Reference DHI.Solutions.GISManager.Tools.RasterProcessing.IVectorToRasterTool
Input Items A single features or a single feature class
Output Items A raster

Tool Properties

Display Name Name Description
Raster Processor RasterProcessor Gets or sets the raster processor to use when executing the tool
Attribute Attribute Gets or sets the attribute to get values for the geometries to fill in the raster
Raster Definition RasterDefinition Gets or sets the definition for the output raster. Coordinate system is not used.Instead, coordinate system for input feature class is used
Missing Value MissingValue Gets or sets the value to use when data is missing.
Auto-Scale AutoScale Gets or sets a value indicating whether the tool should automatically calculate scale when changing height and width, or height and width when changing scale. When AutoScale is true, the tool will keep the overall extent of the output raster the same as the input feature class within the precision of the scale factor in each dimension.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Vector to Raster") as DHI.Solutions.GISManager.Tools.RasterProcessing.VectorToRasterTool;

// Set the tool properties and execute.
tool.InputItems.Add(featureClass);
tool.AutoScale = true;
tool.RasterDefinition.Width = 10;
tool.Execute();

// Get the output of the tool.
var outputRaster = tool.OutputItems[0] as DHI.Solutions.GISManager.Interfaces.IRaster;

Zonal Statistics

Tool for calculating statistics on raster values for polygons, lines or points. The tool will create feature attributes for each selected statistics.

Tool Info Zonal Statistics
Tools Explorer /Raster Processing/Zonal Statistics
NuGet Package DHI.MikeOperations.GISManager.Tools.RasterProcessing
API Reference DHI.Solutions.GISManager.Tools.RasterProcessing.IZonalStatisticsTool
Input Items A single feature class
Output Items A feature class

Tool Properties

Display Name Name Description
Raster Processor RasterProcessor Gets or sets the raster processor to use when executing the tool
Raster Band RasterBand Gets or sets the index of the raster band in the raster to get values from
Raster Raster Gets or sets the raster to calculate zonal statistics.
Statistics SelectedStatistics Gets or sets the selected statistics (Avarage, Maximum, Minimum, NrMissingValues, StDev, Sum).
Raster Data Provider RasterDataProvider Gets or sets the raster data provider to use.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Zonal Statistics") as DHI.Solutions.GISManager.Tools.RasterProcessing.IZonalStatisticsTool;
# Get the tool.
tool = app.Tools.CreateNew("Zonal Statistics")
# Get the tool.
tool = DHI.Solutions.GISManager.Tools.RasterProcessing.IZonalStatisticsTool(app.Tools.CreateNew("Zonal Statistics"))