Package mil.nga.sf.util.sweep
Class ShamosHoey
- java.lang.Object
-
- mil.nga.sf.util.sweep.ShamosHoey
-
public class ShamosHoey extends Object
Shamos-Hoey simple polygon detectionBased upon C++ implementation:
http://geomalgorithms.com/a09-_intersect-3.html
C++ implementation license:
Copyright 2001 softSurfer, 2012 Dan Sunday This code may be freely used and modified for any purpose providing that this copyright notice is included with it. SoftSurfer makes no warranty for this code, and cannot be held liable for any real or imagined damage resulting from its use. Users of this code must verify correctness for their application.
- Since:
- 1.0.5
- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description ShamosHoey()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
simplePolygon(List<LineString> rings)
Determine if the polygon rings are simplestatic boolean
simplePolygon(LineString ring)
Determine if the polygon line string ring is simplestatic boolean
simplePolygon(Polygon polygon)
Determine if the polygon is simplestatic boolean
simplePolygonPoints(List<Point> points)
Determine if the polygon points are simplestatic boolean
simplePolygonRingPoints(List<List<Point>> pointRings)
Determine if the polygon point rings are simple
-
-
-
Method Detail
-
simplePolygon
public static boolean simplePolygon(Polygon polygon)
Determine if the polygon is simple- Parameters:
polygon
- polygon- Returns:
- true if simple, false if intersects
-
simplePolygonPoints
public static boolean simplePolygonPoints(List<Point> points)
Determine if the polygon points are simple- Parameters:
points
- polygon as points- Returns:
- true if simple, false if intersects
-
simplePolygonRingPoints
public static boolean simplePolygonRingPoints(List<List<Point>> pointRings)
Determine if the polygon point rings are simple- Parameters:
pointRings
- polygon point rings- Returns:
- true if simple, false if intersects
-
simplePolygon
public static boolean simplePolygon(LineString ring)
Determine if the polygon line string ring is simple- Parameters:
ring
- polygon ring as a line string- Returns:
- true if simple, false if intersects
-
simplePolygon
public static boolean simplePolygon(List<LineString> rings)
Determine if the polygon rings are simple- Parameters:
rings
- polygon rings- Returns:
- true if simple, false if intersects
-
-