Pipelines
The end of the year brings some new features and improvements to existing TatukGIS functionalities. Today, we introduce the TatukGIS Pipeline tool - a simplified geoprocessing commands interpreter.
Pipelining addresses customers' need for way to a execute complex analyses in a quick, easy, and repeatable manner. Pipelines can be thought as a system for enclosing a series of basic geoprocessing operations (e.g., opening, creating, and saving layers, executing vector and raster operations, etc.) into an easily manageable workflow, without need for any coding/scripting skills.
For example, suppose a user wants to:
- open a vector layer with points,
- interpolate the points into a grid,
- colorize the grid, and
- generate contour lines.
Let's take a look at how this sequence of operations can be performed using a pipeline (note that lines beginning with a ';' are only comments):
;show message dialog box with text "Start"
Base.Say "Start"
;close all opened layers, i.e. creates new empty project.
GIS.Close
;open layer from given Path, assigns Name to "source",
;and return it as a variable "$src"
Layer.Open Result=$src Name=source Path="c:\data\temperatures.shp"
;create an in-memory grid layer named "grid",
;and return it as a variable $dst,
;CS (coordinate system) and Extent are taken from $src layer
;Width and Height are set to 1000
Layer.CreateGrid Result=$dst Name=grid CS=$src Extent=$src Width=1000 Height=1000
;populate the $dst layer with values computed from
;Kriging interpolation based on the set of points from the $src layer
;values for interpolation are taken from "TEMP" field
Interpolation.Kriging Source=$src Destination=$dst Field=TEMP
;close $src layer, i.e. remove it from the map.
Layer.Close Layer=$src
;generate ramp with default color ramp for $dst layer.
Ramp Layer=$dst
;displays whole map in the viewer.
GIS.FullExtent
;create an in-memory vector layer named "contour",
;and return it as a variable $cntr
;CS (coordinate system) and Extent are taken from $dst layer
;layer's DefaultShapeType property is set to "Arc" (polylines)
Layer.CreateVector Result=$cntr Name=contours CS=$dst Extent=$dst ShapeType=Arc
;add floating-point field named "NewField" to $cntr layer.
Layer.AddField Layer=$cntr Name=NewField Type=Float Width=3
;generate contours from $dst layer and puts them
;into $cntr layer; algorithm creates contours from
;value 15 to maximum value in grid with interval equals 1
;contour values are also populated to "NEW FIELD"
Contour Source=$dst Destination=$cntr Field="NEW FIELD" ContourBase=15 ContourInterval=1
;zoom map to extent of $cntr layer,
;and refresh content of the viewer.
GIS.ZoomToLayer Layer=$cntr GIS.Update
;just display "Done" message
Base.Say "Done"
The result is:
To make pipeline creation even simpler, the TatukGIS Editor contains a pipeline editor plug-in that is available under the Tools menu:
An existing command can be selected from the list. Double-clicking on the command line opens a dedicated pop-up dialog box with available options:
Pipelining is implemented in the TatukGIS Developer Kernel in DK sample - Pipeline.
The list of available operations is still being developed and we are open to customer suggestions. For example, we plan to add more vector related operations, such as triangulation, etc.
Pipelining is a part of TatukGIS Developer Kernel (DK) and available on all platforms. See TGIS_Pipeline class.