Package org.locationtech.jts.algorithm
Class InteriorPointPoint
- java.lang.Object
-
- org.locationtech.jts.algorithm.InteriorPointPoint
-
public class InteriorPointPoint extends java.lang.Object
Computes a point in the interior of an point geometry.Algorithm
Find a point which is closest to the centroid of the geometry.- Version:
- 1.7
-
-
Field Summary
Fields Modifier and Type Field Description private Coordinate
centroid
private Coordinate
interiorPoint
private double
minDistance
-
Constructor Summary
Constructors Constructor Description InteriorPointPoint(Geometry g)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
add(Coordinate point)
private void
add(Geometry geom)
Tests the point(s) defined by a Geometry for the best inside point.Coordinate
getInteriorPoint()
-
-
-
Field Detail
-
centroid
private Coordinate centroid
-
minDistance
private double minDistance
-
interiorPoint
private Coordinate interiorPoint
-
-
Constructor Detail
-
InteriorPointPoint
public InteriorPointPoint(Geometry g)
-
-
Method Detail
-
add
private void add(Geometry geom)
Tests the point(s) defined by a Geometry for the best inside point. If a Geometry is not of dimension 0 it is not tested.- Parameters:
geom
- the geometry to add
-
add
private void add(Coordinate point)
-
getInteriorPoint
public Coordinate getInteriorPoint()
-
-