New Grid Analysis Tool

TatukGIS has introduced the new Grid Analysis tool that performs multi-step grid analysis operations on geospatial data. Beyond its ready-to-use functionality, this Editor 5 scripted plugin is a excellent example of how to build other custom tools to perform complex, multi-step data processing operations using wizard-like modal forms.

A grid analysis job can be set up in a few easy steps. Let’s begin!

Step 1: Start the Grid Analysis tool

As with any Editor script, the Grid Analysis tool is found under the Tools menu or by typing its name, "grid analysis", using Tools Manager. This opens the Grid Analysis tool's Source Data selection form, pictured below (Fig. 1).

Select a source data layer. A source layer is typically raster data, such as a Digital Elevation Model (DEM), LAS layer with elevation information from LIDAR, etc., or it can be vector, such as a points or TIN layer.

Fig. 1. Source Data selection form.  

The layout of all forms in the Grid Analysis tool are similar to this first one, with an info panel at the top and relevant controls at the bottom.

Step 2: Convert vector source data to grid

Step 2, using the Vector Input form (Fig. 2), is performed only if the source layer is vector data. If source data is raster, skip this step and proceed to Step 3.

The vector-to-grid conversion process requires the user to define:

  • Source of value. With a vector layer, this can be numeric values held by an attribute field or the z values of a 3D vector layer.
  • Grid cell size. The output raster will have the same extent as the source vector layer. Output grid cell size (rows and columns) is automatically calculated.
  • Vector to grid method. Choose one of three options: IDW interpolation, Triangulation, or Point Cloud gridding. The TatukGIS Developer Kernel (DK) supports additional interpolations methods. If an interpolation method other than IDW is preferred, change the interpolation method in the script code.

For LIDAR datasets, only the Point Cloud gridding method is available due to performance constraints. Point Cloud gridding uses underneath a new DK class ‚ÄčTGIS_PointCloudToGrid specially created for this purpose.


Fig. 2. Input Vector form.

Step 3: Grid Analyses

The Grid Analyses form (Fig. 3) presents the grid analyses that can be performed on the data. (This form appears as Step 2 if the source layer is raster grid.)

Two grid analyses are available so far:

  • Elevation – If source is raster, it uses values directly from the raster source layer. If source is vector, it uses values from an intermediate grid created from the vector source layer (in Step 2).
  • Slope – First executes a slope operation and then uses values from the generated slope grid.

Fig.3. Grid Analysis form.

Step 4: Generate contours

Contour lines are generated only temporarily for use by the DK's Contour Generator to create contour polygons. The Contour Parameters form (Fig. 4) presents parameters for generating contour lines:

  • Contour interval
  • Minimal contour value
  • Maximum contour value

The tool proposes suitable, nice-looking default parameters based on the source layer value range. The default settings can be customized as desired.

Fig.4. Contour Parameters form.

Step 5: Generate contour polygons

The Polygon Parameters form (Fig. 5) provides settings to create contour polygons as:

  • Overlapping polygon shells defined by lower limit values that increase by ‘contour intervals’ from a ‘Min contour value’ to a shared upper limit 'Max contour value', e.g., 0-100, 10-100, 20-100, etc.
  • Non-overlapping polygon bands in which ‘Contour intervals’ are defined by lower and upper limit values, e.g., 0-10, 10-20, 20-30, etc.

Polygon generation reflects the latest DK improvements and new TGIS_ContourGenerator class.

Additionally the process can remove small, irrelevant polygon areas by specifying a ‘Smallest area’.

Fig. 5. Polygon Parameters form. 

Step 6: Save Options and Run

The Run & Save form (Fig. 6) presents options to generate the output into an InMemory layer or to a shapefile. The output can include only the polygon layer or also all intermediate data (e.g., grid, slope). Click the Run button to start the grid analysis computation on the data. As a job is being executed, the Editor presents the progress on each step.

Fig. 6. Run & Save form. 


Figures 7-10 present results generated by the Editor Grid Analysis tool from a LIDAR source layer.

Fig. 7. Input LIDAR layer containing elevation data.

Fig. 8. Point Cloud gridding result.  

Fig. 9. Output contour polygons.

Fig. 10. Output contour polygons in 3D.

The Editor Grid Analysis tool (along with other interesting new raster analysis features) will be further developed and expanded. You are invited to share your feedback!

Posted: October 06, 2018