public class Line
extends java.lang.Object
double[]
coordinates.
NOTES:
spatial-extras
module
Modifier and Type | Field and Description |
---|---|
private double[] |
lats
array of latitude coordinates
|
private double[] |
lons
array of longitude coordinates
|
double |
maxLat
maximum latitude of this line's bounding box
|
double |
maxLon
maximum longitude of this line's bounding box
|
double |
minLat
minimum latitude of this line's bounding box
|
double |
minLon
minimum longitude of this line's bounding box
|
Constructor and Description |
---|
Line(double[] lats,
double[] lons)
Creates a new Line from the supplied latitude/longitude array.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
double |
getLat(int vertex)
Returns latitude value at given index
|
double[] |
getLats()
Returns a copy of the internal latitude array
|
double |
getLon(int vertex)
Returns longitude value at given index
|
double[] |
getLons()
Returns a copy of the internal longitude array
|
int |
hashCode() |
int |
numPoints()
returns the number of vertex points
|
java.lang.String |
toGeoJSON()
prints polygons as geojson
|
java.lang.String |
toString() |
private final double[] lats
private final double[] lons
public final double minLat
public final double maxLat
public final double minLon
public final double maxLon
public Line(double[] lats, double[] lons)
public int numPoints()
public double getLat(int vertex)
public double getLon(int vertex)
public double[] getLats()
public double[] getLons()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toGeoJSON()