public class XYPolygon extends Object
double[]
, double[]
x, y arrays
coordinates.Modifier and Type | Field and Description |
---|---|
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
|
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(Object obj) |
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
|
String |
toGeoJSON()
prints polygons as geojson
|
String |
toString() |
public final double minX
public final double maxX
public final double minY
public final double maxY
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()
public GeoUtils.WindingOrder getWindingOrder()
public int numHoles()
public String toGeoJSON()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.