public class XYPolygon
extends java.lang.Object
double[]
, double[]
x, y arrays
coordinates.Modifier and Type | Field and Description |
---|---|
private XYPolygon[] |
holes |
double |
maxX
maximum x of this polygon's bounding box area
|
double |
maxY
maximum y of this polygon's bounding box area
|
double |
minX
minimum x of this polygon's bounding box area
|
double |
minY
minimum y of this polygon's bounding box area
|
private GeoUtils.WindingOrder |
windingOrder
winding order of the vertices
|
private double[] |
x |
private double[] |
y |
Constructor and Description |
---|
XYPolygon(float[] x,
float[] y,
XYPolygon... holes)
Creates a new Polygon from the supplied x, y arrays, and optionally any holes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
(package private) XYPolygon |
getHole(int i) |
XYPolygon[] |
getHoles()
Returns a copy of the internal holes array
|
double[] |
getPolyX()
Returns a copy of the internal x array
|
double |
getPolyX(int vertex)
Returns x value at given index
|
double[] |
getPolyY()
Returns a copy of the internal y array
|
double |
getPolyY(int vertex)
Returns y value at given index
|
GeoUtils.WindingOrder |
getWindingOrder()
Returns the winding order (CW, COLINEAR, CCW) for the polygon shell
|
int |
hashCode() |
int |
numHoles()
returns the number of holes for the polygon
|
int |
numPoints()
returns the number of vertex points
|
java.lang.String |
toGeoJSON()
prints polygons as geojson
|
java.lang.String |
toString() |
private final double[] x
private final double[] y
private final XYPolygon[] holes
public final double minX
public final double maxX
public final double minY
public final double maxY
private final GeoUtils.WindingOrder windingOrder
public XYPolygon(float[] x, float[] y, XYPolygon... holes)
public int numPoints()
public double[] getPolyX()
public double getPolyX(int vertex)
public double[] getPolyY()
public double getPolyY(int vertex)
public XYPolygon[] getHoles()
XYPolygon getHole(int i)
public GeoUtils.WindingOrder getWindingOrder()
public int numHoles()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toGeoJSON()