org.deegree.ogcwebservices.wpvs.utils
Class ResolutionStripe
java.lang.Object
org.deegree.ogcwebservices.wpvs.utils.ResolutionStripe
- All Implemented Interfaces:
- java.util.concurrent.Callable<ResolutionStripe>
public class ResolutionStripe
- extends Object
- implements java.util.concurrent.Callable<ResolutionStripe>
The ResolutionStripe
class encapsulates a Surface with a maximum Resolution, which
is convenient for the creation of a quadtree.
- Version:
- $Revision: 7962 $, $Date: 2007-08-09 12:02:49 +0200 (Do, 09 Aug 2007) $
- Author:
- Rutger Bezema, last edited by: $Author: rbezema $
Constructor Summary |
ResolutionStripe(Surface surface,
double maximumResolution,
double minimumResolution,
double minimalHeight,
double scale)
|
ResolutionStripe(Surface surface,
double maximumResolution,
double minimumResolution,
double minimalHeight,
String outputFormat,
double scale)
|
ResolutionStripe
public ResolutionStripe(Surface surface,
double maximumResolution,
double minimumResolution,
double minimalHeight,
double scale)
- Parameters:
surface
- maximumResolution
- minimumResolution
- minimalHeight
- scale
- of the heights ( 1.0 means no scaling )
ResolutionStripe
public ResolutionStripe(Surface surface,
double maximumResolution,
double minimumResolution,
double minimalHeight,
String outputFormat,
double scale)
- Parameters:
surface
- maximumResolution
- minimumResolution
- minimalHeight
- outputFormat
- scale
- of the heights ( 1.0 means no scaling )
getCRSName
public CoordinateSystem getCRSName()
- Returns:
- the CRS of this ResolutionStripe
getMaxResolution
public double getMaxResolution()
- Returns:
- the resolution of the largest stripe in the surface.
getMaxResolutionAsScaleDenominator
public double getMaxResolutionAsScaleDenominator()
- Returns:
- the (always possitive) resolution of the largest (away from the viewer) side of the
surface as scale denominator, which means divide by
MapUtils.DEFAULT_PIXEL_SIZE
.
getMinResolutionAsScaleDenominator
public double getMinResolutionAsScaleDenominator()
- Returns:
- the (always possitive) resolution of the smallest (towards the viewer) side of the
surface as scale denominator, which means divide by
MapUtils.DEFAULT_PIXEL_SIZE
.
getMinResolution
public double getMinResolution()
- Returns:
- the resolution of the smallest stripe in the surface. Attention the resolution may be
negative if the requested data is "behind" the viewer.
getSurface
public Surface getSurface()
- Returns:
- the geometric surface which is defines this resolutionStripe.
getMinimalTerrainHeight
public double getMinimalTerrainHeight()
- Returns:
- the minimalTerrainHeight.
getRequestWidthForBBox
public int getRequestWidthForBBox()
- Returns:
- the requestsize for the bbox containing this resolutionsstripe.
getRequestHeightForBBox
public int getRequestHeightForBBox()
- Returns:
- the height (in pixels) of the request envelope
getElevationModel
public TerrainModel getElevationModel()
- Returns:
- the elevationModel if no elevationModel is created jet, an
TriangleTerrain
elevation model of the bbox of this stripe (with heightvalues set to minimalheigt) is
returned.
setElevationModel
public void setElevationModel(TerrainModel elevationModel)
- Parameters:
elevationModel
- An other elevationModel.
setElevationModelFromMeassurePoints
public void setElevationModelFromMeassurePoints(List<Point> pointList)
- Parameters:
pointList
- containing Points which represents the heights of measures points (normally
aquired from a wfs).
setElevationModelFromHeightMap
public void setElevationModelFromHeightMap(BufferedImage heightMap)
- Parameters:
heightMap
- a BufferedImage which contains height values, normally aquired from a wcs.
getFeatures
public HashMap<String,DefaultSurface> getFeatures()
- Returns:
- the features of this resolutionstripe
addFeature
public boolean addFeature(String key,
DefaultSurface feature)
- Parameters:
key
- the name of the feature to be added.feature
- (e.g a building, tree etc.) as a DefaultSurface (derived frome Shape3D) to be
added to the hashmap.
- Returns:
- true if the feature wasn't allready defined in the hashmap and could therefore be
inserted, or if the key or feature are null.
getTextures
public HashMap<String,BufferedImage> getTextures()
- Returns:
- the textures value.
addTexture
public boolean addTexture(String key,
BufferedImage texture)
- Parameters:
key
- the name of the texture to be added.texture
- to be added to the hashmap.
- Returns:
- true if the texture wasn't allready defined in the hashmap and could therefore be
inserted, or if the key or texture are null.
getElevationModelDataSource
public AbstractDataSource getElevationModelDataSource()
- Returns:
- the elevationModelDataSource value.
setElevationModelDataSource
public void setElevationModelDataSource(AbstractDataSource elevationModelDataSource)
- Parameters:
elevationModelDataSource
- An other elevationModelDataSource value.
getFeatureCollectionDataSources
public ArrayList<AbstractDataSource> getFeatureCollectionDataSources()
- Returns:
- the featureCollectionDataSources value.
addFeatureCollectionDataSource
public void addFeatureCollectionDataSource(AbstractDataSource featureCollectionDataSource)
- Parameters:
featureCollectionDataSource
- a DataSources for a specific featureCollection.
getTexturesDataSources
public ArrayList<AbstractDataSource> getTexturesDataSources()
- Returns:
- the texturesDataSources value.
addTextureDataSource
public void addTextureDataSource(AbstractDataSource textureDataSource)
- Parameters:
textureDataSource
- An other texturesDataSources value.
getOutputFormat
public String getOutputFormat()
- Returns:
- the OutputFormat of the resultImage
setOutputFormat
public void setOutputFormat(String outputFormat)
- Parameters:
outputFormat
- the mime type of the resultimage
getJava3DRepresentation
public javax.media.j3d.OrderedGroup getJava3DRepresentation()
- After a call to this class call method, it is possible to get a Java3D representation --in
form of a BranchGroup-- of this resolutionStripe. In this BranchGroup all the textures and
requested features are added to the ElevationModel.
- Returns:
- a Java3D representation of this ResolutionStripe.
toString
public String toString()
- Overrides:
toString
in class Object
toWKT
public String toWKT()
- Returns:
- a well known representation of the geometry of this Resolutionstripe
outputTextures
public void outputTextures()
- Outputs the textures to the tmp directory with following format:
key_response:___res:_maxresolution__random_id.jpg
this file will be deleted at
jvm termination.
getScale
public double getScale()
- Returns:
- the scale of the heights (1.0 means no scaling)
isDGMFromMeassurePoints
public boolean isDGMFromMeassurePoints()
- Returns:
- the isDGMFromMeassurePoints.
getResultTexture
public BufferedImage getResultTexture()
- Returns:
- the resultTexture, which is build from all requested (wms/wcs) textures.
call
public ResolutionStripe call()
throws OGCWebServiceException
- This call method is part of the Deegree Concurrent framework (
Executor
) .
In this case it requests all the Data for a ResolutionStripe
by invoking the
necessary webservices.
- Specified by:
call
in interface java.util.concurrent.Callable<ResolutionStripe>
- Throws:
OGCWebServiceException
- See Also:
Callable.call()
setTextureRetrievalException
public void setTextureRetrievalException(String datasourceID,
OGCWebServiceException exception)
- Parameters:
datasourceID
- the id of the datasources which received an exception while retrieving a texture.exception
- the exception that occured while invoking the datasource.
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net