|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.graphics.transformation.WorldToScreenTransform
public class WorldToScreenTransform
the class WorldToScreenTransform
implements GeoTransformInterface
and defines a transformation to a linear coordinat system with its orgin on top/left. this can be
used for realising a screen mapping of geometries.
Constructor Summary | |
---|---|
WorldToScreenTransform()
constructor initialices the transfromation rectangles with unique values (origin 0/0; widht 1; height 1) |
|
WorldToScreenTransform(double sourceXMin,
double sourceYMin,
double sourceXMax,
double sourceYMax,
double destXMin,
double destYMin,
double destXMax,
double destYMax)
constrctor |
|
WorldToScreenTransform(Envelope sourceRect,
Envelope destRect)
constructor initialices the transformation rectangle using the submitted source- and destination rectangle. |
Method Summary | |
---|---|
protected void |
calculateQX()
calculates the relation between the width of the destination and the source coordinate system. |
protected void |
calculateQY()
calculates the relation between the height of the destination and the source coordinate system. |
Position |
getDestPoint(Position point)
executes a coordinat transformation for the submitted point of the source coordinat system. |
Envelope |
getDestRect()
|
double |
getDestX(double xsource)
executes a coordinat transformation for the submitted x-coordinate of the source coordinat system. |
double |
getDestY(double ysource)
executes a coordinat transformation for the submitted y-coordinate of the source coordinat system. |
Position |
getSourcePoint(Position point)
executes a coordinat transformation for the submitted point of the destination coordinate system. |
Envelope |
getSourceRect()
|
double |
getSourceX(double xdest)
executes a coordinat transformation for the submitted x-coordinate of the destination coordinate system. |
double |
getSourceY(double ydest)
executes a coordinat transformation for the submitted y-coordinate of the destination coordinate system. |
void |
setDestRect(double xMin,
double yMin,
double xMax,
double yMax)
sets the destination rectangle |
void |
setDestRect(Envelope rect)
sets the destination rectangle. |
void |
setSourceRect(double xMin,
double yMin,
double xMax,
double yMax)
sets the source rectangle |
void |
setSourceRect(Envelope rect)
sets the source rectangle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorldToScreenTransform()
public WorldToScreenTransform(Envelope sourceRect, Envelope destRect)
sourceRect
- is the boundary of the source geometry.destRect
- is the boundary of the destination rectangle (for example a region on the screen)public WorldToScreenTransform(double sourceXMin, double sourceYMin, double sourceXMax, double sourceYMax, double destXMin, double destYMin, double destXMax, double destYMax)
sourceXMin
- minimum x-coordinate (source system) of the map.sourceYMin
- minimum y-coordinate (source system) of the map.sourceXMax
- maximum x-coordinate (source system) of the map.sourceYMax
- maximum y-coordinate (source system) of the map.destXMin
- minimum x-coordinate (destination system) of the map.destYMin
- minimum y-coordinate (destination system) of the map.destXMax
- maximum x-coordinate (destination system) of the map.destYMax
- maximum y-coordinate (destination system) of the map.Method Detail |
---|
public void setSourceRect(Envelope rect)
setSourceRect
in interface GeoTransform
rect
- is the boundary of the source geometry.public void setSourceRect(double xMin, double yMin, double xMax, double yMax)
setSourceRect
in interface GeoTransform
xMin
- minimum x-coordinate (source system) of the map.yMin
- minimum y-coordinate (source system) of the map.xMax
- maximum x-coordinate (source system) of the map.yMax
- maximum y-coordinate (source system) of the map.public Envelope getSourceRect()
getSourceRect
in interface GeoTransform
public void setDestRect(Envelope rect)
setDestRect
in interface GeoTransform
rect
- is the boundary of the destination rectangle (for example a region on the screen)public void setDestRect(double xMin, double yMin, double xMax, double yMax)
setDestRect
in interface GeoTransform
xMin
- minimum x-coordinate (destination system) of the map.yMin
- minimum y-coordinate (destination system) of the map.xMax
- maximum x-coordinate (destination system) of the map.yMax
- maximum y-coordinate (destination system) of the map.public Envelope getDestRect()
getDestRect
in interface GeoTransform
public double getDestX(double xsource)
getDestX
in interface GeoTransform
xsource
- x-coordinate of a point in the source coordinate system.
public double getDestY(double ysource)
getDestY
in interface GeoTransform
ysource
- y-coordinate of a point in the source coordinate system.
public Position getDestPoint(Position point)
getDestPoint
in interface GeoTransform
point
- in the source coordinate system.
public double getSourceX(double xdest)
getSourceX
in interface GeoTransform
xdest
- x-coordinate of a point in the destination coordinate system.
public double getSourceY(double ydest)
getSourceY
in interface GeoTransform
ydest
- y-coordinate of a point in the destination coordinate system.
public Position getSourcePoint(Position point)
getSourcePoint
in interface GeoTransform
point
- in the destination coordinate system.
protected void calculateQX()
protected void calculateQY()
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org