public class IlvRasterAltitudeDataSource extends IlvFeatureAttribute implements IlvAltitudeDataSource
IlvRasterAltitudeDataSource
represents a raster altitude data
source.
This class is used to compute the pixel index for a specified latitude and
longitude. It then interpolate the raster data associated with a raster
reader to retrieve an altitude.
The latitude/longitude to pixel mechanism is the same as the one used for
the pixel on demand feature. An interpolation is done using the
distance to the pixel center and the altitude of the surrounding points.NAME
Constructor and Description |
---|
IlvRasterAltitudeDataSource(IlvInputStream stream)
Constructs a raster altitude data source by reading serialized data.
|
IlvRasterAltitudeDataSource(IlvRasterAbstractReader reader,
int imageIndex)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
IlvFeatureAttribute |
copy()
Creates a new altitude data source by copying the parameters of this
current instance.
|
double |
getAltitude(double xlon,
double ylat,
double precision)
This method interpolates the raster altitude data to return the
altitude in a latitudinal and longitudinal coordinate system.
|
void |
write(IlvOutputStream stream)
Writes the object to an
IlvOutputStream object. |
public IlvRasterAltitudeDataSource(IlvInputStream stream) throws IlvReadFileException
stream
- The stream to read from.IlvReadFileException
- if there is a problem reading from
stream
.public IlvRasterAltitudeDataSource(IlvRasterAbstractReader reader, int imageIndex)
reader
- A reader that is able to return interpolated altitude data.imageIndex
- The index of the image in that raster reader.public double getAltitude(double xlon, double ylat, double precision)
getAltitude
in interface IlvAltitudeDataSource
xlon
- The x parameter.ylat
- The y parameter.precision
- The precision.NaN
is returned.IlvRasterProperties.getInterpolatedIntPixel(IlvCoordinate, IlvRasterMappedBuffer)
,
IlvAltitudeDataSource.getAltitude(double, double, double)
public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
object.write
in interface IlvPersistentObject
write
in class IlvFeatureAttribute
stream
- The output streamIOException
- thrown when an exception occurs during
the write operation for this object.IlvPersistentObject.write(ilog.views.io.IlvOutputStream)
public IlvFeatureAttribute copy()
Note: the raster data is not duplicated.
copy
in class IlvFeatureAttribute
IlvFeatureAttribute
.IlvFeatureAttribute.copy()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.