Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.graphics.transformation
Class WorldToScreenTransform

    java.lang.Object
      org.deegree.graphics.transformation.WorldToScreenTransform

All Implemented Interfaces:
  GeoTransform

    public class WorldToScreenTransform

extends Object
implements GeoTransform

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.

Version:
  28.12.2000
Author:
  Andreas Poth poth@lat-lon.de

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

### WorldToScreenTransform

    public WorldToScreenTransform()

  constructor initialices the transfromation rectangles with unique values (origin 0/0; widht 1; height 1)

### WorldToScreenTransform

    public WorldToScreenTransform(Envelope sourceRect,
                                  Envelope destRect)

  constructor initialices the transformation rectangle using the submitted source- and destination rectangle.

  Parameters:
    `sourceRect` - is the boundary of the source geometry.
    `destRect` - is the boundary of the destination rectangle (for example a region on the screen)

### WorldToScreenTransform

    public WorldToScreenTransform(double sourceXMin,
                                  double sourceYMin,
                                  double sourceXMax,
                                  double sourceYMax,
                                  double destXMin,
                                  double destYMin,
                                  double destXMax,
                                  double destYMax)

  constrctor

  Parameters:
    `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

### setSourceRect

    public void setSourceRect(Envelope rect)

  sets the source rectangle

  Specified by:
    `setSourceRect` in interface `GeoTransform`
  Parameters:
    `rect` - is the boundary of the source geometry.

### setSourceRect

    public void setSourceRect(double xMin,
                              double yMin,
                              double xMax,
                              double yMax)

  sets the source rectangle

  Specified by:
    `setSourceRect` in interface `GeoTransform`
  Parameters:
    `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.

### getSourceRect

    public Envelope getSourceRect()

  Specified by:
    `getSourceRect` in interface `GeoTransform`
  Returns:
    source rectange

### setDestRect

    public void setDestRect(Envelope rect)

  sets the destination rectangle.

  Specified by:
    `setDestRect` in interface `GeoTransform`
  Parameters:
    `rect` - is the boundary of the destination rectangle (for example a region on the screen)

### setDestRect

    public void setDestRect(double xMin,
                            double yMin,
                            double xMax,
                            double yMax)

  sets the destination rectangle

  Specified by:
    `setDestRect` in interface `GeoTransform`
  Parameters:
    `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.

### getDestRect

    public Envelope getDestRect()

  Specified by:
    `getDestRect` in interface `GeoTransform`
  Returns:
    destination rectange

### getDestX

    public double getDestX(double xsource)

  executes a coordinat transformation for the submitted x-coordinate of the source coordinat system.

  Specified by:
    `getDestX` in interface `GeoTransform`
  Parameters:
    `xsource` - x-coordinate of a point in the source coordinate system.
  Returns:
    the x-coordinate of the submitted value in the destination coordinate system.

### getDestY

    public double getDestY(double ysource)

  executes a coordinat transformation for the submitted y-coordinate of the source coordinat system.

  Specified by:
    `getDestY` in interface `GeoTransform`
  Parameters:
    `ysource` - y-coordinate of a point in the source coordinate system.
  Returns:
    the y-coordinate of the submitted value in the destination coordinate system.

### getDestPoint

    public Position getDestPoint(Position point)

  executes a coordinat transformation for the submitted point of the source coordinat system.

  Specified by:
    `getDestPoint` in interface `GeoTransform`
  Parameters:
    `point` - in the source coordinate system.
  Returns:
    the location of the submitted point in the destination coordinate system.

### getSourceX

    public double getSourceX(double xdest)

  executes a coordinat transformation for the submitted x-coordinate of the destination coordinate system.

  Specified by:
    `getSourceX` in interface `GeoTransform`
  Parameters:
    `xdest` - x-coordinate of a point in the destination coordinate system.
  Returns:
    the x-coordinate of the submitted value in the source coordinate system.

### getSourceY

    public double getSourceY(double ydest)

  executes a coordinat transformation for the submitted y-coordinate of the destination coordinate system.

  Specified by:
    `getSourceY` in interface `GeoTransform`
  Parameters:
    `ydest` - y-coordinate of a point in the destination coordinate system.
  Returns:
    the y-coordinate of the submitted value in the source coordinate system.

### getSourcePoint

    public Position getSourcePoint(Position point)

  executes a coordinat transformation for the submitted point of the destination coordinate system.

  Specified by:
    `getSourcePoint` in interface `GeoTransform`
  Parameters:
    `point` - in the destination coordinate system.
  Returns:
    the location of the submitted point in the source coordinate system.

### calculateQX

    protected void calculateQX()

  calculates the relation between the width of the destination and the source coordinate system.

### calculateQY

    protected void calculateQY()

  calculates the relation between the height of the destination and the source coordinate system.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-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