Class ComponentCoordinateExtracter
java.lang.Object
org.locationtech.jts.geom.util.ComponentCoordinateExtracter
- All Implemented Interfaces:
GeometryComponentFilter
Extracts a representative
Coordinate
from each connected component of a Geometry.- Version:
- 1.9
-
Constructor Summary
ConstructorsConstructorDescriptionComponentCoordinateExtracter(List coords) Constructs a LineExtracterFilter with a list in which to store LineStrings found. -
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms an operation with or on a geometry component.static ListgetCoordinates(Geometry geom) Extracts a representativeCoordinatefrom each connected component in a geometry.
-
Constructor Details
-
ComponentCoordinateExtracter
Constructs a LineExtracterFilter with a list in which to store LineStrings found.
-
-
Method Details
-
getCoordinates
Extracts a representativeCoordinatefrom each connected component in a geometry.If more than one geometry is to be processed, it is more efficient to create a single
ComponentCoordinateExtracterinstance and pass it to each geometry.- Parameters:
geom- the Geometry from which to extract- Returns:
- a list of representative Coordinates
-
filter
Description copied from interface:GeometryComponentFilterPerforms an operation with or on a geometry component.- Specified by:
filterin interfaceGeometryComponentFilter- Parameters:
geom- a component of the geometry to which the filter is applied.
-