public class BBox extends Object implements Shape, Cloneable
Nice German overview: http://www.geoinf.uni-jena.de/fileadmin/Geoinformatik/Lehre/Diplomarbeiten/DA_Andres.pdf
Modifier and Type | Field and Description |
---|---|
double |
maxEle |
double |
maxLat |
double |
maxLon |
double |
minEle |
double |
minLat |
double |
minLon |
Constructor and Description |
---|
BBox(double[] coords) |
BBox(double minLon,
double maxLon,
double minLat,
double maxLat) |
BBox(double minLon,
double maxLon,
double minLat,
double maxLat,
double minEle,
double maxEle) |
BBox(double minLon,
double maxLon,
double minLat,
double maxLat,
double minEle,
double maxEle,
boolean elevation) |
Modifier and Type | Method and Description |
---|---|
double |
calculateArea() |
BBox |
calculateIntersection(BBox bBox)
Calculates the intersecting BBox between this and the specified BBox
|
BBox |
clone() |
boolean |
contains(BBox b) |
boolean |
contains(Circle c) |
boolean |
contains(double lat,
double lon) |
boolean |
contains(Shape s) |
static BBox |
createInverse(boolean elevation)
Prefills BBox with minimum values so that it can increase.
|
boolean |
equals(Object obj) |
static BBox |
fromEnvelope(org.locationtech.jts.geom.Envelope envelope) |
static BBox |
fromPoints(double lat1,
double lon1,
double lat2,
double lon2) |
BBox |
getBounds() |
GHPoint |
getCenter() |
boolean |
hasElevation() |
int |
hashCode() |
boolean |
intersects(BBox o)
This method calculates if this BBox intersects with the specified BBox
|
boolean |
intersects(Circle s) |
boolean |
intersects(double minLon,
double maxLon,
double minLat,
double maxLat)
This method calculates if this BBox intersects with the specified BBox
|
boolean |
intersects(PointList pointList) |
static boolean |
intersects(org.locationtech.jts.algorithm.RectangleLineIntersector intersector,
PointList pointList) |
boolean |
intersects(Shape s) |
boolean |
isValid() |
static BBox |
parseBBoxString(String objectAsString)
This method creates a BBox out of a string in format lon1,lon2,lat1,lat2
|
static BBox |
parseTwoPoints(String objectAsString)
This method creates a BBox out of a string in format lat1,lon1,lat2,lon2
|
static org.locationtech.jts.geom.Envelope |
toEnvelope(BBox bbox) |
List<Double> |
toGeoJson() |
String |
toLessPrecisionString() |
String |
toString() |
void |
update(double lat,
double lon) |
void |
update(double lat,
double lon,
double elev) |
public double minLon
public double maxLon
public double minLat
public double maxLat
public double minEle
public double maxEle
public BBox(double[] coords)
public BBox(double minLon, double maxLon, double minLat, double maxLat)
public BBox(double minLon, double maxLon, double minLat, double maxLat, double minEle, double maxEle)
public BBox(double minLon, double maxLon, double minLat, double maxLat, double minEle, double maxEle, boolean elevation)
public static BBox createInverse(boolean elevation)
public boolean hasElevation()
public void update(double lat, double lon)
public void update(double lat, double lon, double elev)
public BBox calculateIntersection(BBox bBox)
public boolean intersects(Shape s)
intersects
in interface Shape
public boolean contains(Shape s)
public static boolean intersects(org.locationtech.jts.algorithm.RectangleLineIntersector intersector, PointList pointList)
public boolean intersects(PointList pointList)
intersects
in interface Shape
public boolean intersects(Circle s)
public boolean intersects(double minLon, double maxLon, double minLat, double maxLat)
public boolean intersects(BBox o)
public boolean contains(double lat, double lon)
public boolean contains(BBox b)
public boolean contains(Circle c)
public String toLessPrecisionString()
public BBox getBounds()
public GHPoint getCenter()
public boolean isValid()
public List<Double> toGeoJson()
public static BBox fromEnvelope(org.locationtech.jts.geom.Envelope envelope)
public static org.locationtech.jts.geom.Envelope toEnvelope(BBox bbox)
public double calculateArea()
calculateArea
in interface Shape
public static BBox parseTwoPoints(String objectAsString)
public static BBox fromPoints(double lat1, double lon1, double lat2, double lon2)
Copyright © 2012–2020. All rights reserved.