ilog.views.maps.datasource
Class IlvTigerDataSource

java.lang.Object
  extended by ilog.views.maps.datasource.IlvMapDataSource
      extended by ilog.views.maps.datasource.IlvHierarchicalDataSource
          extended by ilog.views.maps.tiling.IlvTilableDataSource
              extended by ilog.views.maps.datasource.IlvTigerDataSource
All Implemented Interfaces:
IlvPersistentObject

public class IlvTigerDataSource
extends IlvTilableDataSource

A data source to read TIGER/Line files.

Since:
JViews 7.5

Nested Class Summary
static class IlvTigerDataSource.CFCCFilter
          A specialized criterion filter that returns the value of the CFCC attribute of a map feature.
 
Nested classes/interfaces inherited from class ilog.views.maps.datasource.IlvHierarchicalDataSource
IlvHierarchicalDataSource.CriterionFilter, IlvHierarchicalDataSource.SingleAttributeFilter
 
Field Summary
 
Fields inherited from class ilog.views.maps.datasource.IlvHierarchicalDataSource
featureIterator, filename, nameMap, styleMap
 
Fields inherited from class ilog.views.maps.datasource.IlvMapDataSource
renderer, usingGeodeticComputation
 
Constructor Summary
IlvTigerDataSource(IlvInputStream stream)
          Constructs a IlvTigerDataSource from the specified input stream.
IlvTigerDataSource(String filename)
          Constructs a IlvTigerDataSource from the specified file name.
IlvTigerDataSource(URL url)
          Constructs a IlvTigerDataSource from the specified url.
 
Method Summary
protected  IlvMapRegionOfInterestIterator createTiledIterator(IlvMapLayer layer)
          Creates an iterator that will iterate through the map features for a specific area of interest.
protected  void createTiledLayers()
          Creates all the possible map layers that may be needed when load on demand occurs in the data source insertion layer.
protected  boolean isSourceDataAvailable()
          Checks whether the source data this IlvMapDataSource is based on is available (file, database connection, url...).
 void readInfo(String info)
          Creates the table of attributes values from a text file description.
 void setCFCCCodeList(String[] cfccCodes)
          Sets the list of accepted CFCC codes
 void write(IlvOutputStream stream)
          Writes this IlvVMAPDataSource to an IlvOutputStream.
 
Methods inherited from class ilog.views.maps.tiling.IlvTilableDataSource
createGenericTiles, getColumnCount, getLatMax, getLatMin, getLonMax, getLonMin, getRowCount, isMultiThreaded, reset, setAreaOfinterest, setMultiThreaded, setTilingParameters, setupTiledLoaders, start, useTiling
 
Methods inherited from class ilog.views.maps.datasource.IlvHierarchicalDataSource
addCriterionFilter, addLayer, createFeatureRenderer, createInsertionLayer, getCriterionFilters, getFeatureIterator, getFeatureRenderer, getFeatureRenderer, getKey, getMapLayer, getStyle, isAcceptNullValues, removeAllCriterionFilters, removeCriterionFilter, setAcceptNullValues, setupLayer
 
Methods inherited from class ilog.views.maps.datasource.IlvMapDataSource
addDataSourceListener, callListeners, getBackupDataSources, getCoordinateSystem, getDescription, getInsertionLayer, getManager, getName, getNode, getValidExtentions, hasInsertionLayer, initBackupDataSource, initInsertionLayer, isAttachingAttributes, isSaveBackupDataSources, isUsingGeodeticComputation, mapIntersects, removeDataSourceListener, setAttachingAttributes, setCoordinateSystem, setDescription, setFeatureRenderer, setForceUsingBackupDataSource, setInsertionLayer, setManager, setName, setSaveBackupDataSources, setValidExtentions, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvTigerDataSource

public IlvTigerDataSource(IlvInputStream stream)
                   throws IlvReadFileException
Constructs a IlvTigerDataSource from the specified input stream.

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

IlvTigerDataSource

public IlvTigerDataSource(String filename)
                   throws MalformedURLException
Constructs a IlvTigerDataSource from the specified file name.

Parameters:
filename - The name of the tiger file to read.
Throws:
MalformedURLException - if the path cannot be parsed as a URL

IlvTigerDataSource

public IlvTigerDataSource(URL url)
                   throws MalformedURLException
Constructs a IlvTigerDataSource from the specified url.

Parameters:
url - The name of the tiger file to read.
Throws:
MalformedURLException - if the path cannot be parsed as a URL
Since:
JViews 7.5
Method Detail

readInfo

public void readInfo(String info)
Creates the table of attributes values from a text file description.

Overrides:
readInfo in class IlvHierarchicalDataSource
Parameters:
info - the description file.
See Also:
IlvHierarchicalDataSource.readInfo(java.lang.String)

setCFCCCodeList

public void setCFCCCodeList(String[] cfccCodes)
Sets the list of accepted CFCC codes

Parameters:
cfccCodes - an array of accepted codes

write

public void write(IlvOutputStream stream)
           throws IOException
Writes this IlvVMAPDataSource to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvTilableDataSource
Parameters:
stream - The stream to write to.
Throws:
IOException - if there is a problem writing to stream.
See Also:
IlvHierarchicalDataSource.write(ilog.views.io.IlvOutputStream)

createTiledIterator

protected IlvMapRegionOfInterestIterator createTiledIterator(IlvMapLayer layer)
Creates an iterator that will iterate through the map features for a specific area of interest.

Specified by:
createTiledIterator in class IlvTilableDataSource
Parameters:
layer - The layer to create objects for.
Returns:
The feature iterator.
See Also:
IlvTilableDataSource.createTiledIterator(ilog.views.maps.beans.IlvMapLayer)

createTiledLayers

protected void createTiledLayers()
Creates all the possible map layers that may be needed when load on demand occurs in the data source insertion layer.

Specified by:
createTiledLayers in class IlvTilableDataSource
See Also:
IlvTilableDataSource.createTiledLayers()

isSourceDataAvailable

protected boolean isSourceDataAvailable()
Checks whether the source data this IlvMapDataSource is based on is available (file, database connection, url...). A .ivl, JViews Maps file keeps references to the original sources the map was built from. It can happen that these sources are not available when opening the map, for example, when the map is transferred to another machine. This method checks that availability. In the case where these sources are not available, all operations that need them are performed from the data embedded in the map, but there is a risk of loosing information (when reprojecting for example). This method should be overridden by subclasses.

Overrides:
isSourceDataAvailable in class IlvMapDataSource
Returns:
Returns true, if the original source data is available.


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