|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.n52.oxf.context.ContextBoundingBox
public class ContextBoundingBox
| Field Summary | |
|---|---|
static int |
FIT_INTERMEDIATE
|
static int |
FIT_MAXIMUM
|
static int |
FIT_MINIMUM
Angefragter Ausschnitt wird an die kleinere Ausdehung angepasst; das führt insbesondere beim initialen Request dazu, dass die angefragte BoundingBox immer innerhalb der Gesamt-BoundingBox eines Layers liegt. |
| Constructor Summary | |
|---|---|
ContextBoundingBox()
Constructs a new empty ContextBoundingBox. |
|
ContextBoundingBox(IBoundingBox bBox)
Constructs a new ContextBoundingBox from a given org.n52.oxf.owsCommon.capabilities.BoundingBox. |
|
ContextBoundingBox(Point2D lowerLeft,
Point2D upperRight)
Constructs a new ContextBoundingBox with the specified lowerLeft and upperRight Points. |
|
ContextBoundingBox(String srs,
Point2D lowerLeft,
Point2D upperRight)
ContextBoundingBox with corresponding SRS and Resolution in x resp. y. |
|
| Method Summary | |
|---|---|
void |
addEventListener(IEventListener listener)
Add an IEventListener to the OXFEventSupport. |
BoundingBox |
asCommonCapabilitiesBoundingBox()
|
boolean |
contains(Rectangle2D rectangle)
|
void |
fitBBox2Screen(int screenWidth,
int screenHeight,
boolean silently)
Adjusts the aspect ratio of this BoundingBox to the aspect ratio of the screen. |
void |
fitBBox2Screen(int screenWidth,
int screenHeight,
int fitPolicy,
boolean silently)
Adjusts the aspect ratio of this BoundingBox to the aspect ratio of the screen. |
Rectangle2D |
getActualBBox()
|
Point2D |
getLowerLeft()
|
String |
getSRS()
|
Point2D |
getUpperRight()
|
void |
intersect(Rectangle2D rectangle)
|
boolean |
isInside(Rectangle2D rectangle)
|
static Point |
realworld2Screen(Rectangle2D bBox,
int screenWidth,
int screenHeight,
Point2D realWorldPoint)
Transforms the realworld-coordinates of the specified realWorldPoint to screen-coordinates. |
static Point[] |
realworld2Screen(Rectangle2D bBox,
int screenWidth,
int screenHeight,
Point2D[] realWorldPoints)
|
void |
removeEventListener(IEventListener listener)
Remove an IEventListener from the OXFEventSupport. |
static Point2D |
screen2Realworld(Rectangle2D bBox,
int screenWidth,
int screenHeight,
Point screenPoint)
Transforms the screen-coordinates of the specified screenPoint to realworld-coordinates. |
void |
serializeToContext(StringBuffer sb)
serializes the implementing class (downwardly) compatible to the "Web Map Context Documents" Specification (OGC 05-005) of the OGC in version 1.1.0. |
void |
setBBox(IBoundingBox bBox,
boolean silently)
Sets the extent and the srs of this ContextBoundingBox. |
void |
setExtent(Point2D lowerLeft,
Point2D upperRight,
boolean silently)
Sets the extent of this ContextBoundingBox. |
void |
setSRS(String srs)
Sets the srs of this BoundingBox. |
String |
toString()
|
void |
union(Rectangle2D rectangle)
|
void |
zoom(Point2D newCenter,
double factor)
performs a down/up scaling of this ContextBoundingBox. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int FIT_MINIMUM
public static final int FIT_INTERMEDIATE
public static final int FIT_MAXIMUM
| Constructor Detail |
|---|
public ContextBoundingBox()
public ContextBoundingBox(Point2D lowerLeft,
Point2D upperRight)
lowerLeft - Point2D witch includes the x- and y-value of the lowerLeft corner.upperRight - Point2D witch includes the x- and y-value of the upperRight corner.
public ContextBoundingBox(String srs,
Point2D lowerLeft,
Point2D upperRight)
srs - Spatial Reference System of the ContextBoundingBoxlowerLeft - Point2D witch includes the x- and y-value of the lowerLeft corner.upperRight - Point2D witch includes the x- and y-value of the upperRight corner.public ContextBoundingBox(IBoundingBox bBox)
bBox - | Method Detail |
|---|
public BoundingBox asCommonCapabilitiesBoundingBox()
OXFException
public void setSRS(String srs)
throws OXFEventException
srs -
OXFException
OXFEventException
public void setBBox(IBoundingBox bBox,
boolean silently)
throws OXFEventException
OXFException
OXFEventException
public void setExtent(Point2D lowerLeft,
Point2D upperRight,
boolean silently)
throws OXFEventException
lowerLeft - x- and y-value of the lowerleft corner.upperRight - x- and y-value of the upperright corner.
OXFException
OXFEventException
public void zoom(Point2D newCenter,
double factor)
throws OXFEventException
newCenter - the new center of the ContextBoundingBox. If center is null, the actual center will be kept.factor - if z > 1 performs an in-zooming with the factor z.OXFException
OXFEventException
public void fitBBox2Screen(int screenWidth,
int screenHeight,
int fitPolicy,
boolean silently)
throws OXFEventException
screenWidth - screenHeight - fitPolicy - -
possible values: FIT_MINIMUM (default), FIT_MAXIMUM, FIT_INTERMEDIATEsilently - -
if true an EXTENT_CHANGED_SILENTLY event will be fired instead of an EXTENT_CHANGED event.
OXFException
OXFEventException
public void fitBBox2Screen(int screenWidth,
int screenHeight,
boolean silently)
throws OXFEventException
screenWidth - screenHeight - silently - -
if true an EXTENT_CHANGED_SILENTLY event will be fired instead of an EXTENT_CHANGED event.
OXFException
OXFEventException
public static Point2D screen2Realworld(Rectangle2D bBox,
int screenWidth,
int screenHeight,
Point screenPoint)
throws NoninvertibleTransformException
bBox - screenWidth - screenHeight - screenPoint - screen coordinates (origin = upper left corner) !!
NoninvertibleTransformExceptionorg.n52.oxf.context.ContextBoundingBoxTest#testScreen2Realworld()
public static Point realworld2Screen(Rectangle2D bBox,
int screenWidth,
int screenHeight,
Point2D realWorldPoint)
screenWidth - screenHeight - realWorldPoint -
public static Point[] realworld2Screen(Rectangle2D bBox,
int screenWidth,
int screenHeight,
Point2D[] realWorldPoints)
public void union(Rectangle2D rectangle)
public void intersect(Rectangle2D rectangle)
public boolean contains(Rectangle2D rectangle)
public boolean isInside(Rectangle2D rectangle)
public Point2D getLowerLeft()
public Point2D getUpperRight()
public Rectangle2D getActualBBox()
public String getSRS()
public String toString()
toString in class Objectpublic void addEventListener(IEventListener listener)
addEventListener in interface IEventEmitterpublic void removeEventListener(IEventListener listener)
removeEventListener in interface IEventEmitterpublic void serializeToContext(StringBuffer sb)
IContextSerializableXML
serializeToContext in interface IContextSerializableXML
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||