public class TLcdRegularTiled2DBoundsIndexedModel extends ALcdModel implements ILcd2DBoundsIndexedModel
ILcd2DBoundsIndexedModel
that contains
objects in different tiles. The model acts as a virtual supermodel.
The model has a reference to a ILcdTileProvider
that is able
to retrieve each of the tiles.
The model is a readonly model. It is threadsafe for accessing its elements.
ILcdModel.Query
fModelEventSupport
FIRE_LATER, FIRE_NOW, NO_EVENT
Constructor and Description 

TLcdRegularTiled2DBoundsIndexedModel() 
Modifier and Type  Method and Description 

int 
applyOnInteract2DBounds(ILcdBounds aBounds,
boolean aStrictInteract,
ILcdFunction aFunctionToApply,
double aPrecisionX,
double aPrecisionY)
Applies the specified function to all the model elements of which the 2D bounds overlap with the specified bounds.

int 
applyOnInteract2DBounds(ILcdBounds aBounds,
boolean aStrictInteract,
ILcdFunction aFunctionToApply,
double aPrecisionX,
double aPrecisionY,
double aMinSizeX,
double aMinSizeY,
boolean aIncludePoints)
Applies the specified function to all the elements of which the 2D bounds overlap with the specified bounds.

java.util.Enumeration 
elements()
Returns an enumeration over all elements of this model.

ILcdBounds 
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. 
ILcdTileProvider 
getTileProvider()
Returns the
ILcdTileProvider that is responsible for retrieving
the data in the different tiles. 
void 
setModelBounds(ILcdBounds aModelBounds)
Sets the model bounds for this model.

void 
setTileProvider(ILcdTileProvider aTileProvider)
Set the
ILcdTileProvider that is responsible for retrieving
the data in the different tiles. 
addElement, addElements, addModelListener, allElementsChanged, allElementsRemoved, canAddElement, canRemoveElement, dispose, elementAdded, elementChanged, elementRemoved, elementsAdded, elementsChanged, elementsRemoved, fireCollectedModelChanges, getModelDescriptor, getModelEncoder, getModelMetadata, getModelReference, initializeTransientValues, isClassTraceOn, isTraceOn, removeAllElements, removeElement, removeElements, removeModelListener, setClassTraceOn, setModelDescriptor, setModelDisposer, setModelEncoder, setModelMetadataFunction, setModelReference, setTraceOn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
query
addElement, addElements, addModelListener, all, canAddElement, canRemoveElement, dispose, elementChanged, elementsChanged, filter, fireCollectedModelChanges, getModelDescriptor, getModelEncoder, getModelMetadata, getModelReference, removeAllElements, removeElement, removeElements, removeModelListener
close
public TLcdRegularTiled2DBoundsIndexedModel()
public void setModelBounds(ILcdBounds aModelBounds)
aModelBounds
 the bounds for this model.public void setTileProvider(ILcdTileProvider aTileProvider)
ILcdTileProvider
that is responsible for retrieving
the data in the different tiles.aTileProvider
 the tile provider to obtain tiles within the model.getTileProvider()
public ILcdTileProvider getTileProvider()
ILcdTileProvider
that is responsible for retrieving
the data in the different tiles.ILcdTileProvider
that is responsible for retrieving
the data in the different tiles.setTileProvider(com.luciad.model.ILcdTileProvider)
public java.util.Enumeration elements()
ILcdModel
public int applyOnInteract2DBounds(ILcdBounds aBounds, boolean aStrictInteract, ILcdFunction aFunctionToApply, double aPrecisionX, double aPrecisionY)
ILcd2DBoundsIndexedModel
The return value of the specified function is used as a stop criterion: the spatial query is interrupted
if the function returns false
.
applyOnInteract2DBounds
in interface ILcd2DBoundsIndexedModel
aBounds
 the rectangle to test overlap with.aStrictInteract
 if false
, the spatial search may return more elements than the ones strictly
overlapping; if true
, the search only returns the elements that are
overlapping. The latter mode is more precise, but it may be slower.aFunctionToApply
 the function to apply on each element that overlaps with the given bounds.
The return value of the specified function is used as a stop criterion: the spatial query is interrupted
if the function returns false
.aPrecisionX
 the precision required in the x dimension, expressed in model units.
For example, for a cartesian grid system expressed in meters, the values
should be expressed in meters as well, for a geodetic coordinate system the accuracy
values should be expressed in degrees.
The precision is useful in combination with multileveled data (multiple representations of the same object, but with varying accuracy), so that the most appropriate accuracy level can be used. 0 means best possible accuracy, but it might trigger lazyloaded implementations to load lots of data.
aPrecisionY
 the precision required in the y dimension, expressed in model units.ILcdFunction
has been applied.public int applyOnInteract2DBounds(ILcdBounds aBounds, boolean aStrictInteract, ILcdFunction aFunctionToApply, double aPrecisionX, double aPrecisionY, double aMinSizeX, double aMinSizeY, boolean aIncludePoints)
ILcd2DBoundsInteractable
Only elements that have at least the specified minimal size in the x dimension or in the y dimension are considered. This can be useful for quickly eliminating elements that are too small to be visible in a view, for instance. If required, an exception can be made for point elements, which have a size of 0 by 0. They can be forced to be considered, even though they would always be rejected as being too small for any sizes larger than 0.
The return value of the specified function is used as a stop criterion: the spatial query will be interrupted
as soon as the function returns false
for an element it was applied on.
applyOnInteract2DBounds
in interface ILcd2DBoundsIndexedModel
applyOnInteract2DBounds
in interface ILcd2DBoundsInteractable
aBounds
 the rectangle to test overlap with.aStrictInteract
 if false
, the spatial search may return more elements than the ones strictly
overlapping; if true
, the search only returns the elements that are
overlapping. The latter mode is more precise, but it may be slower.aFunctionToApply
 the function to apply on each element that overlaps with the given bounds.aPrecisionX
 the precision required in the x dimension, expressed in model units.
For example, for a cartesian grid system expressed in meters, the values
should be expressed in meters as well, for a geodetic coordinate system the accuracy
values should be expressed in degrees.
The precision is useful in combination with multileveled data (multiple representations of the same object, but with varying accuracy), so that the most appropriate accuracy level can be used. 0 means best possible accuracy, but it might trigger lazyloaded implementations to load lots of data.
aPrecisionY
 the precision required in the y dimension, expressed in model units.aMinSizeX
 the minimal element size in the x dimension (as in
ILcdBounds.getWidth()
), expressed in model units.
Elements that are smaller than this size will be skipped. This may, for example, be
useful when improving the efficiency of painting elements by skipping elements
that are smaller than some threshold (e.g. one pixel, converted to model units).aMinSizeY
 the minimal element size in the y dimension (as in
ILcdBounds.getHeight()
), expressed in model units.aIncludePoints
 if true
, zerosized elements (points) are considered as well, even though they
might be smaller than the minimum size.ILcdFunction
has been applied.public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.
If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points)
the return value is unspecified.
It is highly recommended to return an undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.