Modifier and Type | Field and Description |
---|---|
private double |
xmax |
private double |
xmin |
private double |
ymax |
private double |
ymin |
Constructor and Description |
---|
BBox(BBox copy)
Constructs a new
BBox from another one. |
BBox(double x,
double y)
Constructs a new
BBox defined by a single point. |
BBox(double a_x,
double a_y,
double b_x,
double b_y) |
BBox(LatLon a,
LatLon b)
Constructs a new
BBox defined by points a and b . |
BBox(Node n) |
BBox(Way w) |
Modifier and Type | Method and Description |
---|---|
void |
add(BBox box) |
void |
add(double x,
double y)
Extends this bbox to include the point (x, y)
|
void |
add(LatLon c) |
void |
addPrimitive(OsmPrimitive primitive,
double extraSpace) |
boolean |
bounds(BBox b)
Tests, weather the bbox b lies completely inside
this bbox.
|
boolean |
bounds(LatLon c)
Tests, weather the Point c lies within the bbox.
|
boolean |
equals(Object o) |
LatLon |
getBottomRight()
Returns the bottom-right point.
|
double |
getBottomRightLat()
Returns the latitude of bottom-right point.
|
double |
getBottomRightLon()
Returns the longitude of bottom-right point.
|
LatLon |
getCenter() |
(package private) int |
getIndex(int level) |
LatLon |
getTopLeft()
Returns the top-left point.
|
double |
getTopLeftLat()
Returns the latitude of top-left point.
|
double |
getTopLeftLon()
Returns the longitude of top-left point.
|
int |
hashCode() |
double |
height() |
boolean |
intersects(BBox b)
Tests, weather two BBoxes intersect as an area.
|
private void |
sanity() |
String |
toString() |
String |
toStringCSV(String separator) |
double |
width() |
private double xmin
private double xmax
private double ymin
private double ymax
public BBox(double x, double y)
BBox
defined by a single point.x
- X coordinatey
- Y coordinatepublic BBox(LatLon a, LatLon b)
BBox
defined by points a
and b
.
Result is minimal BBox containing both points.a
- b
- public BBox(BBox copy)
BBox
from another one.copy
- the BBox to copypublic BBox(double a_x, double a_y, double b_x, double b_y)
private void sanity()
public void add(double x, double y)
public void addPrimitive(OsmPrimitive primitive, double extraSpace)
public double height()
public double width()
public boolean intersects(BBox b)
public LatLon getTopLeft()
public double getTopLeftLat()
public double getTopLeftLon()
public LatLon getBottomRight()
public double getBottomRightLat()
public double getBottomRightLon()
int getIndex(int level)
public String toStringCSV(String separator)