ilog.views.maps.datasource
Class IlvTiledShapeDataSource

java.lang.Object
  extended by ilog.views.maps.datasource.IlvMapDataSource
      extended by ilog.views.maps.datasource.IlvShapeDataSource
          extended by ilog.views.maps.datasource.IlvTiledShapeDataSource
All Implemented Interfaces:
IlvPersistentObject

public class IlvTiledShapeDataSource
extends IlvShapeDataSource

A data source specialized on reading tiled ESRI/Shape files.

Since:
JViews 7.5

Field Summary
 
Fields inherited from class ilog.views.maps.datasource.IlvMapDataSource
renderer, usingGeodeticComputation
 
Constructor Summary
IlvTiledShapeDataSource(IlvInputStream stream)
          Reads an IlvTiledShapeDataSource from an IlvInputStream
IlvTiledShapeDataSource(String filename)
          Constructs a IlvTiledShapeDataSource from a shape file name.
IlvTiledShapeDataSource(String filename, boolean attachAttributes)
          Constructs a IlvTiledShapeDataSource data source from specified shape file.
IlvTiledShapeDataSource(String shpFilename, String dbfFilename, String shxFilename, String idxFilename)
          Constructs a a IlvTiledShapeDataSource data source from specified shape file, dbf file, ,shape index file (shx) and spatial index file (idx).
IlvTiledShapeDataSource(URL url)
          Constructs a IlvTiledShapeDataSource from a shape file name.
IlvTiledShapeDataSource(URL url, boolean attachAttributes)
          Constructs a IlvTiledShapeDataSource data source from specified URL.
IlvTiledShapeDataSource(URL shp, URL dbf, URL shx, URL idx)
          Constructs a a IlvTiledShapeDataSource data source from specified shape URL, dbf URL, ,shape index URL (shx) and spatial index URL (idx).
 
Method Summary
 IlvMapReusableFeatureIterator getFeatureIterator()
          Retrieves the feature iterator used by this data source.
 IlvTiledLayer getTiledLayer()
          Returns the IlvTiledLayer created by this data source.
protected  void initInsertionLayer(IlvMapLayer layer)
          Initialize the insertion IlvMapLayer of this datasource.
 boolean isMultiThreaded()
          Returns whether the tiled layer created by this data source uses multithreading to load tiles
 void reset()
          Resets this data source for further use.
 void setMultiThreaded(boolean threaded)
          Indicates whether the tiled layer created by this data source will use multithreading to load tiles.
 void start()
          Starts this data source.
 String toString()
          Returns the name of the data source.
 void write(IlvOutputStream stream)
          Writes an IlvTiledShapeDataSource into an IlvOutputStream
 
Methods inherited from class ilog.views.maps.datasource.IlvShapeDataSource
createStyle, getDbfFilename, getDbfURL, getFeatureRenderer, getIdxFilename, getIdxURL, getShapeURL, getShpFilename, getShxFilename, getShxURL, isSourceDataAvailable, setIdxFilename, setShapeURL, setShpFilename
 
Methods inherited from class ilog.views.maps.datasource.IlvMapDataSource
addDataSourceListener, callListeners, createInsertionLayer, getBackupDataSources, getCoordinateSystem, getDescription, getInsertionLayer, getManager, getMapLayer, getName, getNode, getValidExtentions, hasInsertionLayer, initBackupDataSource, isAttachingAttributes, isSaveBackupDataSources, isUsingGeodeticComputation, mapIntersects, removeDataSourceListener, setAttachingAttributes, setCoordinateSystem, setDescription, setFeatureRenderer, setForceUsingBackupDataSource, setInsertionLayer, setManager, setName, setSaveBackupDataSources, setValidExtentions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvTiledShapeDataSource

public IlvTiledShapeDataSource(String filename)
Constructs a IlvTiledShapeDataSource from a shape file name.

Parameters:
filename - The name of a shape file.

IlvTiledShapeDataSource

public IlvTiledShapeDataSource(URL url)
Constructs a IlvTiledShapeDataSource from a shape file name.

