ilog.views.maps
Interface IlvAltitudeDataSource

All Known Implementing Classes:
IlvRasterAltitudeDataSource

public interface IlvAltitudeDataSource

The 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);
        }
    }
    

Since:
JViews 7.5

Field Summary
static String NAME
          The name of the IlvAltitudeDataSource properties.
 
Method Summary
 double getAltitude(double xlon, double ylat, double precision)
          Returns the altitude of the point located at specific coordinates.
 

Field Detail

NAME

static final String NAME
The name of the IlvAltitudeDataSource properties.

See Also:
IlvDefaultAltitudeProvider.getAltitude(ilog.views.IlvManager, double, double, double), Constant Field Values
Method Detail

getAltitude

double getAltitude(double xlon,
                   double ylat,
                   double precision)
Returns the altitude of the point located at specific coordinates.

Parameters:
xlon - The longitude of the point in radians.
ylat - The latitude of the point in radians.
precision - The coordinate precision.
Returns:
The altitude of this point. If there is no altitude for the specified point, a NaN is returned.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.