public class TLcdBingMapsCoverageArea extends Object implements ILcdBounds
TLcdBingMapsCopyrightHolder
,
Serialized FormConstructor and Description |
---|
TLcdBingMapsCoverageArea(int aMinLevel,
int aMaxLevel,
double aLon,
double aLat,
double aWidth,
double aHeight)
Creates a new Bing maps coverage area with the specified bounds and minimum and maximum level.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Makes
Object.clone() public. |
ILcd2DEditableBounds |
cloneAs2DEditableBounds()
Returns a copy of this
ILcdBounds object that is also an ILcd2DEditableBounds . |
ILcd3DEditableBounds |
cloneAs3DEditableBounds()
Returns a copy of this
ILcdBounds object that is also an ILcd3DEditableBounds . |
boolean |
contains2D(double aLon,
double aLat)
Checks whether this
ILcdShape contains the given point in
the 2D space. |
boolean |
contains2D(double aX,
double aY,
double aWidth,
double aHeight)
Checks whether this
ILcdBounds object contains the given rectangle in
the 2D space. |
boolean |
contains2D(ILcdBounds aBounds)
Checks whether this
ILcdBounds object contains the given ILcdBounds
object in the 2D space. |
boolean |
contains2D(ILcdPoint aPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 2D space. |
boolean |
contains3D(double aX,
double aY,
double aZ)
Checks whether this
ILcdShape contains the given point in
the 3D space. |
boolean |
contains3D(double aX,
double aY,
double aZ,
double aWidth,
double aHeight,
double aDepth)
Checks whether this
ILcdBounds object contains the given box in the 3D
space. |
boolean |
contains3D(ILcdBounds aBounds)
Checks whether this
ILcdBounds object contains the given ILcdBounds
object in the 3D space. |
boolean |
contains3D(ILcdPoint aPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 3D space. |
boolean |
equals(Object o) |
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
double |
getDepth()
Returns the depth of the bounding box.
|
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
double |
getHeight()
Returns the height of the bounding box.
|
ILcdPoint |
getLocation()
Returns the location of the bounding box (smallest x and y coordinates).
|
double |
getWidth()
Returns the width of the bounding box.
|
int |
hashCode() |
boolean |
interacts2D(double aLon,
double aLat,
double aWidth,
double aHeight)
Checks whether this
ILcdBounds object interacts with the given rectangle in
the 2D space. |
boolean |
interacts2D(ILcdBounds aBounds)
Checks whether this
ILcdBounds object interacts with the given ILcdBounds
object in the 2D space. |
boolean |
interacts3D(double aX,
double aY,
double aZ,
double aWidth,
double aHeight,
double aDepth)
Checks whether this
ILcdBounds object interacts with the given box in
the 3D space. |
boolean |
interacts3D(ILcdBounds aBounds)
Checks whether this
ILcdBounds object interacts with the given ILcdBounds
object. |
boolean |
isDefined()
Indicates whether this bounds object is valid.
|
boolean |
overlaps(int aMinZoomLevel,
int aMaxZoomLevel,
ILcdBounds aWGS84Bounds)
Returns whether or not this area overlaps with the passed arguments.
|
public TLcdBingMapsCoverageArea(int aMinLevel, int aMaxLevel, double aLon, double aLat, double aWidth, double aHeight)
aMinLevel
- the minimum level of the Bing Maps tileset covered by this area.aMaxLevel
- the maximum level of the Bing Maps tileset covered by this area.aLon
- the longitude of the lower left point of the covered area.aLat
- the latitude of the lower left point of the covered area.aWidth
- the width of the covered area.aHeight
- the height of the covered area.public boolean isDefined()
ILcdBounds
true
, this bounds describes a valid geographic region.false
, this bounds does not represent a geographic region, and its
location, width, height and depth should not be used.isDefined
in interface ILcdBounds
true
if this object describes actual bounds, false
if notpublic ILcd2DEditableBounds cloneAs2DEditableBounds()
ILcdBounds
ILcdBounds
object that is also an ILcd2DEditableBounds
.
This makes sure that the first two dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.cloneAs2DEditableBounds
in interface ILcdBounds
ILcdBounds
object that is also an ILcd2DEditableBounds
.
This makes sure that the first two dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.ILcd2DEditableBounds
public ILcd3DEditableBounds cloneAs3DEditableBounds()
ILcdBounds
ILcdBounds
object that is also an ILcd3DEditableBounds
.
This makes sure that all three dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.cloneAs3DEditableBounds
in interface ILcdBounds
ILcdBounds
object that is also an ILcd3DEditableBounds
.
This makes sure that all three dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.ILcd3DEditableBounds
public boolean overlaps(int aMinZoomLevel, int aMaxZoomLevel, ILcdBounds aWGS84Bounds)
aMinZoomLevel
- the minimum zoom levelaMaxZoomLevel
- the maximum zoom levelaWGS84Bounds
- the lon lat boundspublic Object clone()
ILcdCloneable
Makes Object.clone()
public.
java.lang.Object
, it can be implemented like this:
public Object clone() {
try {
return super.clone();
} catch ( CloneNotSupportedException e ) {
// Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
throw new RuntimeException( e );
}
}
clone
in interface ILcdCloneable
clone
in class Object
Object.clone()
public boolean contains2D(double aLon, double aLat)
ILcdShape
ILcdShape
contains the given point in
the 2D space. Only the first two dimensions of the ILcdShape
are considered.contains2D
in interface ILcdShape
aLon
- the x coordinate of the point.aLat
- the y coordinate of the point.public boolean contains3D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 3D space.contains3D
in interface ILcdShape
aPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
public boolean contains2D(ILcdBounds aBounds)
ILcdBounds
ILcdBounds
object contains the given ILcdBounds
object in the 2D space. Only the first two dimensions of the ILcdBounds
objects
are considered.
If either bounds is undefined
, the result is false.
contains2D
in interface ILcdBounds
aBounds
- the ILcdBounds
to compare with.ILcdBounds.contains2D(double, double, double, double)
public boolean contains2D(double aX, double aY, double aWidth, double aHeight)
ILcdBounds
ILcdBounds
object contains the given rectangle in
the 2D space. Only the first two dimensions of the ILcdBounds
object
are considered.
If this bounds is undefined
, the result is false.
contains2D
in interface ILcdBounds
aX
- the x coordinate of the rectangle.aY
- the y coordinate of the rectangle.aWidth
- the width of the rectangle.aHeight
- the height of the rectangle.public boolean contains3D(ILcdBounds aBounds)
ILcdBounds
ILcdBounds
object contains the given ILcdBounds
object in the 3D space.
If either bounds is undefined
, the result is false.
contains3D
in interface ILcdBounds
aBounds
- the ILcdBounds
to compare with.ILcdBounds.contains3D(double, double, double, double, double, double)
public boolean contains3D(double aX, double aY, double aZ)
ILcdShape
ILcdShape
contains the given point in
the 3D space.contains3D
in interface ILcdShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.public boolean contains3D(double aX, double aY, double aZ, double aWidth, double aHeight, double aDepth)
ILcdBounds
ILcdBounds
object contains the given box in the 3D
space.
If this bounds is undefined
, the result is false.
contains3D
in interface ILcdBounds
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.aWidth
- the width of the box.aHeight
- the height of the box.aDepth
- the depth of the box.ILcdBounds.contains2D(double, double, double, double)
public boolean interacts2D(ILcdBounds aBounds)
ILcdBounds
ILcdBounds
object interacts with the given ILcdBounds
object in the 2D space. Only the first two dimensions of the ILcdBounds
objects
are considered.
If either bounds is undefined
, the result is false.
interacts2D
in interface ILcdBounds
aBounds
- the ILcdBounds
to compare with.ILcdBounds.interacts2D(double, double, double, double)
public boolean interacts2D(double aLon, double aLat, double aWidth, double aHeight)
ILcdBounds
ILcdBounds
object interacts with the given rectangle in
the 2D space. Only the first two dimensions of the ILcdBounds
object
are considered.
If this bounds is undefined
, the result is false.
interacts2D
in interface ILcdBounds
aLon
- the x coordinate of the rectangle.aLat
- the y coordinate of the rectangle.aWidth
- the width of the rectangle.aHeight
- the height of the rectangle.true
if this ILcdBounds
object touches or overlaps to
any extent with the given rectangle, false
otherwise.public boolean interacts3D(ILcdBounds aBounds)
ILcdBounds
ILcdBounds
object interacts with the given ILcdBounds
object.
If either bounds is undefined
, the result is false.
interacts3D
in interface ILcdBounds
aBounds
- the ILcdBounds
to compare with.ILcdBounds.interacts3D(double, double, double, double, double, double)
public boolean interacts3D(double aX, double aY, double aZ, double aWidth, double aHeight, double aDepth)
ILcdBounds
ILcdBounds
object interacts with the given box in
the 3D space.
If this bounds is undefined
, the result is false.
interacts3D
in interface ILcdBounds
aX
- the x coordinate of the box.aY
- the y coordinate of the box.aZ
- the z coordinate of the box.aWidth
- the width of the box.aHeight
- the height of the box.aDepth
- the depth of the box.true
if this ILcdBounds
object touches or overlaps to
any extent with the given box, false
otherwise.public ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
ILcdShape
.public boolean contains2D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 2D space.
Only the first two dimensions of the ILcdShape
and the ILcdPoint
are considered.contains2D
in interface ILcdShape
aPoint
- the ILcdPoint
to test.ILcdShape.contains2D(double, double)
public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.
If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points)
the return value is unspecified.
It is highly recommended to return an undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public double getHeight()
ILcdBounds
getHeight
in interface ILcdBounds
public double getDepth()
ILcdBounds
getDepth
in interface ILcdBounds
public double getWidth()
ILcdBounds
getWidth
in interface ILcdBounds
public ILcdPoint getLocation()
ILcdBounds
getLocation
in interface ILcdBounds