|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.maps.format.IlvMapTileLoader
ilog.views.maps.format.shapefile.IlvShapeFileTileLoader
public class IlvShapeFileTileLoader
This class implements a tile loader to read tiles from an ESRI Shapefile
whose spatial index has been created.
An ESRI Shapefile can be opened in load-on-demand mode if:
.shp file)..shx file)..idx files)..dbf file) is available, the
attributes can be attached to objects.
IlvMapDataPathManager.
IlvInputStream,
the path names are considered relative to the document base of
the input stream.
IlvMapDataPathManager,
IlvInputStream.getDocumentBase()| Constructor Summary | |
|---|---|
IlvShapeFileTileLoader(IlvInputStream stream)
Reads an IlvShapeFileTileLoader from the specified input
stream. |
|
IlvShapeFileTileLoader(String shpFilename,
String dbfFilename,
String shxFilename,
String indexFilename)
Constructs a new .shp file tile loader. |
|
IlvShapeFileTileLoader(URL shpURL,
URL dbfURL,
URL shxURL,
URL indexURL)
Constructs a new .shp file tile loader. |
|
| Method Summary | |
|---|---|
IlvCoordinateSystem |
getCoordinateSystem()
Returns the spatial reference system that describes the coordinate system of the tile loader. |
String |
getDBFFilename()
Returns the .dbf file from which this tile loader loads
attributes. |
IlvFeatureRenderer |
getDefaultFeatureRenderer()
Returns the default feature renderer for this tile loader. |
IlvMapFeatureIterator |
getFeatureIterator(IlvTile tile)
Returns the feature iterator to load features from the specified tile. |
IlvCoordinate |
getLowerRightCorner()
Returns the lower right corner of data read by this tile loader. |
protected IlvShapeFileReader |
getReader(String shpFilename,
String dbfFilename,
String shxFilename)
Creates the IlvShapeFileReader to read from specified files. |
protected IlvShapeFileReader |
getReader(URL shp,
URL dbf,
URL shx)
Creates the IlvShapeFileReader to read from specified files. |
String |
getSHPFilename()
Returns the .shp file from which this tile loader loads
geometries. |
String |
getSHXFilename()
Returns the .shx file used as the shape index file. |
String |
getSpatialIndexFilename()
Returns the spatial index file used by this tile loader to index geometries by tile. |
String |
getStringEncoding()
Returns the character encoding used when reading the .dbf
attribute table. |
IlvRect |
getTileOrigin()
Returns the tile origin. |
IlvCoordinate |
getUpperLeftCorner()
Returns the upper left corner of data read by this tile loader. |
boolean |
isPersistent()
Returns true if the object is persistent. |
void |
setCoordinateSystem(IlvCoordinateSystem cs)
Used to specify the source coordinate system of the geometries handled by this tile loader. |
void |
setStringEncoding(String encoding)
Specifies the character encoding used when reading the .dbf
attribute table. |
void |
write(IlvOutputStream stream)
Writes this tile loader to the specified stream. |
| Methods inherited from class ilog.views.maps.format.IlvMapTileLoader |
|---|
getFeatureRenderer, isAttachingAttributes, load, release, setAttachingAttributes, setFeatureRenderer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvShapeFileTileLoader(String shpFilename,
String dbfFilename,
String shxFilename,
String indexFilename)
throws IOException
.shp file tile loader.
shpFilename - The name of the .shp filename.dbfFilename - The name of the .dbf filename.shxFilename - The name of the .shx filename.indexFilename - The name of the ILOG JViews spatial index filename.
IOException
public IlvShapeFileTileLoader(URL shpURL,
URL dbfURL,
URL shxURL,
URL indexURL)
throws IOException
.shp file tile loader.
shpURL - The URL of the .shp filename.dbfURL - The URL of the .dbf filename.shxURL - The URL of the .shx filename.indexURL - The URL of the ILOG JViews spatial index filename.
IOException
public IlvShapeFileTileLoader(IlvInputStream stream)
throws IlvReadFileException,
IOException
IlvShapeFileTileLoader from the specified input
stream.
stream - The input stream.
IlvReadFileException - If a tile loader cannot be read from the
specified stream.
IOException - If an I/O error occurs.| Method Detail |
|---|
public void write(IlvOutputStream stream)
throws IOException
write in interface IlvPersistentObjectwrite in interface IlvTileLoaderwrite in class IlvMapTileLoaderstream - The output stream.
IOException - thrown when an exception occurs during
the write operation for this object.public IlvRect getTileOrigin()
public IlvCoordinate getUpperLeftCorner()
public IlvCoordinate getLowerRightCorner()
public IlvMapFeatureIterator getFeatureIterator(IlvTile tile)
throws Exception
IlvLookAheadFeatureIterator
to read features for the specified tile.
getFeatureIterator in class IlvMapTileLoadertile - The tile.
null if no features are to be loaded.
ExceptionIlvLookAheadFeatureIteratorpublic IlvFeatureRenderer getDefaultFeatureRenderer()
getDefaultFeatureRenderer in class IlvMapTileLoaderpublic boolean isPersistent()
true if the object is persistent.
isPersistent in interface IlvTileLoaderisPersistent in class IlvMapTileLoaderpublic void setStringEncoding(String encoding)
.dbf
attribute table.
The default is to use the default character encoding of the platform.
See the Java internationalization documentation for the set of supported
encodings.
encoding - The string encoding, or null to read
attributes using the default encoding of the platform.public String getStringEncoding()
.dbf
attribute table.
The default is to use the default character encoding of the platform.
null if
using the default encoding of the platform.public void setCoordinateSystem(IlvCoordinateSystem cs)
cs - The coordinate system of the tile loader.public IlvCoordinateSystem getCoordinateSystem()
protected IlvShapeFileReader getReader(String shpFilename,
String dbfFilename,
String shxFilename)
throws IOException
IlvShapeFileReader to read from specified files.
Subclasses of IlvShapeFileTileLoader can override this method
to produce a reader with the customized parameters for specific
applications.
shpFilename - The name of the .shp filename.dbfFilename - The name of the .dbf filename.shxFilename - The name of the .shx filename.
IlvShapeFileReader
with the specified files.
IOExceptiongetFeatureIterator(ilog.views.tiling.IlvTile)
protected IlvShapeFileReader getReader(URL shp,
URL dbf,
URL shx)
throws IOException
IlvShapeFileReader to read from specified files.
Subclasses of IlvShapeFileTileLoader can override this method
to produce a reader with the customized parameters for specific
applications.
shp - The URL of the .shp filename.dbf - The URL of the .dbf filename.shx - The URL of the .shx filename.
IlvShapeFileReader
with the specified files.
IOExceptiongetFeatureIterator(ilog.views.tiling.IlvTile)public final String getSHPFilename()
.shp file from which this tile loader loads
geometries.
public final String getSHXFilename()
.shx file used as the shape index file.
public final String getDBFFilename()
.dbf file from which this tile loader loads
attributes.
public final String getSpatialIndexFilename()
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||