Class AbstractGeometryProcessor

java.lang.Object
com.vividsolutions.jump.geom.AbstractGeometryProcessor
Direct Known Subclasses:
RemoveSmallSegments

public class AbstractGeometryProcessor extends Object
An implementation of GeometryProcessor that implements a method to recursively process GeometryCollections, and that let the user redefine one or all of the methods to process simple geometries. By default, simple geometries are added to the result, and the source geometry is returned unchanged except that it is returned with its simplest possible representation (ex. if the source geometry has nested GeometryCollections, it will return a GeometryCollection containing only simple components. You can use this class to simply filter geometries (ex. eliminating dimension 0 or dimension 1 components by not adding them to the list, or to process some types of geometries.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    process(double[] dd)
    Method to change each single coordinate of a Geometry - ex. coord transformation.
    void
    process(org.locationtech.jts.geom.CoordinateSequence sequence)
    Method to change CoordinateSequences of a geometry - ex. simplifiers.
    org.locationtech.jts.geom.Geometry
    process(org.locationtech.jts.geom.Geometry geometry)
    Main method taking an input geometry and returning a new Geometry which may have different properties.
    org.locationtech.jts.geom.LinearRing
    process(org.locationtech.jts.geom.LinearRing linearRing)
    Method to process LinearRings.
    void
    process(org.locationtech.jts.geom.LineString lineString, List<org.locationtech.jts.geom.Geometry> list)
    Method to process LineStrings.
    void
    process(org.locationtech.jts.geom.Point point, List<org.locationtech.jts.geom.Geometry> list)
    Method to process Points.
    void
    process(org.locationtech.jts.geom.Polygon polygon, List<org.locationtech.jts.geom.Geometry> list)
    Method to process Polygons.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractGeometryProcessor

      public AbstractGeometryProcessor()
  • Method Details

    • process

      public org.locationtech.jts.geom.Geometry process(org.locationtech.jts.geom.Geometry geometry)
      Main method taking an input geometry and returning a new Geometry which may have different properties.
      Parameters:
      geometry - the Geometry to process
      Returns:
      a new Geometry
    • process

      public void process(org.locationtech.jts.geom.Point point, List<org.locationtech.jts.geom.Geometry> list)
      Method to process Points. Override this method to transform punctal elements).
      Parameters:
      point - input Point
      list - the list accumulating all processed simple component.
    • process

      public void process(org.locationtech.jts.geom.LineString lineString, List<org.locationtech.jts.geom.Geometry> list)
      Method to process LineStrings. Override this method to transform linear elements).
      Parameters:
      lineString - input LineString
      list - the list accumulating all processed simple component.
    • process

      public org.locationtech.jts.geom.LinearRing process(org.locationtech.jts.geom.LinearRing linearRing)
      Method to process LinearRings.
      Parameters:
      linearRing - input LinearRing
      Returns:
      a new processed LinearRing
    • process

      public void process(org.locationtech.jts.geom.Polygon polygon, List<org.locationtech.jts.geom.Geometry> list)
      Method to process Polygons. Override this method to transform areal elements).
      Parameters:
      polygon - input Polygon
      list - the list accumulating all processed simple component.
    • process

      public void process(org.locationtech.jts.geom.CoordinateSequence sequence)
      Method to change CoordinateSequences of a geometry - ex. simplifiers.
      Parameters:
      sequence - the CoordinateSequence to process
    • process

      public double[] process(double[] dd)
      Method to change each single coordinate of a Geometry - ex. coord transformation.
      Parameters:
      dd - the input Coordinate
      Returns:
      the transformed Coordinate