public class Line extends LatLonGeometry
double[]
coordinates.
NOTES:
spatial-extras
module
Modifier and Type | Field and Description |
---|---|
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(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
|
protected Component2D |
toComponent2D()
get a
Component2D from this geometry |
String |
toGeoJSON()
prints lines as geojson
|
String |
toString() |
create
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()
protected Component2D toComponent2D()
LatLonGeometry
Component2D
from this geometrytoComponent2D
in class LatLonGeometry
public String toGeoJSON()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.