public abstract class IlvTilableDataSource extends IlvHierarchicalDataSource
IlvTilableDataSource
is an abstract base class for data sources
capable of creating tiled layers.IlvHierarchicalDataSource.CriterionFilter, IlvHierarchicalDataSource.SingleAttributeFilter
featureIterator, filename, nameMap, styleMap
renderer, usingGeodeticComputation
Constructor and Description |
---|
IlvTilableDataSource(IlvInputStream stream)
Constructs an
IlvTilableDataSource instance from an
IlvInputStream . |
IlvTilableDataSource(String filename)
Constructs a new
IlvTilableDataSource from the
file specified. |
Modifier and Type | Method and Description |
---|---|
protected void |
createGenericTiles(IlvTileController tileController,
IlvCoordinateTransformation tr)
This method creates the free tiles in the tiled layer.
|
protected abstract IlvMapRegionOfInterestIterator |
createTiledIterator(IlvMapLayer layer)
Creates an iterator that will iterate through the map features
for a specific area of interest.
|
protected abstract void |
createTiledLayers()
Creates all the possible map layers that may be needed when load on
demand occurs in the data source insertion layer.
|
protected int |
getColumnCount()
Returns the number of tile columns in this
IlvTilableDataSource object. |
protected double |
getLatMax()
Returns the maximum latitude.
|
protected double |
getLatMin()
Returns the minimum latitude.
|
protected double |
getLonMax()
Returns the maximum longitude.
|
protected double |
getLonMin()
Returns the minimum longitude.
|
protected int |
getRowCount()
Returns the number of tile rows in this
IlvTilableDataSource
object. |
boolean |
isMultiThreaded()
Tests whether the tiled layer created by this data source will use
multithreading to load the tiles.
|
void |
reset()
Resets the data source.
|
void |
setAreaOfinterest(double lonMin,
double latMin,
double lonMax,
double latMax)
Sets the area outside of which data will not be fetched.
|
void |
setMultiThreaded(boolean t)
Sets whether the tiled layer created by this data source will use
multithreading to load the tiles.
|
void |
setTilingParameters(boolean useTiling,
int rows,
int columns)
Sets the tiling parameters for this data source.
|
protected void |
setupTiledLoaders()
Sets up the tile loader for all child map layers of the insertion layer.
|
void |
start()
Starts this data source.
|
protected boolean |
useTiling()
Tests whether tiling is used.
|
void |
write(IlvOutputStream stream)
Writes this
IlvVMAPDataSource to an IlvOutputStream . |
addCriterionFilter, addLayer, createFeatureRenderer, createInsertionLayer, createStyle, getCriterionFilters, getFeatureIterator, getFeatureRenderer, getFeatureRenderer, getKey, getMapLayer, getStyle, isAcceptNullValues, readInfo, removeAllCriterionFilters, removeCriterionFilter, setAcceptNullValues, setupLayer
addDataSourceListener, callListeners, getBackupDataSources, getCoordinateSystem, getDescription, getInsertionLayer, getManager, getName, getNode, getValidExtentions, hasInsertionLayer, initBackupDataSource, initInsertionLayer, isAttachingAttributes, isGrapherMode, isSaveBackupDataSources, isSourceDataAvailable, isUsingBackupDataSource, isUsingGeodeticComputation, mapIntersects, removeDataSourceListener, setAttachingAttributes, setCoordinateSystem, setDescription, setFeatureRenderer, setForceUsingBackupDataSource, setGrapherMode, setInsertionLayer, setManager, setName, setSaveBackupDataSources, setValidExtentions, toString
public IlvTilableDataSource(IlvInputStream stream) throws IlvReadFileException
IlvTilableDataSource
instance from an
IlvInputStream
.stream
- The input stream to read from.IlvReadFileException
- if there is an error reading from
stream
.public IlvTilableDataSource(String filename) throws MalformedURLException
IlvTilableDataSource
from the
file specified.filename
- The filename pointing to the data.MalformedURLException
- if filename
is incorrectly
configured.public void reset()
Call this method to prepare this data source for reloading.
reset
in class IlvHierarchicalDataSource
IlvMapDataSource.reset()
public void setAreaOfinterest(double lonMin, double latMin, double lonMax, double latMax)
lonMin
- The minimum longitude for this area of interest.latMin
- The minimum latitude for this area of interest.lonMax
- The maximum longitude for this area of interest.latMax
- The maximum latitude for this area of interest.public void setTilingParameters(boolean useTiling, int rows, int columns)
useTiling
- Set to true
to enable the load on demand
mechanism this data source. Set to false
for all
data to be loaded when the start
method is called.rows
- The number of rows of tiles. This parameter is used only when
useTiling
is set to true
.columns
- The number of columns of tiles. This parameter is used only
when useTiling
is set to true
.start()
public void write(IlvOutputStream stream) throws IOException
IlvVMAPDataSource
to an IlvOutputStream
.write
in interface IlvPersistentObject
write
in class IlvHierarchicalDataSource
stream
- The stream to write to.IOException
- if there is a problem writing to stream
.protected void createGenericTiles(IlvTileController tileController, IlvCoordinateTransformation tr)
tileController
- The IlvTileController
that controls the
tiled layer for this data source.tr
- The coordinate transformation between the source coordinate
system and the map, that is, the destination, coordinate system.protected int getColumnCount()
IlvTilableDataSource
object.protected double getLatMax()
protected double getLatMin()
protected double getLonMax()
protected double getLonMin()
protected int getRowCount()
IlvTilableDataSource
object.protected boolean useTiling()
true
is returned.protected abstract IlvMapRegionOfInterestIterator createTiledIterator(IlvMapLayer layer) throws IOException
layer
- The layer to create objects for.IOException
protected abstract void createTiledLayers()
public void start() throws Exception
start
in class IlvHierarchicalDataSource
Exception
- if there is a problem in one of the processes listed.protected void setupTiledLoaders()
public boolean isMultiThreaded()
true
is returned.setMultiThreaded(boolean)
public void setMultiThreaded(boolean t)
Note: this method must be called before the data source is started.
t
- Set to true
to enable multithreading.start()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.