gistoolkit.datasources.imagefile
Class RasterCatalogDataSource

java.lang.Object
  extended bygistoolkit.datasources.SimpleDataSource
      extended bygistoolkit.datasources.imagefile.RasterCatalogDataSource
All Implemented Interfaces:
DataSource, RasterDatasource

public class RasterCatalogDataSource
extends SimpleDataSource
implements RasterDatasource

The raster catalog is a way to split large georeferenced images into smaller "tiles", that can be more easilly handled. The RasterCatalogCreator Does the acual Creating of the catalog, this datasource just reads it and assembles images from the tiles.


Field Summary
 
Fields inherited from class gistoolkit.datasources.SimpleDataSource
 
Constructor Summary
RasterCatalogDataSource()
          Creates new RasterCatalogDataSource
RasterCatalogDataSource(java.io.File inDirectory)
          Creates new RasterCatalogDataSource with the given file.
 
Method Summary
 java.lang.String getCatalogDirectory()
          Get the name of the directory where the images are stored.
 int getImageHeight()
          Return the height of the image to generate
 int getImageWidth()
          Return the width of the image to generate
 java.lang.String getIndexFileName()
          Get the name of the index file.
 Node getNode()
          Get the configuration information for this layer.
 Style getStyle()
          Get the style to use with this datasource.
 void loadIndex()
          Create the index should it not exist.
 GISDataset readDataset()
          Reads all the objects from the data source.
 GISDataset readDataset(Envelope inEnvelope)
          Reads only the objects from the data source that intersect these envelope.
 Envelope readEnvelope()
          Returns the bounding rectangle of all the shapes in the Data Source.
protected  GISDataset readShapes(Envelope inEnvelope)
          This method should return the shapes from the data source
 void setCatalogDirectory(java.lang.String inCatalogDirectory)
          Set the name of the directory where the images are stored.
 void setFromProjection(Projection inProjection)
          Set the projection from which this data should be projected.
 void setImageHeight(int inHeight)
          Set the height of the image to retrieve.
 void setImageWidth(int inWidth)
          Set the width of the image to retrieve.
 void setIndexFileName(java.lang.String inIndexFileName)
          Set the name of the index file.
 void setNode(Node inNode)
          Set the configuration information for this layer.
 
Methods inherited from class gistoolkit.datasources.SimpleDataSource
addDataSourceListener, clearCache, commit, delete, doCommit, doDelete, doInsert, doRollback, doUpdate, filterDataset, fireCommit, fireDelete, fireInsert, fireRead, fireRollBack, fireUpdate, getCached, getCacheDataset, getCacheEnvelope, getEnvelope, getFilter, getFromProjection, getName, getToProjection, getValidShapeTypes, insert, isCachedProjected, isUpdateable, projectBackward, projectForward, queryFromCache, removeDataSourceListener, rollback, setCache, setCached, setFilter, setName, setProjection, setToProjection, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gistoolkit.datasources.DataSource
addDataSourceListener, commit, delete, getEnvelope, getFilter, getFromProjection, getName, getToProjection, insert, isUpdateable, removeDataSourceListener, rollback, setFilter, setName, setToProjection, update
 

Constructor Detail

RasterCatalogDataSource

public RasterCatalogDataSource()
Creates new RasterCatalogDataSource


RasterCatalogDataSource

public RasterCatalogDataSource(java.io.File inDirectory)
                        throws java.lang.Exception
Creates new RasterCatalogDataSource with the given file.

Method Detail

setCatalogDirectory

public void setCatalogDirectory(java.lang.String inCatalogDirectory)
                         throws java.io.FileNotFoundException
Set the name of the directory where the images are stored.

Throws:
java.io.FileNotFoundException

getCatalogDirectory

public java.lang.String getCatalogDirectory()
Get the name of the directory where the images are stored.


setImageWidth

public void setImageWidth(int inWidth)
Set the width of the image to retrieve. The data source can use this information to generate the appropriate rastor shapes. Several shapes may be generated or just one that cover this area. This is just a suggestion.

Specified by:
setImageWidth in interface RasterDatasource

getImageWidth

public int getImageWidth()
Return the width of the image to generate


setImageHeight

public void setImageHeight(int inHeight)
Description copied from interface: RasterDatasource
Set the height of the image to retrieve. The data source can use this information to generate the appropriate rastor shapes. Several shapes may be generated or just one that cover this area. This is just a suggestion.

Specified by:
setImageHeight in interface RasterDatasource

getImageHeight

public int getImageHeight()
Return the height of the image to generate


setFromProjection

public void setFromProjection(Projection inProjection)
                       throws java.lang.Exception
Set the projection from which this data should be projected.

Specified by:
setFromProjection in interface DataSource
Overrides:
setFromProjection in class SimpleDataSource
Throws:
java.lang.Exception

getNode

public Node getNode()
Get the configuration information for this layer.

Specified by:
getNode in interface DataSource
Overrides:
getNode in class SimpleDataSource

setNode

public void setNode(Node inNode)
             throws java.lang.Exception
Set the configuration information for this layer.

Specified by:
setNode in interface DataSource
Overrides:
setNode in class SimpleDataSource
Throws:
java.lang.Exception

readEnvelope

public Envelope readEnvelope()
                      throws java.lang.Exception
Returns the bounding rectangle of all the shapes in the Data Source.

Specified by:
readEnvelope in class SimpleDataSource
Throws:
java.lang.Exception

readDataset

public GISDataset readDataset(Envelope inEnvelope)
                       throws java.lang.Exception
Reads only the objects from the data source that intersect these envelope.

Specified by:
readDataset in interface DataSource
Overrides:
readDataset in class SimpleDataSource
Throws:
java.lang.Exception

readDataset

public GISDataset readDataset()
                       throws java.lang.Exception
Reads all the objects from the data source.

Specified by:
readDataset in interface DataSource
Overrides:
readDataset in class SimpleDataSource
Throws:
java.lang.Exception

readShapes

protected GISDataset readShapes(Envelope inEnvelope)
                         throws java.lang.Exception
This method should return the shapes from the data source

Specified by:
readShapes in class SimpleDataSource
Throws:
java.lang.Exception

setIndexFileName

public void setIndexFileName(java.lang.String inIndexFileName)
Set the name of the index file.


getIndexFileName

public java.lang.String getIndexFileName()
Get the name of the index file.


loadIndex

public void loadIndex()
               throws java.lang.Exception
Create the index should it not exist.

Throws:
java.lang.Exception

getStyle

public Style getStyle()
Get the style to use with this datasource.

Specified by:
getStyle in interface DataSource
Overrides:
getStyle in class SimpleDataSource