org.deegree.ogcwebservices.wpvs.utils
Class StripeFactory
java.lang.Object
org.deegree.ogcwebservices.wpvs.utils.StripeFactory
public class StripeFactory
- extends Object
This class divides a visible area into stripes by calculating a resolution for the near clipping plane and the far
clipping plane. The near resolution (the one closest to the viewer) is doubled until it is <= far clippingplane
resolution. If the Viewer has a pitch which is greater than the angle of view (in other words: looking steeply down)
the resolutionstripes are concentric quads, which are adapted to the form of the footprint (aka. the perspective
ViewFrustum's intersection with the ground).
- Author:
- Ugo Taddei, Rutger Bezema, last edited by: $Author: apoth $
$Revision: 9345 $, $Date: 2007-12-27 17:22:25 +0100 (Do, 27 Dez 2007) $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StripeFactory
public StripeFactory(ViewPoint vp,
double minScaleDenominator)
- Parameters:
vp - the capsulation of the location and viewing direction of the viewer.minScaleDenominator - the best possible resolution the datasets can show.
createResolutionStripes
public ArrayList<ResolutionStripe> createResolutionStripes(int imageWidth,
double minimalHeight,
Graphics2D g2d,
double scale)
- Calculates the number of resolutionstripes, their size and their position in worldcoordinates.
- Parameters:
imageWidth - of the requestminimalHeight - the minimalHeight of the terraing2d - if !null the stripes are drawn on the graphics object (handy for debugging purposesscale - of the heightmap.
- Returns:
- the resolutionsstripes for the footprint
createBBoxResolutionStripe
public ArrayList<ResolutionStripe> createBBoxResolutionStripe(Envelope bbox,
int imageWidth,
double minimalHeight,
double scale)
- Parameters:
bbox - imageWidth - minimalHeight - scale - of the height in the elevationmodel
- Returns:
- a BoundingBox request ResolutionStripe
calcScaleOfVector
public static double calcScaleOfVector(javax.vecmath.Vector3d a,
javax.vecmath.Vector3d b,
double imageWidth)
- Calculates the Scale ( = Resolution* sqrt( 2 ) (== diagonal of pixel)) of a Vector between two points on the
Screen given an imagewidth. That is, how much meter is the Scale of one Pixel in an Image given a certain vector.
- Parameters:
a - "from" pointb - "to" pointimageWidth - the target imagewidth
- Returns:
- the scale on the screen.
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net