public interface IlvAltitudeDataSource
IlvAltitudeDataSource
interface must be implemented by all
data sources that are able to provide altitude information.
The default implementation,
IlvDefaultAltitudeProvider
,
expects IlvGraphic
objects to refer to a property implementing
IlvAltitudeDataSource
through an
IlvAttributeProperty
instance
attached to the graphic object. The following code example shows how to do
this:
IlvAttributeProperty property = (IlvAttributeProperty) graphic.getNamedProperty(IlvAttributeProperty.NAME); if (property != null) { try { provider = property.getValue(IlvAltitudeDataSource.NAME); } catch (IllegalArgumentException e){ continue; } if (provider instanceof IlvAltitudeDataSource) { IlvAltitudeDataSource elevationProvider = (IlvAltitudeDataSource) provider; double alt = elevationProvider.getAltitude(xlon, ylat, precision); } }
Modifier and Type | Field and Description |
---|---|
static String |
NAME
The name of the
IlvAltitudeDataSource properties. |
Modifier and Type | Method and Description |
---|---|
double |
getAltitude(double xlon,
double ylat,
double precision)
Returns the altitude of the point located at specific coordinates.
|
static final String NAME
IlvAltitudeDataSource
properties.double getAltitude(double xlon, double ylat, double precision)
xlon
- The longitude of the point in radians.ylat
- The latitude of the point in radians.precision
- The coordinate precision.NaN
is returned.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.