|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvNamedProperty
ilog.views.maps.IlvAltitudeProviderProperty
public class IlvAltitudeProviderProperty
This class defines a named property used to store the altitude provider in an IlvManager containing cartographic data.
Using {@link #GetAltitudeProvider(IlvManager)} will return the altitude provider class attached to the manager.
If no specific provider has been set by the application, the above method will return a {@link ilog.views.maps.IlvDefaultAltitudeProvider} created and set the first time it is called for that manager.
For example, the code below displays the altitude at the point latLonRad if the provider is able to compute it:
// Retrieve the provider for the manager
IlvAltitudeProvider elevationProvider = IlvAltitudeProviderProperty.GetAltitudeProvider(manager);
// retrieve the altitude for one point
double altitude = p.getAltitude(view.getManager(), latlonRad.x, latLonRad.y, 0);
if(!Double.IsNaN(altitude)) {
// use display preferences to format output altitude
IlvDisplayPreferences pref = IlvDisplayPreferencesProperty.GetDisplayPreferences(view.getManager());
System.out.println("Altitude is " + pref.formatAltitude(alt));
} else {
System.out.println("No altitude known");
}
,
Serialized Form| Field Summary | |
|---|---|
static String |
NAME
The name of the property. |
| Constructor Summary | |
|---|---|
IlvAltitudeProviderProperty(IlvAltitudeProvider ap)
Creates a new IlvAltitudeProviderProperty object with the
specified altitude provider. |
|
IlvAltitudeProviderProperty(IlvAltitudeProviderProperty source)
Creates a new IlvAltitudeProviderProperty by copying an
existing one. |
|
IlvAltitudeProviderProperty(IlvInputStream stream)
Creates a new IlvAltitudeProviderProperty from an
IlvInputStream. |
|
| Method Summary | |
|---|---|
IlvNamedProperty |
copy()
Copies the property. |
IlvAltitudeProvider |
getAltitudeProvider()
Returns the altitude provider of this property. |
static IlvAltitudeProvider |
GetAltitudeProvider(IlvManager manager)
Returns the altitude provider of a manager. |
boolean |
isPersistent()
Returns true if the property can be saved. |
void |
write(IlvOutputStream stream)
Writes the property to an IlvOutputStream. |
| Methods inherited from class ilog.views.IlvNamedProperty |
|---|
getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NAME
| Constructor Detail |
|---|
public IlvAltitudeProviderProperty(IlvAltitudeProvider ap)
IlvAltitudeProviderProperty object with the
specified altitude provider.
ap - The altitude provider.public IlvAltitudeProviderProperty(IlvAltitudeProviderProperty source)
IlvAltitudeProviderProperty by copying an
existing one.
source - The source property to be copied.
public IlvAltitudeProviderProperty(IlvInputStream stream)
throws IlvReadFileException
IlvAltitudeProviderProperty from an
IlvInputStream.
stream - The input stream.
IlvReadFileException - if an error occurs while reading.| Method Detail |
|---|
public void write(IlvOutputStream stream)
throws IOException
IlvOutputStream.
write in interface IlvPersistentObjectwrite in class IlvNamedPropertystream - The output stream.
IOException - if an I/O exception occurs.public IlvNamedProperty copy()
copy in class IlvNamedPropertyIlvAltitudeProviderProperty.public boolean isPersistent()
true if the property can be saved.
isPersistent in class IlvNamedPropertytrue.public IlvAltitudeProvider getAltitudeProvider()
public static IlvAltitudeProvider GetAltitudeProvider(IlvManager manager)
IlvAltitudeProviderProperty is attached to the
manager, the altitude provider of the property is returned. Otherwise,
a new IlvDefaultAltitudeProvider is returned.
manager - The manager.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||