Parameters:
url - The name of a shape file.
Since:
JViews 7.5

IlvTiledShapeDataSource

public IlvTiledShapeDataSource(IlvInputStream stream)
                        throws IlvReadFileException,
                               MalformedURLException
Reads an IlvTiledShapeDataSource from an IlvInputStream

Parameters:
stream - The stream to read from.
Throws:
IlvReadFileException
MalformedURLException

IlvTiledShapeDataSource

public IlvTiledShapeDataSource(String filename,
                               boolean attachAttributes)
Constructs a IlvTiledShapeDataSource data source from specified shape file. and telling if the data source should attach attributes to graphic objects.

Parameters:
filename - The shape file name.
attachAttributes - true if the data source should attach attributes to graphic objects, false otherwise.

IlvTiledShapeDataSource

public IlvTiledShapeDataSource(URL url,
                               boolean attachAttributes)
Constructs a IlvTiledShapeDataSource data source from specified URL. and telling if the data source should attach attributes to graphic objects.

Parameters:
url - The shape URL.
attachAttributes - true if the data source should attach attributes to graphic objects, false otherwise.
Since:
JViews 7.5

IlvTiledShapeDataSource

public IlvTiledShapeDataSource(String shpFilename,
                               String dbfFilename,
                               String shxFilename,
                               String idxFilename)
Constructs a a IlvTiledShapeDataSource data source from specified shape file, dbf file, ,shape index file (shx) and spatial index file (idx).

Parameters:
shpFilename - The shape file name.
dbfFilename - The dbf file name
shxFilename - The shx file name
idxFilename - The index file name.

IlvTiledShapeDataSource

public IlvTiledShapeDataSource(URL shp,
                               URL dbf,
                               URL shx,
                               URL idx)
Constructs a a IlvTiledShapeDataSource data source from specified shape URL, dbf URL, ,shape index URL (shx) and spatial index URL (idx).

Parameters:
shp - The shape file URL.
dbf - The dbf file URL
shx - The shx file URL
idx - The index file URL.
Since:
JViews 7.5
Method Detail

getFeatureIterator

public IlvMapReusableFeatureIterator getFeatureIterator()
Retrieves the feature iterator used by this data source.

Overrides:
getFeatureIterator in class IlvShapeDataSource
Returns:
The feature iterator.

write

public void write(IlvOutputStream stream)
           throws IOException
Writes an IlvTiledShapeDataSource into an IlvOutputStream

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvShapeDataSource
Parameters:
stream - The stream to write to.
Throws:
IOException

reset

public void reset()
Resets this data source for further use.

Overrides:
reset in class IlvShapeDataSource

start

public void start()
           throws Exception
Starts this data source. As this datasource uses load on demand mechanism, map features are not rendered within this method. Instead, this method creates the tiled layer that will further load shape tiles.

Overrides:
start in class IlvMapDataSource
Throws:
Exception

getTiledLayer

public IlvTiledLayer getTiledLayer()
Returns the IlvTiledLayer created by this data source.

Returns:
the IlvTiledLayer of this data source

initInsertionLayer

protected void initInsertionLayer(IlvMapLayer layer)
Initialize the insertion IlvMapLayer of this datasource. Basically inserts a new IlvTiledLayer in the specified IlvMapLayer.

Overrides:
initInsertionLayer in class IlvMapDataSource
Parameters:
layer - the IlvMapLayer to initialize

toString

public String toString()
Returns the name of the data source.

Overrides:
toString in class IlvMapDataSource
Returns:
the name of the data source.

isMultiThreaded

public boolean isMultiThreaded()
Returns whether the tiled layer created by this data source uses multithreading to load tiles

Returns:
boolean, true if multi threaded, false if not.
Since:
JViews 8.0

setMultiThreaded

public void setMultiThreaded(boolean threaded)
Indicates whether the tiled layer created by this data source will use multithreading to load tiles. This method must be called before the data source is started.

Parameters:
threaded - boolean, true if multi threaded, false if not.
Since:
JViews 8.0


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