dart_jts library
Entry point for the dart_jts library.
Classes
- AbstractNode
- A node of an {@link AbstractSTRtree}. A node is one of:
- AbstractSTRtree
- Base class for STRtree and SIRtree. STR-packed R-trees are described in: P. Rigaux, Michel Scholl and Agnes Voisard. Spatial Databases With Application To GIS. Morgan Kaufmann, San Francisco, 2002.
- AffineTransformation
- 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:
- AffineTransformationBuilder
- 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.
- AffineTransformationFactory
- Supports creating {@link AffineTransformation}s defined by various kinds of inputs and transformation mapping rules.
- AffineTransformationFunctions
- Angle
- Utility functions for working with angles. Unless otherwise noted, methods in this class express angles in radians.
- Area
- Functions for computing area.
- ArrayListVisitor
- Builds an array of all visited items.
- Assert
- A utility for making programming assertions.
-
AvlTree<
T> - Taken from https://github.com/Gubaer/dart-avl-tree
- Boundable
- A spatial object in an AbstractSTRtree.
- BoundablePair
- A pair of {@link Boundable}s, whose leaf items support a distance metric between them. Used to compute the distance between the members, and to expand a member relative to the other in order to produce new branches of the Branch-and-Bound evaluation tree. Provides an ordering based on the distance between the members, which allows building a priority queue by minimum distance.
- BoundaryNodeRule
- An interface for rules which determine whether node points which are in boundaries of {@link Lineal} geometry components are in the boundary of the parent geometry collection. The SFS specifies a single kind of boundary node rule, the {@link Mod2BoundaryNodeRule} rule. However, other kinds of Boundary Node Rules are appropriate in specific situations (for instance, linear network topology usually follows the {@link EndPointBoundaryNodeRule}.) Some JTS operations (such as {@link RelateOp}, {@link BoundaryOp} and {@link IsSimpleOp}) allow the BoundaryNodeRule to be specified, and respect the supplied rule when computing the results of the operation.
- BoundaryOp
- Computes the boundary of a {@link Geometry}. This operation will always return a {@link Geometry} of the appropriate dimension for the boundary (even if the input geometry is empty). The boundary of zero-dimensional geometries (Points) is always the empty {@link GeometryCollection}.
- BufferBuilder
- Builds the buffer geometry for a given input geometry and precision model. Allows setting the level of approximation for circular arcs, and the precision model in which to carry out the computation.
- BufferCurveSetBuilder
- Creates all the raw offset curves for a buffer of a {@link Geometry}. Raw curves need to be noded together and polygonized to form the final buffer area.
- BufferDistanceValidator
- Validates that a given buffer curve lies an appropriate distance from the input generating it. Useful only for round buffers (cap and join). Can be used for either positive or negative distances.
- BufferInputLineSimplifier
- Simplifies a buffer input line to remove concavities with shallow depth.
- BufferOp
- Computes the buffer of a geometry, for both positive and negative buffer distances.
- BufferParameters
- A value class containing the parameters which specify how a buffer should be constructed.
- BufferResultValidator
- Validates that the result of a buffer operation is geometrically correct, within a computed tolerance.
- BufferSubgraph
- A connected subset of the graph of {@link DirectedEdge}s and {@link Node}s. Its edges will generate either
- ByteOrderDataInStream
- Allows reading a stream of Java primitive datatypes from an underlying {@link InStream}, with the representation being in either common byte ordering.
- Byteutils
- CellLEC
- A square grid cell centered on a given point with a given side half-length, and having a given distance from the center point to the constraints. The maximum possible distance from any point in the cell to the constraints can be computed. This is used as the ordering and upper-bound function in the branch-and-bound algorithm.
- CellMIC
- A square grid cell centered on a given point, with a given half-side size, and having a given distance to the area boundary. The maximum possible distance from any point in the cell to the boundary can be computed, and is used as the ordering and upper-bound function in the branch-and-bound algorithm.
- Centroid
-
Computes the centroid of a {@link Geometry} of any dimension.
If the geometry is nominally of higher dimension,
but has lower effective dimension
(i.e. contains only components
having zero length or area),
the centroid will be computed as for the equivalent lower-dimension geometry.
If the input geometry is empty, a
null
Coordinate is returned. - CGAlgorithmsDD
- Implements basic computational geometry algorithms using {@link DD} arithmetic.
- CheckOrdinatesFilter
- A filter implementation to test if a coordinate sequence actually has meaningful values for an ordinate bit-pattern
- CollectionsUtils
- Utilities for collections
- ConnectedElementLocationFilter
- A ConnectedElementPointFilter extracts a single point from each connected element in a Geometry (e.g. a polygon, linestring or point) and returns them in a list. The elements of the list are {@link org.locationtech.jts.operation.distance.GeometryLocation}s.
- ConnectedInteriorTester
- This class tests that the interior of an area {@link Geometry} ( {@link Polygon} or {@link MultiPolygon} ) is connected. This can happen if:
- ConsistentAreaTester
- Checks that a {@link GeometryGraph} representing an area (a {@link Polygon} or {@link MultiPolygon} ) has consistent semantics for area geometries. This check is required for any reasonable polygonal model (including the OGC-SFS model, as well as models which allow ring self-intersection at single points)
- ConvexHull
- Computes the convex hull of a {@link Geometry}. The convex hull is the smallest convex Geometry that contains all the points in the input Geometry.
- Coordinate
- A lightweight class used to store coordinates on the 2-dimensional Cartesian plane.
- CoordinateArrays
- Useful utility functions for handling Coordinate arrays
- CoordinateArraySequence
- A {@link CoordinateSequence} backed by an array of {@link Coordinate}s. This is the implementation that {@link Geometry}s use by default. Coordinates returned by #toArray and #getCoordinate are live -- modifications to them are actually changing the CoordinateSequence's underlying data. A dimension may be specified for the coordinates in the sequence, which may be 2 or 3. The actual coordinates will always have 3 ordinates, but the dimension is useful as metadata in some situations.
- CoordinateArraySequenceFactory
- Creates {@link CoordinateSequence}s represented as an array of {@link Coordinate}s.
- CoordinateFilter
- An interface for classes which use the values of the coordinates in a {@link Geometry}. Coordinate filters can be used to implement centroid and envelope computation, and many other functions.
- CoordinateList
- A list of {@link Coordinate}s, which may be set to prevent repeated coordinates from occurring in the list.
- CoordinateOperation
- A {@link GeometryEditorOperation} which edits the coordinate list of a {@link Geometry}. Operates on Geometry subclasses which contains a single coordinate list.
- Coordinates
- Useful utility functions for handling Coordinate objects.
- CoordinateSequence
- // Coordinate subclass supporting XY ordinate. //
- CoordinateSequenceComparatorBuilder
- Compares two {@link CoordinateSequence}s. For sequences of the same dimension, the ordering is lexicographic. Otherwise, lower dimensions are sorted before higher. The dimensions compared can be limited; if this is done ordinate dimensions above the limit will not be compared.
- CoordinateSequenceFactory
- A factory to create concrete instances of {@link CoordinateSequence}s. Used to configure {@link GeometryFactory}s to provide specific kinds of CoordinateSequences.
- CoordinateSequenceFilter
-
An interface for classes which process the coordinates in a {@link CoordinateSequence}.
A filter can either record information about each coordinate,
or change the value of the coordinate.
Filters can be
used to implement operations such as coordinate transformations, centroid and
envelope computation, and many other functions.
{@link Geometry} classes support the concept of applying a
CoordinateSequenceFilter
to each {@link CoordinateSequence}s they contain. - CoordinateSequenceOperation
- A {@link GeometryEditorOperation} which edits the {@link CoordinateSequence} of a {@link Geometry}. Operates on Geometry subclasses which contains a single coordinate list.
- CoordinateSequences
- Utility functions for manipulating {@link CoordinateSequence}s
- CoordinateXY
- Coordinate subclass supporting XY ordinates.
- CoordinateXYM
- Coordinate subclass supporting XYM ordinates.
- CoordinateXYZM
- Coordinate subclass supporting XYZM ordinates.
- CoordSeqCloneOp
- Counter
- Stores an integer count, for use as a Map entry.
- DD
- Implements extended-precision floating-point numbers which maintain 106 bits (approximately 30 decimal digits) of precision.
- Depth
- A Depth object records the topological depth of the sides of an Edge for up to two Geometries. @version 1.7
- DepthSegment
- A segment from a directed edge which has been assigned a depth value for its sides.
- Dimension
- Provides constants representing the dimensions of a point, a curve and a surface. Also provides constants representing the dimensions of the empty geometry and non-empty geometries, and the wildcard constant {@link #DONTCARE} meaning "any dimension". These constants are used as the entries in {@link IntersectionMatrix}s.
- DirectedEdge
- @version 1.7
- DirectedEdgeStar
- A DirectedEdgeStar is an ordered list of outgoing DirectedEdges around a node. It supports labelling the edges as well as linking the edges to form both MaximalEdgeRings and MinimalEdgeRings.
- DiscreteHausdorffDistance
- An algorithm for computing a distance metric which is an approximation to the Hausdorff Distance based on a discretization of the input {@link Geometry}. The algorithm computes the Hausdorff distance restricted to discrete points for one of the geometries. The points can be either the vertices of the geometries (the default), or the geometries with line segments densified by a given fraction. Also determines two points of the Geometries which are separated by the computed distance.
- Distance
- Functions to compute distance between basic geometric structures.
- DistanceOp
- Find two points on two {@link Geometry}s which lie within a given distance, or else are the nearest points on the geometries (in which case this also provides the distance between the geometries).
- DistanceToPoint
- Computes the Euclidean distance (L2 metric) from a {@link Coordinate} to a {@link Geometry}. Also computes two points on the geometry which are separated by the distance found.
- Double
- Packed coordinate sequence implementation based on doubles
- DoubleBits
- DouglasPeuckerLineSimplifier
- DouglasPeuckerSimplifier
- Simplifies a {@link Geometry} using the Douglas-Peucker algorithm. Ensures that any polygonal geometries returned are valid. Simple lines are not guaranteed to remain simple after simplification. All geometry types are handled. Empty and point geometries are returned unchanged. Empty geometry components are deleted.
- DPTransformer
- Edge
- @version 1.7
- EdgeEnd
- Models the end of an edge incident on a node. EdgeEnds have a direction determined by the direction of the ray from the initial point to the next point. EdgeEnds are comparable under the ordering "a has a greater angle with the x-axis than b". This ordering is used to sort EdgeEnds around a node. @version 1.7
- EdgeEndBuilder
- Computes the {@link EdgeEnd}s which arise from a noded {@link Edge}.
- EdgeEndBundle
- A collection of {@link EdgeEnd}s which obey the following invariant: They originate at the same node and have the same direction.
- EdgeEndBundleStar
- An ordered list of {@link EdgeEndBundle}s around a {@link RelateNode}. They are maintained in CCW order (starting with the positive x-axis) around the node for efficient lookup and topology building.
- EdgeEndStar
- A EdgeEndStar is an ordered list of EdgeEnds around a node. They are maintained in CCW order (starting with the positive x-axis) around the node for efficient lookup and topology building.
- EdgeIntersection
- Represents a point on an edge which intersects with another edge.
- EdgeIntersectionList
- A list of edge intersections along an {@link Edge}. Implements splitting an edge with intersections into multiple resultant edges.
- EdgeList
- A EdgeList is a list of Edges. It supports locating edges that are pointwise equals to a target edge. @version 1.7
- EdgeRing
- @version 1.7
- EdgeSetIntersector
- An EdgeSetIntersector computes all the intersections between the edges in the set. It adds the computed intersections to each edge they are found on. It may be used in two scenarios:
- EGeometryType
- This file contains code that has not been ported from the JTS project. Geometry types used by the utility.
- EndPointBoundaryNodeRule
- A {@link BoundaryNodeRule} which specifies that any points which are endpoints of lineal components are in the boundary of the parent geometry. This corresponds to the "intuitive" topological definition of boundary. Under this rule {@link LinearRing}s have a non-empty boundary (the common endpoint of the underlying LineString).
- EndpointInfo
- Envelope
- EnvelopeDistance
- Functions for computing distances between {@link Envelope}s.
- EnvelopeIntersectsOp
- EnvelopeIntersectsVisitor
- Tests whether it can be concluded that a rectangle intersects a geometry, based on the relationship of the envelope(s) of the geometry.
- ExtractLineByLocation
- Extracts the subline of a linear {@link Geometry} between two {@link LinearLocation}s on the line.
- FacetSequence
- FacetSequenceDistance
- FacetSequenceTreeBuilder
- FacetSequenceTreeFilter
- FormattingUtils
- Geodesy
- The main geodesy class
- Geometry
- A representation of a planar, linear vector geometry.
- GeometryChangedFilter
- GeometryCollection
- Models a collection of {@link Geometry}s of arbitrary type and dimension.
- GeometryCollectionIterator
-
Iterates over all {@link Geometry}s in a {@link Geometry},
(which may be either a collection or an atomic geometry).
The iteration sequence follows a pre-order, depth-first traversal of the
structure of the
GeometryCollection
(which may be nested). The originalGeometry
object is returned as well (as the first object), as are all sub-collections and atomic elements. It is simple to ignore the intermediateGeometryCollection
objects if they are not needed. - GeometryComponentFilter
-
Geometry
classes support the concept of applying aGeometryComponentFilter
filter to theGeometry
. The filter is applied to every component of theGeometry
which is itself aGeometry
and which does not itself contain any components. (For instance, all the {@link LinearRing}s in {@link Polygon}s are visited, but in a {@link MultiPolygon} the {@link Polygon}s themselves are not visited.) Thus the only classes of Geometry which must be handled as arguments to {@link #filter} are {@link LineString}s, {@link LinearRing}s and {@link Point}s. - GeometryContainsPointVisitor
- A visitor which tests whether it can be concluded that a geometry contains a vertex of a query geometry.
- GeometryEditor
- 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.
- GeometryEditorOperation
- A interface which specifies an edit operation for Geometries.
- GeometryFactory
- GeometryFilter
-
GeometryCollection
classes support the concept of applying aGeometryFilter
to theGeometry
. The filter is applied to every elementGeometry
. AGeometryFilter
can either record information about theGeometry
or change theGeometry
in some way.GeometryFilter
is an example of the Gang-of-Four Visitor pattern. - GeometryGraph
- A GeometryGraph is a graph that models a given Geometry @version 1.7
- GeometryGraphOperation
- The base class for operations that require {@link GeometryGraph}s.
- GeometryLocation
- Represents the location of a point on a Geometry. Maintains both the actual point location (which may not be exact, if the point is not a vertex) as well as information about the component and segment index where the point occurs. Locations inside area Geometrys will not have an associated segment index, so in this case the segment index will have the sentinel value of {@link #INSIDE_AREA}.
- GeometryTransformer
-
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. - GraphComponent
- A GraphComponent is the parent class for the objects' that form a graph. Each GraphComponent can carry a Label. @version 1.7
- HCoordinate
- Represents a homogeneous coordinate in a 2-D coordinate space. In JTS {@link HCoordinate}s are used as a clean way of computing intersections between line segments.
- HexCodec
- A codec for encoding and decoding byte arrays to and from hexadecimal strings.
- HexDecoder
- A converter to decode hexadecimal strings into byte arrays.
- HexEncoder
- A converter to encode byte arrays into hexadecimal strings.
- HotPixel
- Implements a "hot pixel" as used in the Snap Rounding algorithm. A hot pixel contains the interior of the tolerance square and the boundary minus the top and right segments.
- HotPixelSnapAction
- IndexedDistanceToPoint
- IndexedFacetDistance
- Computes the distance between the facets (segments and vertices) of two {@link Geometry}s using a Branch-and-Bound algorithm. The Branch-and-Bound algorithm operates over a traversal of R-trees built on the target and the query geometries.
- IndexedNestedRingTester
- Tests whether any of a set of {@link LinearRing}s are nested inside another ring in the set, using a spatial index to speed up the comparisons.
- IndexedPointInAreaLocator
- Determines the {@link Location} of {@link Coordinate}s relative to an areal geometry, using indexing for efficiency. This algorithm is suitable for use in cases where many points will be tested against a given area.
- IndexedPointInPolygonsLocator
- Determines the location of a point in the polygonal elements of a geometry. Uses spatial indexing to provide efficient performance.
- InteriorIntersectionFinderAdder
- Finds interior intersections between line segments in {@link NodedSegmentString}s, and adds them as nodes using {@link NodedSegmentString#addIntersection(LineIntersector, int, int, int)}.
- Intersection
- Contains functions to compute intersections between lines.
- IntersectionAdder
- Computes the possible intersections between two line segments in {@link NodedSegmentString}s and adds them to each string using {@link NodedSegmentString#addIntersection(LineIntersector, int, int, int)}.
- IntersectionMatrix
- Models a Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix. DE-9IM matrices (such as "212FF1FF2") specify the topological relationship between two {@link Geometry}s. This class can also represent matrix patterns (such as "TT*****") which are used for matching instances of DE-9IM matrices.
- IntersectsOp
- A test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds.
- IntervalIndexedGeometry
- IntervalRTreeBranchNode
- IntervalRTreeLeafNode
- IntervalRTreeNode
- IntervalSize
- IsSimpleOp
-
Tests whether a
Geometry
is simple. In general, the SFS specification of simplicity follows the rule: - IsValidOp
-
Implements the algorithms required to compute the
isValid()
method for {@link Geometry}s. See the documentation for the various geometry types for a specification of validity. - ItemBoundable
- Boundable wrapper for a non-Boundable spatial object. Used internally by AbstractSTRtree.
- ItemDistance
- A function method which computes the distance between two {@link ItemBoundable}s in an {@link STRtree}. Used for Nearest Neighbour searches.
- ItemVisitor
- A visitor for items in a {@link SpatialIndex}.
- Key
- Label
-
A
Label
indicates the topological relationship of a component of a topology graph to a givenGeometry
. This class supports labels for relationships to twoGeometry
s, which is sufficient for algorithms for binary operations. - LargestEmptyCircle
- Constructs the Largest Empty Circle for a set of obstacle geometries, up to a given accuracy distance tolerance. The obstacles may be any combination of point, linear and polygonal geometries.
- Length
- Functions for computing length.
- LengthIndexedLine
- Supports linear referencing along a linear {@link Geometry} using the length along the line as the index. Negative length values are taken as measured in the reverse direction from the end of the geometry. Out-of-range index values are handled by clamping them to the valid range of values. Non-simple lines (i.e. which loop back to cross or touch themselves) are supported.
- LengthIndexOfPoint
- Computes the length index of the point on a linear {@link Geometry} nearest a given {@link Coordinate}. The nearest point is not necessarily unique; this class always computes the nearest point closest to the start of the geometry.
- LengthLocationMap
- Computes the {@link LinearLocation} for a given length along a linear {@link Geometry}. Negative lengths are measured in reverse from end of the linear geometry. Out-of-range values are clamped.
- Lineal
- Identifies {@link Geometry} subclasses which are 1-dimensional and have components which are {@link LineString}s.
- LinearComponentExtracter
-
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,
LinearRing
s can be forced to be returned asLineString
s. - LinearGeometryBuilder
- Builds a linear geometry ({@link LineString} or {@link MultiLineString}) incrementally (point-by-point).
- LinearIterator
- An iterator over the components and coordinates of a linear geometry ({@link LineString}s and {@link MultiLineString}s.
- LinearLocation
- Represents a location along a {@link LineString} or {@link MultiLineString}. The referenced geometry is not maintained within this location, but must be provided for operations which require it. Various methods are provided to manipulate the location value and query the geometry it references.
- LinearRing
-
Models an OGC SFS
LinearRing
. ALinearRing
is a {@link LineString} which is both closed and simple. In other words, the first and last coordinate in the ring must be equal, and the interior of the ring must not self-intersect. Either orientation of the ring is allowed. - LineIntersector
-
A
LineIntersector
is an algorithm that can both test whether two line segments intersect and compute the intersection point(s) if they do. - LineSegment
- Represents a line segment defined by two {@link Coordinate}s. Provides methods to compute various geometric properties and relationships of line segments.
- LineSegmentIndex
- LineSegmentVisitor
- ItemVisitor subclass to reduce volume of query results.
- LineString
-
Models an OGC-style
LineString
. A LineString consists of a sequence of two or more vertices, along with all points along the linearly-interpolated curves (line segments) between each pair of consecutive vertices. Consecutive vertices may be equal. The line segments in the line may intersect each other (in other words, the linestring may "curl back" in itself and self-intersect. Linestrings with exactly two identical points are invalid. - LineStringMapBuilderFilter
- A filter to add linear geometries to the linestring map with the appropriate minimum size constraint. Closed {@link LineString}s (including {@link LinearRing}s have a minimum output size constraint of 4, to ensure the output is valid. For all other linestrings, the minimum size is 2 points.
- LineStringTransformer
- Location
- Constants representing the different topological locations which can occur in a {@link Geometry}. The constants are also used as the row and column indices of DE-9IM {@link IntersectionMatrix}es.
- LocationIndexedLine
- Supports linear referencing along a linear {@link Geometry} using {@link LinearLocation}s as the index.
- LocationIndexOfLine
- Determines the location of a subline along a linear {@link Geometry}. The location is reported as a pair of {@link LinearLocation}s.
- LocationIndexOfPoint
- Computes the {@link LinearLocation} of the point on a linear {@link Geometry} nearest a given {@link Coordinate}. The nearest point is not necessarily unique; this class always computes the nearest point closest to the start of the geometry.
- MathUtils
- Matrix
- Implements some 2D matrix operations (in particular, solving systems of linear equations).
- MatrixUtils
- MaxDensifiedByFractionDistanceFilter
- MaximalEdgeRing
- A ring of {@link DirectedEdge}s which may contain nodes of degree > 2. A MaximalEdgeRing may represent two different spatial entities:
- MaximumInscribedCircle
- MaxPointDistanceFilter
- MCIndexNoder
-
Nodes a set of {@link SegmentString}s using a index based
on {@link MonotoneChain}s and a {@link SpatialIndex}.
The {@link SpatialIndex} used should be something that supports
envelope (range) queries efficiently (such as a
Quadtree
} or {@link STRtree} (which is the default index provided). - MCIndexPointSnapper
- "Snaps" all {@link SegmentString}s in a {@link SpatialIndex} containing {@link MonotoneChain}s to a given {@link HotPixel}.
- MCIndexSnapRounder
- Uses Snap Rounding to compute a rounded, fully noded arrangement from a set of {@link SegmentString}s. Implements the Snap Rounding technique described in papers by Hobby, Guibas & Marimont, and Goodrich et al. Snap Rounding assumes that all vertices lie on a uniform grid; hence the precision model of the input must be fixed precision, and all the input vertices must be rounded to that precision.
- MinimalEdgeRing
- A ring of {@link Edge}s with the property that no node has degree greater than 2. These are the form of rings required to represent polygons under the OGC SFS spatial data model.
- Mod2BoundaryNodeRule
- A {@link BoundaryNodeRule} specifies that points are in the boundary of a lineal geometry iff the point lies on the boundary of an odd number of components. Under this rule {@link LinearRing}s and closed {@link LineString}s have an empty boundary.
- MonotoneChain
- @version 1.7
- MonotoneChainBuilder
- Constructs {@link MonotoneChain}s for sequences of {@link Coordinate}s.
- MonotoneChainEdge
- MonotoneChains are a way of partitioning the segments of an edge to allow for fast searching of intersections. They have the following properties:
- MonotoneChainI
- Monotone Chains are a way of partitioning the segments of a linestring to allow for fast searching of intersections. They have the following properties:
- MonotoneChainIndexer
- MonotoneChains are a way of partitioning the segments of an edge to allow for fast searching of intersections. Specifically, a sequence of contiguous line segments is a monotone chain iff all the vectors defined by the oriented segments lies in the same quadrant.
- MonotoneChainIVisitor
- MonotoneChainOverlapAction
- The action for the internal iterator for performing overlap queries on a MonotoneChain
- MonotoneChainSelectAction
- The action for the internal iterator for performing envelope select queries on a MonotoneChain
- MonoValentEndPointBoundaryNodeRule
- A {@link BoundaryNodeRule} which determines that only endpoints with valency of exactly 1 are on the boundary. This corresponds to the boundary of a {@link MultiLineString} being all the "unattached" endpoints.
- MultiLineString
- Models a collection of {@link LineString}s.
- MultiPoint
- Models a collection of {@link Point}s.
- MultiPolygon
- Models a collection of {@link Polygon}s.
- MultiValentEndPointBoundaryNodeRule
- A {@link BoundaryNodeRule} which determines that only endpoints with valency greater than 1 are on the boundary. This corresponds to the boundary of a {@link MultiLineString} being all the "attached" endpoints, but not the "unattached" ones.
- NodableSegmentString
- An interface for classes which support adding nodes to a segment string.
- Node
- @version 1.7
- NodeBase
- NodedSegmentString
- Represents a list of contiguous line segments, and supports noding the segments. The line segments are represented by an array of {@link Coordinate}s. Intended to optimize the noding of contiguous segments by reducing the number of allocated objects. SegmentStrings can carry a context object, which is useful for preserving topological or parentage information. All noded substrings are initialized with the same context object.
- NodeFactory
- @version 1.7
- NodeMap
- A map of nodes, indexed by the coordinate of the node @version 1.7
- NodeNode
- Noder
- Computes all intersections between segments in a set of {@link SegmentString}s. Intersections found are represented as {@link SegmentNode}s and added to the {@link SegmentString}s in which they occur. As a final step in the noding a new set of segment strings split at the nodes may be returned.
- NodeVertexIterator
- NodingValidator
- Validates that a collection of {@link SegmentString}s is correctly noded. Throws an appropriate exception if an noding error is found.
- NoOpGeometryOperation
- A GeometryEditorOperation which does not modify the input geometry. This can be used for simple changes of GeometryFactory (including PrecisionModel and SRID).
- NumberUtils
- Octant
- Methods for computing and working with octants of the Cartesian plane Octants are numbered as follows:
- OffsetCurveBuilder
- Computes the raw offset curve for a single {@link Geometry} component (ring, line or point). A raw offset curve line is not noded - it may contain self-intersections (and usually will). The final buffer polygon is computed by forming a topological graph of all the noded raw curves and tracing outside contours. The points in the raw curve are rounded to a given {@link PrecisionModel}.
- OffsetCurveSetBuilder
- Creates all the raw offset curves for a buffer of a {@link Geometry}. Raw curves need to be noded together and polygonized to form the final buffer area.
- OffsetSegmentGenerator
- Generates segments which form an offset curve. Supports all end cap and join options provided for buffering. This algorithm implements various heuristics to produce smoother, simpler curves which are still within a reasonable tolerance of the true curve.
- OffsetSegmentString
- A dynamic list of the vertices in a constructed offset curve. Automatically removes adjacent vertices which are closer than a given tolerance.
- Orientation
- Functions to compute the orientation of basic geometric structures including point triplets (triangles) and rings. Orientation is a fundamental property of planar geometries (and more generally geometry on two-dimensional manifolds).
- OrientedCoordinateArray
- Allows comparing {@link Coordinate} arrays in an orientation-independent way.
- OverlayNodeFactory
- Creates nodes for use in the {@link PlanarGraph}s constructed during overlay operations.
- PackedCoordinateSequence
- A {@link CoordinateSequence} implementation based on a packed arrays. In this implementation, {@link Coordinate}s returned by #toArray and #get are copies of the internal values. To change the actual values, use the provided setters.
- PackedCoordinateSequenceFactory
-
Builds packed array coordinate sequences.
The array data type can be either
double
orfloat
, and defaults todouble
. - PlanarGraph
-
The computation of the
IntersectionMatrix
relies on the use of a structure called a "topology graph". The topology graph contains nodes and edges corresponding to the nodes and line segments of aGeometry
. Each node and edge in the graph is labeled with its topological location relative to the source geometry. - Point
- Represents a single point.
- PointExtracter
- Extracts all the 0-dimensional ({@link Point}) components from a {@link Geometry}.
- PointLocation
- Functions for locating points within basic geometric structures such as lines and rings.
- PointLocator
- Computes the topological ({@link Location}) of a single point to a {@link Geometry}. A {@link BoundaryNodeRule} may be specified to control the evaluation of whether the point lies on the boundary or not The default rule is to use the the SFS Boundary Determination Rule
- PointOnGeometryLocator
- An interface for classes which determine the {@link Location} of points in a {@link Geometry}.
- PointPairDistance
- Contains a pair of points and the distance between them. Provides methods to update with a new point pair with either maximum or minimum distance.
- Polygon
- Represents a polygon with linear edges, which may include holes. The outer boundary (shell) and inner boundaries (holes) of the polygon are represented by {@link LinearRing}s. The boundary rings of the polygon may have any orientation. Polygons are closed, simple geometries by definition.
- Polygonal
- Identifies {@link Geometry} subclasses which are 2-dimensional and have components which have {@link Lineal} boundaries.
- PolygonBuilder
- Forms {@link Polygon}s out of a graph of {@link DirectedEdge}s. The edges to use are marked as being in the result Area.
- PolygonExtracter
- Extracts all the {@link Polygon} elements from a {@link Geometry}.
- Position
- A Position indicates the position of a Location relative to a graph component (Node, Edge, or Area). @version 1.7
- PrecisionModel
-
Specifies the precision model of the {@link Coordinate}s in a {@link Geometry}.
In other words, specifies the grid of allowable
points for all
Geometry
s. - PriorityQueue
- A priority queue over a set of {@link Comparable} objects.
- Puntal
- Identifies {@link Geometry} subclasses which are 0-dimensional and with components which are {@link Point}s.
- Quadrant
- Utility functions for working with quadrants, which are numbered as follows:
- Quadtree
- RadialComparator
- Compares {@link Coordinate}s for their angle and distance relative to an origin.
- RayCrossingCounter
- Counts the number of segments crossed by a horizontal ray extending to the right from a given point, in an incremental fashion. This can be used to determine whether a point lies in a {@link Polygonal} geometry. The class determines the situation where the point lies exactly on a segment. When being used for Point-In-Polygon determination, this case allows short-circuiting the evaluation.
- RectangleContains
- Optimized implementation of the contains spatial predicate for cases where the first {@link Geometry} is a rectangle. This class works for all input geometries, including {@link GeometryCollection}s.
- RectangleIntersects
- Implementation of the intersects spatial predicate optimized for the case where one {@link Geometry} is a rectangle. This class works for all input geometries, including {@link GeometryCollection}s.
- RectangleIntersectsSegmentVisitor
- A visitor to test for intersection between the query rectangle and the line segments of the geometry.
- RectangleLineIntersector
- Computes whether a rectangle intersects line segments.
- RelateComputer
- Computes the topological relationship between two Geometries.
- RelateNode
- Represents a node in the topological graph used to compute spatial relationships.
- RelateNodeFactory
- Used by the {@link NodeMap} in a {@link RelateNodeGraph} to create {@link RelateNode}s.
- RelateNodeGraph
- Implements the simple graph of Nodes and EdgeEnd which is all that is required to determine topological relationships between Geometries. Also supports building a topological graph of a single Geometry, to allow verification of valid topology.
- RelateOp
- Implements the SFS relate() generalized spatial predicate on two {@link Geometry}s.
- RightmostEdgeFinder
- A RightmostEdgeFinder find the DirectedEdge in a list which has the highest coordinate, and which is oriented L to R at that point. (I.e. the right side is on the RHS of the edge.)
- RobustLineIntersector
- A robust version of {@link LineIntersector}.
- Root
- ScaledNoder
- Wraps a {@link Noder} and transforms its input into the integer domain. This is intended for use with Snap-Rounding noders, which typically are only intended to work in the integer domain. Offsets can be provided to increase the number of digits of available precision.
- SegmentIntersector
- Computes the intersection of line segments, and adds the intersection to the edges containing the segments.
- SegmentIntersectorN
- Processes possible intersections detected by a {@link Noder}. The {@link SegmentIntersector} is passed to a {@link Noder}. The {@link SegmentIntersector#processIntersections(SegmentString, int, SegmentString, int)} method is called whenever the {@link Noder} detects that two SegmentStrings might intersect. This class may be used either to find all intersections, or to detect the presence of an intersection. In the latter case, Noders may choose to short-circuit their computation by calling the {@link #isDone()} method. This class is an example of the Strategy pattern.
- SegmentNode
- Represents an intersection point between two {@link SegmentString}s.
- SegmentNodeList
- A list of the {@link SegmentNode}s present along a noded {@link SegmentString}.
- SegmentOverlapAction
- SegmentPointComparator
- Implements a robust method of comparing the relative position of two points along the same segment. The coordinates are assumed to lie "near" the segment. This means that this algorithm will only return correct results if the input coordinates have the same precision and correspond to rounded values of exact coordinates lying on the segment.
- SegmentString
- An interface for classes which represent a sequence of contiguous line segments. SegmentStrings can carry a context object, which is useful for preserving topological or parentage information.
- SegmentVisitor
- ShortCircuitedGeometryVisitor
- A visitor to {@link Geometry} components, which allows short-circuiting when a defined condition holds.
- SimpleMCSweepLineIntersector
- Finds all intersections in one or two sets of edges, using an x-axis sweepline algorithm in conjunction with Monotone Chains. While still O(n^2) in the worst case, this algorithm drastically improves the average-case time. The use of MonotoneChains as the items in the index seems to offer an improvement in performance over a sweep-line alone.
- SimplePointInAreaLocator
- Computes the location of points relative to a {@link Polygonal} {@link Geometry}, using a simple O(n) algorithm.
- SinglePassNoder
- Base class for {@link Noder}s which make a single pass to find intersections. This allows using a custom {@link SegmentIntersector} (which for instance may simply identify intersections, rather than insert them).
- SortedPackedIntervalRTree
- A static index on a set of 1-dimensional intervals, using an R-Tree packed based on the order of the interval midpoints. It supports range searching, where the range is an interval of the real line (which may be a single point). A common use is to index 1-dimensional intervals which are the projection of 2-D objects onto an axis of the coordinate system.
- SpatialIndex
- The basic operations supported by classes implementing spatial index algorithms.
- StringUtils
- STRtree
- A query-only R-tree created using the Sort-Tile-Recursive (STR) algorithm. For two-dimensional spatial data.
- STRtreeNode
- SubgraphDepthLocater
- Locates a subgraph inside a set of subgraphs, in order to determine the outside depth of the subgraph. The input subgraphs are assumed to have had depths already calculated for their edges.
- SweepLineEvent
- @version 1.7
- TaggedLineSegment
- TaggedLinesSimplifier
- TaggedLineString
- TaggedLineStringSimplifier
- TopologyLocation
- A TopologyLocation is the labelling of a GraphComponent's topological relationship to a single Geometry.
- TopologyPreservingSimplifier
- TopologyValidationError
- Contains information about the nature and location of a {@link Geometry} validation error
- Triangle
- Represents a planar triangle, and provides methods for calculating various properties of triangles.
- Type
- The types of Precision Model which JTS supports.
- UniqueCoordinateArrayFilter
-
A {@link CoordinateFilter} that extracts a unique array of
Coordinate
s. The array of coordinates contains no duplicate points. It preserves the order of the input points. - VWLineSimplifier
- Simplifies a linestring (sequence of points) using the Visvalingam-Whyatt algorithm. The Visvalingam-Whyatt algorithm simplifies geometry by removing vertices while trying to minimize the area changed.
- VWSimplifier
- Simplifies a {@link Geometry} using the Visvalingam-Whyatt area-based algorithm. Ensures that any polygonal geometries returned are valid. Simple lines are not guaranteed to remain simple after simplification. All geometry types are handled. Empty and point geometries are returned unchanged. Empty geometry components are deleted.
- VWTransformer
- VWVertex
- WKBConstants
- Constant values used by the WKB format
- WKBReader
- Reads a {@link Geometry}from a byte stream in Well-Known Binary format. Supports use of an {@link InStream}, which allows easy use with arbitrary byte stream sources.
- WKBWriter
- Writes a {@link Geometry} into Well-Known Binary format. Supports use of an {@link OutStream}, which allows easy use with arbitrary byte stream sinks.
- WKTReader
- Converts a geometry in Well-Known Text format to a {@link Geometry}.
- WKTToken
- WKTTokenizer
- WKTTokenType
- WKTWriter
- Writes the Well-Known Text representation of a {@link Geometry}. The Well-Known Text format is defined in the OGC Simple Features Specification for SQL. See {@link WKTReader} for a formal specification of the format syntax.
Enums
- Ordinate
- An enumeration of possible Well-Known-Text or Well-Known-Binary ordinates.
Properties
- nodeComparator ↔ Comparator
-
getter/setter pair
-
OrdinateSet_XY
→ List<
Ordinate> -
final
-
OrdinateSet_XYM
→ List<
Ordinate> -
final
-
OrdinateSet_XYZ
→ List<
Ordinate> -
final
-
OrdinateSet_XYZM
→ List<
Ordinate> -
final
Exceptions / Errors
- IOException
- ParseException
- RuntimeException
- TopologyException
- Indicates an invalid or inconsistent topological situation encountered during processing