package util

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. class AffineTransformation extends Cloneable with CoordinateSequenceFilter
  2. class AffineTransformationBuilder extends AnyRef

    Builds an {link AffineTransformation} defined by a set of control vectors.

    Builds an {link AffineTransformation} defined by a set of control vectors. A control vector consists of a source point and a destination point, which is the image of the source point under the desired transformation.

    A transformation is well-defined by a set of three control vectors if and only if the source points are not collinear. (In particular, the degenerate situation where two or more source points are identical will not produce a well-defined transformation). A well-defined transformation exists and is unique. If the control vectors are not well-defined, the system of equations defining the transformation matrix entries is not solvable, and no transformation can be determined.

    No such restriction applies to the destination points. However, if the destination points are collinear or non-unique, a non-invertible transformations will be generated.

    This technique of recovering a transformation from its effect on known points is used in the Bilinear Interpolated Triangulation algorithm for warping planar surfaces.

  3. class ComponentCoordinateExtracter extends GeometryComponentFilter
  4. class GeometryCollectionMapper extends AnyRef
  5. class GeometryCombiner extends AnyRef
  6. class GeometryEditor extends AnyRef
  7. class GeometryExtracter extends GeometryFilter
  8. class GeometryTransformer extends AnyRef

    A framework for processes which transform an input {link Geometry} into an output {link Geometry}, possibly changing its structure and type(s).

    A framework for processes which transform an input {link Geometry} into an output {link Geometry}, possibly changing its structure and type(s). This class is a framework for implementing subclasses which perform transformations on various different Geometry subclasses. It provides an easy way of applying specific transformations to given geometry types, while allowing unhandled types to be simply copied. Also, the framework ensures that if subcomponents change type the parent geometries types change appropriately to maintain valid structure. Subclasses will override whichever transformX methods they need to to handle particular Geometry types.

    A typically usage would be a transformation class that transforms Polygons into Polygons, LineStrings or Points, depending on the geometry of the input (For instance, a simplification operation). This class would likely need to override the {link #transformMultiPolygon(MultiPolygon, Geometry)} method to ensure that if input Polygons change type the result is a GeometryCollection, not a MultiPolygon.

    The default behaviour of this class is simply to recursively transform each Geometry component into an identical object by deep copying down to the level of, but not including, coordinates.

    All transformX methods may return null, to avoid creating empty or invalid geometry objects. This will be handled correctly by the transformer. transformXXX methods should always return valid geometry - if they cannot do this they should return null (for instance, it may not be possible for a transformLineString implementation to return at least two points - in this case, it should return null). The {link #transform(Geometry)} method itself will always return a non-null Geometry object (but this may be empty).

    Version

    1.7

    See also

    GeometryEditor

  9. class LineStringExtracter extends GeometryFilter
  10. class LinearComponentExtracter extends GeometryComponentFilter
  11. class NoninvertibleTransformationException extends Exception

    Indicates that an {link AffineTransformation} is non-invertible.

  12. class PointExtracter extends GeometryFilter
  13. class PolygonExtracter extends GeometryFilter
  14. abstract class ShortCircuitedGeometryVisitor extends AnyRef

    A visitor to {link Geometry} components, which allows short-circuiting when a defined condition holds.

    A visitor to {link Geometry} components, which allows short-circuiting when a defined condition holds.

    Version

    1.7

  15. class SineStarFactory extends GeometricShapeFactory

Value Members

  1. object AffineTransformation

    Represents an affine transformation on the 2D Cartesian plane.

    Represents an affine transformation on the 2D Cartesian plane. It can be used to transform a {link Coordinate} or {link Geometry}. An affine transformation is a mapping of the 2D plane into itself via a series of transformations of the following basic types:

    • reflection (through a line)
    • rotation (around the origin)
    • scaling (relative to the origin)
    • shearing (in both the X and Y directions)
    • translation

    In general, affine transformations preserve straightness and parallel lines, but do not preserve distance or shape.

    An affine transformation can be represented by a 3x3 matrix in the following form:

    T = | m00 m01 m02 |
    | m10 m11 m12 |
    |  0   0   1  |
    
    A coordinate P = (x, y) can be transformed to a new coordinate P' = (x', y') by representing it as a 3x1 matrix and using matrix multiplication to compute:
    | x' |  = T x | x |
    | y' |        | y |
    | 1  |        | 1 |
    

    Transformation Composition

    Affine transformations can be composed using the {link #compose} method. Composition is computed via multiplication of the transformation matrices, and is defined as:

    A.compose(B) = TB x TA
    
    This produces a transformation whose effect is that of A followed by B. The methods {link #reflect}, {link #rotate}, {link #scale}, {link #shear}, and {link #translate} have the effect of composing a transformation of that type with the transformation they are invoked on.

    The composition of transformations is in general not commutative.

    Transformation Inversion

    Affine transformations may be invertible or non-invertible. If a transformation is invertible, then there exists an inverse transformation which when composed produces the identity transformation. The {link #getInverse} method computes the inverse of a transformation, if one exists.

  2. object AffineTransformationFactory

    Supports creating {link AffineTransformation}s defined by various kinds of inputs and transformation mapping rules.

  3. object ComponentCoordinateExtracter

    Extracts a representative {link Coordinate} from each connected component of a {link Geometry}.

    Extracts a representative {link Coordinate} from each connected component of a {link Geometry}.

    Version

    1.9

  4. object GeometryCollectionMapper

    Maps the members of a {link GeometryCollection} into another GeometryCollection via a defined mapping function.

  5. object GeometryCombiner

    Combines {link Geometry}s to produce a {link GeometryCollection} of the most appropriate type.

    Combines {link Geometry}s to produce a {link GeometryCollection} of the most appropriate type. Input geometries which are already collections will have their elements extracted first. No validation of the result geometry is performed. (The only case where invalidity is possible is where {link Polygonal} geometries are combined and result in a self-intersection).

    See also

    GeometryFactory#buildGeometry

  6. 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.
    Version

    1.7

    See also

    GeometryTransformer

    Geometry#isValid

  7. object GeometryExtracter

    Extracts the components of a given type from a {link Geometry}.

    Extracts the components of a given type from a {link Geometry}.

    Version

    1.7

  8. object GeometryMapper

    Methods to map various collections of {link Geometry}s via defined mapping functions.

  9. object LineStringExtracter

    Extracts all the {link LineString} elements from a {link Geometry}.

    Extracts all the {link LineString} elements from a {link Geometry}.

    Version

    1.7

    See also

    GeometryExtracter

  10. object LinearComponentExtracter

    Extracts all the 1-dimensional ({link LineString}) components from a {link Geometry}.

    Extracts all the 1-dimensional ({link LineString}) components from a {link Geometry}. For polygonal geometries, this will extract all the component {link LinearRing}s. If desired, LinearRings can be forced to be returned as LineStrings.

    Version

    1.7

  11. object PointExtracter

    Extracts all the 0-dimensional ({link Point}) components from a {link Geometry}.

    Extracts all the 0-dimensional ({link Point}) components from a {link Geometry}.

    Version

    1.7

    See also

    GeometryExtracter

  12. object PolygonExtracter

    Extracts all the {link Polygon} elements from a {link Geometry}.

    Extracts all the {link Polygon} elements from a {link Geometry}.

    Version

    1.7

    See also

    GeometryExtracter

  13. object SineStarFactory

    Creates geometries which are shaped like multi-armed stars with each arm shaped like a sine wave.

    Creates geometries which are shaped like multi-armed stars with each arm shaped like a sine wave. These kinds of geometries are useful as a more complex geometry for testing algorithms.

Ungrouped