User Tools

Site Tools


Sextante Module

Introduction

Spatialytics ETL's Sextante module is a tool that enables advance geoprocessing by proving various algorithms to simplify, smooth, split and run many other complex processes on geometries. Therefore, this module allows users to transform any geometry at anytime in a transformation by configuring a few parameters and input target geometries.

Note: This module comes as an extra to Spatialytics ETL (contact Spatialytics for more info).

Installation

Sextante module is a Spatialytics ETL extension which is not initially included in Spatialytics ETL. Follow these few steps to install the module.

  1. Prerequisites: Having a running instance of Spatialytics ETL.
    1. This instance base directory will be named <SETL_HOME>
  2. Download and extract Sextante module.
    1. The decompressed archive contains the following folders :
      1. plugins : Core plugin files
      2. libext : Libraries required by the plugin
  3. Copy / paste these folders into <SETL_HOME>
  4. Launch Spatialytics ETL, Sextante module should now appear in « Transformation » (see figure below). You may now use the module as you would with any other Spatialytics ETL steps.

Configuration

Using Sextante module is pretty much the same as using any other Spatialytics ETL step. The following instructions will guide you to properly configure the module:

  1. In Spoon GUI, drag and drop the module into the main transformation area.
  2. Double-clic on the module step, you should see the following window appear :

Step name

You may first specify a custom step name. This name will be the one to appear in the main GUI area.

Category & algorithms

Category

Category is not really a parameter but more considered as a way to classify and distinguish algorithms. By selecting a different category, a new set of algorithm becomes available.

Algorithm

Geoprocessing algorithm to be executed. Here is a complete list of these algorithms, categorized by the geometry primitive type (« Category » parameter).

Category « POINT »:

  • Delaunay (Multipoint only):
    • Delaunay triangulation
  • Voronoi (Multipoint only):
    • Voronoi diagram
  • Points → Lines (Multipoint only):
    • Convert points into linestrings
  • Constrained Delaunay (Multipoint only):
    • Delaunay triangulation that forces certain required segments into the triangulation.

Category « LINE »:

  • Polylines → polygons:
    • Convert linestrings into polygons
  • Polylines → single segments:
    • Replace polylines by a simple line (mean line)
  • Simplify lines:
    • Simplify linestrings by replacing complex linestrings by simpler, ones
  • Smooth lines:
    • Smooth linestrings by adding vertices for smoother appearance
  • Split lines at nodes :
    • Split complex polylines into single vertices ones
  • Split lines with points :
    • Split linestrings by inserting points on those
  • Change lines direction :
    • Change linestrings vertices direction

Category « POLYGON »:

  • Polygons → polylines :
    • Convert polygons into linestrings
  • Remove holes :
    • Remove holes from polygons
  • Simplify polygons :
    • Simplify polygons by replacing its linear rings by simpler ones
  • Resolve polygon holes (Multipolygon only):
    • Create holes for polygons topologically included in another one.
  • Fit N points in polygon :
    • Create N points and place them into a polygon perimeter

Category « GENERAL »:

  • Clip (Compared geometries must be polygons or multipolygons):
    • Clip reference geometries with comparison ones
  • Split multipart:
    • Split multiple part geometries into multiple single part ones.
  • Transform :
    • Translate/rotate/scale geometries
  • Geometries → points :
    • Convert geometries into points
  • Minimum enclosing polygon :
    • Generate minimum enclosing polygon

Parameters

Most of the algorithms willnot need parameter configuration. However, some of them will need the user to set some parameter values to fine-tune the algorithm. As shown in the next figure, the parameter table is composed of 3 columns labeled as follow :

  • « Parameter name » : The name of the parameter
  • « Type » : The datatype of this parameter's expected value
  • « Value » : User defined value. This value must be of the expected datatype.

Here is a complete list of the algorithms requiring such configuration

Category / Algorithm Parameter name Parameter type Description
LINE
Simplify lines Preserve Boolean Preserve topology or not.
Tolerance Number If linestring is shorter than this number, intermediary nodes will be removed.
Smooth lines Intermediate points Integer Number of intermediate points to compose the curve.
Curve type String Type of curve to be applied. Possible values are « Natural cubic splines », « Bezier curves » or « B splines ».
Split lines with points Method Integer Split method to be applied. Possible values are « 0 » and « 1 ». Note : This parameter doesn't seem to have any effect in Sextante library.
Tolerance Number If the distance between linestring and point is shorter than this number, linestring will be split.
POLYGON
Simplify polygons Preserve Boolean Preserve topology or not.
Tolerance Number If a linestring composing a polygon boundary is shorter than this number, intermediary nodes will be removed.
Fit N points in polygon Nb points Integer Number of points to fit in polygon.
Method Integer Spreading method to be used. Possible values are « 0 » to spread points regularly, « 1 » to spread points randomly and « 2 » to spread points regularly with alternance.
GENERAL
Transform Anchor X Number Rotation X anchor
Anchor Y Number Rotation Y anchor
Angle Number Rotation angle
Distance X Number Translation X distance
Distance Y Number Translation Y distance
Scale X Number X scale factor
Scale Y Number Y scale factor
Minimum enclosing polygon Method Integer Enclosing method to be used. Possible values are « 0 » to use a convex hull, « 1 » to use a circle and « 2 » use a rectangle.

Reference & comparison steps

If every algorithm needs at least one geometry field, only a few will require the use of a comparison one. For some algorithms, such as « clip », where the user will need a clipped geometry and a clipper one, comparison step and field is where the second geometry can be input. Here are the algorithms requiring the use of a comparison field :

  • Constrained Delaunay (POINT)
  • Split lines with points (LINE)
  • Clip (GENERAL)

Result

This is where the user defines the result field name.

Compress temp. files

Compresses temporary files when they are needed to complete the process.

Process row #n with row #n?

This step default behavior is to aggregate the comparison geometries into one single layer and then process each reference geometry with the aggregation. By activating this option, each incoming reference geometry will be processed with the single comparison geometry having the same row number, without aggregating.

Use case

First, take a look at the following transformation:

In this transformation, Sextante module receives two sets of geometries read from Shapefile files and will clip the linestrings read from the first file with the polygons read from the second.

Configure Sextante module for the “Clip” algorithm:

You can see in the figure above the following configuration:

  1. The step is named “Clip lines with polygons”.
  2. Category “GENERAL” selected (to enable “Clip” algorithm).
  3. “Clip” algorithm as been chosen.
  4. Geometries to be clipped are the lines from the first Shapefile file.
  5. Geometries to use as clipper boundaries are the polygons read from the second Shapefile file.
  6. The resulting geometries will be in a field named “clipped_geometries”
  7. We want the first multilinestring to be clipped with the first polygon, the second multilinstring clipped with the second polygon, and so on.

Preview the results:

  • We can confirm by looking at the preview that the first set of lines have been clipped with the first polygon, and the second set clipped with the second polygon.
  • We are now ready to launch the transformation without previewing!
en/spatialytics_etl/006_modules/sextante.txt · Last modified: 2015/04/20 08:33 by lvaillancourt

Page Tools