Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package locationtech
    Definition Classes
    org
  • package jts
    Definition Classes
    locationtech
  • package geom
    Definition Classes
    jts
  • package util
    Definition Classes
    geom
  • object GeometryEditor

    A class which supports creating new {link Geometry}s which are modifications of existing ones, maintaining the same type structure.

    A class which supports creating new {link Geometry}s which are modifications of existing ones, maintaining the same type structure. Geometry objects are intended to be treated as immutable. This class "modifies" Geometrys by traversing them, applying a user-defined {link GeometryEditorOperation}, {link CoordinateSequenceOperation} or {link CoordinateOperation} and creating new Geometrys with the same structure but (possibly) modified components.

    Examples of the kinds of modifications which can be made are:

    • the values of the coordinates may be changed. The editor does not check whether changing coordinate values makes the result Geometry invalid
    • the coordinate lists may be changed (e.g. by adding, deleting or modifying coordinates). The modified coordinate lists must be consistent with their original parent component (e.g. a LinearRing must always have at least 4 coordinates, and the first and last coordinate must be equal)
    • components of the original geometry may be deleted (e.g. holes may be removed from a Polygon, or LineStrings removed from a MultiLineString). Deletions will be propagated up the component tree appropriately.

    All changes must be consistent with the original Geometry's structure (e.g. a Polygon cannot be collapsed into a LineString). If changing the structure is required, use a {link GeometryTransformer}.

    This class supports creating an edited Geometry using a different GeometryFactory via the {link #GeometryEditor(GeometryFactory)} constructor. Examples of situations where this is required is if the geometry is transformed to a new SRID and/or a new PrecisionModel.

    Usage Notes

    • The resulting Geometry is not checked for validity. If validity needs to be enforced, the new Geometry's {link Geometry#isValid} method should be called.
    • By default the UserData of the input geometry is not copied to the result.
    Definition Classes
    util
    Version

    1.7

    See also

    GeometryTransformer

    Geometry#isValid

  • CoordinateOperation
  • CoordinateSequenceOperation
  • GeometryEditorOperation
  • NoOpGeometryOperation

abstract class CoordinateOperation extends GeometryEditorOperation

A {link GeometryEditorOperation} which edits the coordinate list of a {link Geometry}. Operates on Geometry subclasses which contains a single coordinate list.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CoordinateOperation
  2. GeometryEditorOperation
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new CoordinateOperation()

Abstract Value Members

  1. abstract def edit(coordinates: Array[Coordinate], geometry: Geometry): Array[Coordinate]

    Edits the array of {link Coordinate}s from a {link Geometry}.

    Edits the array of {link Coordinate}s from a {link Geometry}.

    If it is desired to preserve the immutability of Geometrys, if the coordinates are changed a new array should be created and returned.

    coordinates

    the coordinate array to operate on

    geometry

    the geometry containing the coordinate list return an edited coordinate array (which may be the same as the input)

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def edit(geometry: Geometry, factory: GeometryFactory): Geometry

    Edits a Geometry by returning a new Geometry with a modification.

    Edits a Geometry by returning a new Geometry with a modification. The returned geometry may be:

    • the input geometry itself. The returned Geometry might be the same as the Geometry passed in.
    • null if the geometry is to be deleted.
    geometry

    the Geometry to modify

    factory

    the factory with which to construct the modified Geometry (may be different to the factory of the input geometry) return a new Geometry which is a modification of the input Geometry return null if the Geometry is to be deleted completely

    Definition Classes
    CoordinateOperationGeometryEditorOperation
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped