public class IlvDefaultAltitudeProvider extends IlvAltitudeProvider implements IlvPersistentObject, IlvApplyObject
IlvManager
containing cartographic data.
getAltitude
method tries to find IlvGraphic
objects that fill the following criteria:
IlvAltitudeDataSource
instance.registerPossibleProviders
.
After this call all the altitude data sources in the manager are cached.
The cached list, and only this list, is used in subsequent calls to
getAltitude
. This gives important performance improvements
over the default case where few such object exist, whereas many other
graphic objects, such as polygons, exist in the same area.getAltitude(IlvManager, double, double, double)
,
Serialized FormConstructor and Description |
---|
IlvDefaultAltitudeProvider()
Creates a new
IlvDefaultAltitudeProvider instance. |
IlvDefaultAltitudeProvider(IlvDefaultAltitudeProvider provider)
Creates a new
IlvDefaultAltitudeProvider by copying an
existing one. |
IlvDefaultAltitudeProvider(IlvInputStream stream)
Creates a new
IlvDefaultAltitudeProvider from an
IlvInputStream . |
Modifier and Type | Method and Description |
---|---|
void |
apply(IlvGraphic obj,
Object vector)
The apply method that performs the action.
|
IlvAltitudeProvider |
copy()
Creates a new
IlvAltitudeProvider from an
IlvDefaultAltitudeProvider object. |
double |
getAltitude(IlvManager manager,
double xlon,
double ylat,
double precision)
Returns the altitude of a point located at specified coordinates.
|
boolean |
isUsingInvisibleLayers()
Tests if this provider should search for altitude data sources in layers
that are currently invisible.
|
void |
registerPossibleProviders(IlvManager manager)
Creates the possible provider list for this manager from the objects
present.
|
void |
setUsingInvisibleLayers(boolean usingInvisibleLayers)
Sets whether the provider should search for altitude data sources
in invisible layers.
|
void |
unregisterPossibleProviders()
Clears the possible provider list.
|
void |
write(IlvOutputStream stream)
This default implementation does nothing.
|
public IlvDefaultAltitudeProvider()
IlvDefaultAltitudeProvider
instance. This
default implementation does nothing.public IlvDefaultAltitudeProvider(IlvDefaultAltitudeProvider provider)
IlvDefaultAltitudeProvider
by copying an
existing one. This default implementation does nothing.provider
- The source altitude provider to be copied.public IlvDefaultAltitudeProvider(IlvInputStream stream) throws IlvReadFileException
IlvDefaultAltitudeProvider
from an
IlvInputStream
. This default implementation does nothing.stream
- The input stream.IlvReadFileException
- if an error occurs while reading from the stream.public boolean isUsingInvisibleLayers()
true
.true
is returned.public void setUsingInvisibleLayers(boolean usingInvisibleLayers)
true
.usingInvisibleLayers
- Set to true
to search in
invisible layers.public IlvAltitudeProvider copy()
IlvAltitudeProvider
from an
IlvDefaultAltitudeProvider
object.copy
in class IlvAltitudeProvider
IlvAltitudeProvider
instance.public void write(IlvOutputStream stream)
write
in interface IlvPersistentObject
write
in class IlvAltitudeProvider
stream
- the output streamIlvPersistentObject.write(ilog.views.io.IlvOutputStream)
public double getAltitude(IlvManager manager, double xlon, double ylat, double precision)
This method uses the manager's coordinate system to locate all objects at
the specified latitude and longitude location. It then locates
any attached IlvAttributeProperty
objects that contain an
IlvAltitudeDataSource
value. For each property found,
getAltitude
is called until one of them returns a non-NaN value. This
altitude data source is then cached and reused until it returns a NaN -
after which the search is done again.
getAltitude
in class IlvAltitudeProvider
manager
- The manager to use for finding altitudes providing graphics.xlon
- The longitude in radians.ylat
- The latitude in radians.precision
- The coordinate precision.IlvCoordinateSystemProperty.GetCoordinateSystem(IlvManager)
,
IlvManager.mapIntersects(ilog.views.IlvApplyObject,
java.lang.Object, ilog.views.IlvRect, ilog.views.IlvTransformer)
public void registerPossibleProviders(IlvManager manager)
manager
- The Manager to look for altitude providers.public void unregisterPossibleProviders()
registerPossibleProviders(IlvManager)
public void apply(IlvGraphic obj, Object vector)
apply
in interface IlvApplyObject
obj
- The current graphic object.vector
- The argument passed when using the
IlvApplyObject
.IlvApplyObject.apply(ilog.views.IlvGraphic,
java.lang.Object)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.