public class IlvShapeFileTileLoader extends IlvMapTileLoader
.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()
,
Serialized FormConstructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
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. |
URL |
getDBFURL()
Retrieves the DBF file URL.
|
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. |
URL |
getSHPURL()
Retrieves the shape file URL.
|
String |
getSHXFilename()
Returns the
.shx file used as the shape index file. |
URL |
getSHXURL()
Retrieves the shx file URL.
|
String |
getSpatialIndexFilename()
Returns the spatial index file used by this tile loader to index
geometries by tile.
|
URL |
getSpatialIndexURL()
Retrieves the spatial index file URL.
|
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 |
isInterningStringAttributes()
Returns
true if the String attributes that are read are
interned. |
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 |
setInterningStringAttributes(boolean interningStrings)
Specifies whether the String attributes that are read are
interned.
|
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.
|
getFeatureRenderer, isAttachingAttributes, load, release, setAttachingAttributes, setFeatureRenderer
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 Perforce 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 Perforce 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.public void write(IlvOutputStream stream) throws IOException
write
in interface IlvPersistentObject
write
in interface IlvTileLoader
write
in class IlvMapTileLoader
stream
- 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 IlvMapTileLoader
tile
- The tile.null
if no features are to be loaded.Exception
IlvLookAheadFeatureIterator
public IlvFeatureRenderer getDefaultFeatureRenderer()
getDefaultFeatureRenderer
in class IlvMapTileLoader
public boolean isPersistent()
true
if the object is persistent.isPersistent
in interface IlvTileLoader
isPersistent
in class IlvMapTileLoader
public 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.IOException
getFeatureIterator(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.IOException
getFeatureIterator(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()
public URL getSHPURL()
public URL getSpatialIndexURL()
public URL getDBFURL()
public URL getSHXURL()
public boolean isInterningStringAttributes()
true
if the String attributes that are read are
interned. The default is false
.IlvDBFReader.isInterningStringAttributes()
public void setInterningStringAttributes(boolean interningStrings)
IlvDBFReader.setInterningStringAttributes(boolean)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.