Class TLcdRasterModelHeightProviderFactory

All Implemented Interfaces:
ILcdModelHeightProviderFactory

public class TLcdRasterModelHeightProviderFactory extends ALcdRasterModelHeightProviderFactory

Important notice: the package com.luciad.imaging presents a new API for the modeling of raster data. For new projects, it is recommended to use this API instead of ILcdRaster et al.

This class provides a method to create an ILcdHeightProvider when an ILcdModel is given that only contains elements of the type ILcdRaster or ILcdMultilevelRaster.

Sample code

A class that requires a height provider based on a raster model could construct one as follows:


 // Create a height provider factory.
 ILcdModelHeightProviderFactory factory = new TLcdRasterModelHeightProviderFactory();

 // Specify the desired properties for the height provider.
 Map<String, Object> requiredProperties = new HashMap<String, Object>();
 requiredProperties.put(ALcdModelHeightProviderFactory.KEY_GEO_REFERENCE, aModelReference);

 Map<String, Object> optionalProperties = new HashMap<String, Object>();
 optionalProperties.put(TLcdRasterModelHeightProviderFactory.KEY_PIXEL_DENSITY, 2.5);

 // Create a height provider from a raster model.
 ILcdHeightProvider heightProvider =
   factory.createHeightProvider(aModel, requiredProperties, optionalProperties);
 

For many cases it is sufficient to add the ILcdModelHeightProviderFactory.KEY_GEO_REFERENCE property. Not setting this property will generate an exception in most cases. When using a ILcdHeightProvider constructed with a specific ILcdGeoReference as required property, one can retrieve height using ILcdPoints that are defined in this reference. For example, if the reference is a TLcdGeodeticReference, the points passed to ILcdHeightProvider.retrieveHeightAt(ILcdPoint) should be TLcdLonLatPoints. If the reference is a TLcdGridReference, the points passed to it should be TLcdXYPoints.

An other property that can be passed is for example ALcdRasterModelHeightProviderFactory.KEY_PIXEL_DENSITY. This property determines which raster is chosen from a multi level raster based on a pixel density. In most cases, this property should be passed as an optional property since not all height providers factories can interpret it.

The height providers created by this factory are thread-safe.

Since:
9.1