Package com.esri.core.geometry
Class PolygonUtils
- java.lang.Object
-
- com.esri.core.geometry.PolygonUtils
-
final class PolygonUtils extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PolygonUtils.PiPResult
-
Constructor Summary
Constructors Constructor Description PolygonUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static void
_testPointsInEnvelope2D(Envelope2D env2D, double[] xyStreamBuffer, int pointCount, double tolerance, PolygonUtils.PiPResult[] testResults)
private static void
_testPointsInEnvelope2D(Envelope2D env2D, Point2D[] inputPoints, int count, double tolerance, PolygonUtils.PiPResult[] testResults)
static PolygonUtils.PiPResult
isPointInAnyOuterRing(Polygon polygon, Point2D inputPoint, double tolerance)
Tests if Point is inside of the any outer ring of a Polygon.(package private) static PolygonUtils.PiPResult
isPointInPolygon2D(Polygon polygon, double inputPointXVal, double inputPointYVal, double tolerance)
static PolygonUtils.PiPResult
isPointInPolygon2D(Polygon polygon, Point2D inputPoint, double tolerance)
static PolygonUtils.PiPResult
isPointInPolygon2D(Polygon polygon, Point inputPoint, double tolerance)
Tests if Point is inside the Polygon.static PolygonUtils.PiPResult
isPointInRing2D(Polygon polygon, int iRing, Point2D inputPoint, double tolerance)
Tests if Point is inside the Polygon's ring.static void
testPointsInArea2D(Geometry polygon, double[] xyStreamBuffer, int count, double tolerance, PolygonUtils.PiPResult[] testResults)
static void
testPointsInArea2D(Geometry polygon, Point2D[] inputPoints, int count, double tolerance, PolygonUtils.PiPResult[] testResults)
Tests point is inside an Area Geometry (Envelope, Polygon) for an array of points.(package private) static void
testPointsInPolygon2D(Polygon polygon, double[] xyStreamBuffer, int pointCount, double tolerance, PolygonUtils.PiPResult[] testResults)
static void
testPointsInPolygon2D(Polygon polygon, Point2D[] inputPoints, int count, double tolerance, PolygonUtils.PiPResult[] testResults)
Tests point is inside the Polygon for an array of points.(package private) static void
testPointsOnLine2D(Geometry line, Point2D[] input_points, int count, double tolerance, PolygonUtils.PiPResult[] test_results)
(package private) static void
testPointsOnPolyline2D_(Polyline poly, Point2D[] input_points, int count, double tolerance, PolygonUtils.PiPResult[] test_results)
(package private) static void
testPointsOnSegment_(Segment seg, Point2D[] input_points, int count, double tolerance, PolygonUtils.PiPResult[] test_results)
-
-
-
Method Detail
-
isPointInPolygon2D
public static PolygonUtils.PiPResult isPointInPolygon2D(Polygon polygon, Point inputPoint, double tolerance)
Tests if Point is inside the Polygon. Returns PiPOutside if not in polygon, PiPInside if in the polygon, PiPBoundary is if on the border. It tests border only if the tolerance is greater than 0, otherwise PiPBoundary cannot be returned. Note: If the tolerance is not 0, the test is more expensive because it calculates closest distance from a point to each segment. O(n) complexity, where n is the number of polygon segments.
-
isPointInPolygon2D
public static PolygonUtils.PiPResult isPointInPolygon2D(Polygon polygon, Point2D inputPoint, double tolerance)
-
isPointInPolygon2D
static PolygonUtils.PiPResult isPointInPolygon2D(Polygon polygon, double inputPointXVal, double inputPointYVal, double tolerance)
-
isPointInRing2D
public static PolygonUtils.PiPResult isPointInRing2D(Polygon polygon, int iRing, Point2D inputPoint, double tolerance)
Tests if Point is inside the Polygon's ring. Returns PiPOutside if not in ring, PiPInside if in the ring, PiPBoundary is if on the border. It tests border only if the tolerance is greater than 0, otherwise PiPBoundary cannot be returned. Note: If the tolerance is not 0, the test is more expensive because it calculates closest distance from a point to each segment. O(n) complexity, where n is the number of ring segments.
-
isPointInAnyOuterRing
public static PolygonUtils.PiPResult isPointInAnyOuterRing(Polygon polygon, Point2D inputPoint, double tolerance)
Tests if Point is inside of the any outer ring of a Polygon. Returns PiPOutside if not in any outer ring, PiPInside if in the any outer ring, or on the boundary. PiPBoundary is never returned. Note: If the tolerance is not 0, the test is more expensive because it calculates closest distance from a point to each segment. O(n) complexity, where n is the number of polygon segments.
-
testPointsInPolygon2D
public static void testPointsInPolygon2D(Polygon polygon, Point2D[] inputPoints, int count, double tolerance, PolygonUtils.PiPResult[] testResults)
Tests point is inside the Polygon for an array of points. Returns PiPOutside if not in polygon, PiPInside if in the polygon, PiPBoundary is if on the border. It tests border only if the tolerance is greater than 0, otherwise PiPBoundary cannot be returned. Note: If the tolerance is not 0, the test is more expensive. O(n*m) complexity, where n is the number of polygon segments, m is the number of input points.
-
testPointsInPolygon2D
static void testPointsInPolygon2D(Polygon polygon, double[] xyStreamBuffer, int pointCount, double tolerance, PolygonUtils.PiPResult[] testResults)
-
testPointsInArea2D
public static void testPointsInArea2D(Geometry polygon, Point2D[] inputPoints, int count, double tolerance, PolygonUtils.PiPResult[] testResults)
Tests point is inside an Area Geometry (Envelope, Polygon) for an array of points. Returns PiPOutside if not in area, PiPInside if in the area, PiPBoundary is if on the border. It tests border only if the tolerance is greater than 0, otherwise PiPBoundary cannot be returned. Note: If the tolerance is not 0, the test is more expensive. O(n*m) complexity, where n is the number of polygon segments, m is the number of input points.
-
testPointsInArea2D
public static void testPointsInArea2D(Geometry polygon, double[] xyStreamBuffer, int count, double tolerance, PolygonUtils.PiPResult[] testResults)
-
_testPointsInEnvelope2D
private static void _testPointsInEnvelope2D(Envelope2D env2D, Point2D[] inputPoints, int count, double tolerance, PolygonUtils.PiPResult[] testResults)
-
_testPointsInEnvelope2D
private static void _testPointsInEnvelope2D(Envelope2D env2D, double[] xyStreamBuffer, int pointCount, double tolerance, PolygonUtils.PiPResult[] testResults)
-
testPointsOnSegment_
static void testPointsOnSegment_(Segment seg, Point2D[] input_points, int count, double tolerance, PolygonUtils.PiPResult[] test_results)
-
testPointsOnPolyline2D_
static void testPointsOnPolyline2D_(Polyline poly, Point2D[] input_points, int count, double tolerance, PolygonUtils.PiPResult[] test_results)
-
testPointsOnLine2D
static void testPointsOnLine2D(Geometry line, Point2D[] input_points, int count, double tolerance, PolygonUtils.PiPResult[] test_results)
-
-