Package org.locationtech.jts.algorithm
Class InteriorPointLine
java.lang.Object
org.locationtech.jts.algorithm.InteriorPointLine
Computes a point in the interior of an linear geometry.
Algorithm
- Find an interior vertex which is closest to the centroid of the linestring.
- If there is no interior vertex, find the endpoint which is closest to the centroid.
- Version:
- 1.7
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
add
(Coordinate point) private void
addEndpoints
(Coordinate[] pts) private void
addEndpoints
(Geometry geom) Tests the endpoint vertices defined by a linear Geometry for the best inside point.private void
addInterior
(Coordinate[] pts) private void
addInterior
(Geometry geom) Tests the interior vertices (if any) defined by a linear Geometry for the best inside point.
-
Field Details
-
centroid
-
minDistance
private double minDistance -
interiorPoint
-
-
Constructor Details
-
InteriorPointLine
-
-
Method Details
-
getInteriorPoint
-
addInterior
Tests the interior vertices (if any) defined by a linear Geometry for the best inside point. If a Geometry is not of dimension 1 it is not tested.- Parameters:
geom
- the geometry to add
-
addInterior
-
addEndpoints
Tests the endpoint vertices defined by a linear Geometry for the best inside point. If a Geometry is not of dimension 1 it is not tested.- Parameters:
geom
- the geometry to add
-
addEndpoints
-
add
-