BlueSpray - Help
© SchoonerTurtles, Inc. 2012-2015

Introduction
Contents
Getting Started
Download
Navigating
Tutorials
Scripting
Advanced
About

Class STOverlayLayers

Extends STTransformVector

Spatially adds (union), subtracts, insertects, or finds the symetric difference
between the features in one layer from the features in another layer.

The features in both layers can be filtered based on selection.

Attributes can also be specified to be matched in each layer to have features
operated on by the matching features in the other layer.

Regardless, the operation is that for each layer in the first input layer:
- The features in the second layer are combined and then used to operate
on the feature in the first layer.
- The features in the second layer are either all combined or they can be filtered
by the ones that are selected or by matching attribute values in the first layer.

If an attribute column is provided in either layer, then each feature is operated
against each matching feature.

No Attributes specified: The second input layer is combined into a single geometry
that is used to operate on each feature in the first layer

Attribute columns specified in each layer: The layers features are operated on
by the matching features from the second input layer.

@author Jim Graham
Copyright, SchoonerTurtles LLP, 2009

Enumerated Types

OVERLAY_OPERATION
    UNION - Union (Add)
    SUBTRACT - Subtract
    INTERSECTION - Intersection
    SYMETRIC_DIFFERENCE - Symetric Difference

Static Functions

ReturnsFunctionThrows
Geometry Operate(Geometry TheGeometry1,Geometry TheGeometry2,
     OVERLAY_OPERATION
TheOperator)
Exception
Operate(STLayerVectors Input0,int AttributeColumn0,boolean SelectedOnly0,
     STLayerVectors
Input1,int AttributeColumn1,boolean SelectedOnly1,
     OVERLAY_OPERATION
TheOperator,STLayerVectors Output)
Exception

Static Functions


Geometry Operate(Geometry TheGeometry1,Geometry TheGeometry2,
     OVERLAY_OPERATION TheOperator) Exception

Performs an operation on two geometries and returns the result. This function
takes care of the problems the JTS has with geometry collections.

The JTS library does not like getting null geometries (it throws exceptions) so they are handled
before calling the library.

Parameters:
    TheGeometry1
    TheGeometry2
    TheOperator
Returns:


Operate(STLayerVectors Input0,int AttributeColumn0,boolean SelectedOnly0,
     STLayerVectors Input1,int AttributeColumn1,boolean SelectedOnly1,
     OVERLAY_OPERATION TheOperator,STLayerVectors Output) Exception

Perform a spatial operation based on the settings.

Parameters:
    Input0 - the first vector layer (points, polyline, or polygon)
    AttributeColumn0 - an optional attribute column to only operate on matching values in the attribute columns, -1 for none
    SelectedOnly0 - true to just use the selected values
    Input1 - second vector layer
    AttributeColumn1 - attribute column in the second layer, if an attribute column is specific for the first layer, then this one must be specified as well
    SelectedOnly1 - true to just use the seleced values
    TheOperator - type of operation to execute
    Output - the layer for the output
Throws: Exception