public class IlvVMAPReader extends Object implements IlvMapRegionOfInterestIterator, IlvPersistentObject
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_FACC_CODE
Property name for FACC Code.
|
Constructor and Description |
---|
IlvVMAPReader(IlvInputStream stream)
Constructs an
IlvVMAPReader from the input stream |
IlvVMAPReader(String databasePath)
Constructs a IlvVMAPReader from a specified database path.
|
Modifier and Type | Method and Description |
---|---|
void |
clearRegionOfInterest()
Sets the reader not to use the previously specified region of interest.
|
void |
clearTableCache()
Deletes all previously read tables (stored in cache).
|
void |
closeAllVMAPDataInputs()
Close all table data inputs opened by this VMAP reader
|
void |
dispose()
Releases resources uses by this reader.
|
IlvCoordinateSystem |
getCoordinateSystem()
Returns the spatial reference system that describes the coordinate
system of geometric coordinates of the map features.
|
IlvFeatureRenderer |
getDefaultFeatureRenderer()
Returns the default feature renderer used for the rendering of
map features read by this reader.
|
String[] |
getFeatureClassList(String[] faccCodes1)
Returns the list of feature classes that contain at least one of specified facc codes
|
IlvVMAPGeometryFactory |
getGeometryFactory(IlvVMAPTable featureTable)
Gets appropriate
IlvMapGeometry factory for a given feature class table. |
Rectangle2D |
getLatLonBounds()
Returns the latitude/longitude bounds for the list of all geometries or null if such is not available.
|
String |
getLibraryName()
Returns the name of the library currently being built.
|
IlvCoordinate |
getLowerRightCorner()
Returns the lower right corner of the rectangle containing all
the map feature of the list, or
null
if the iterator cannot provide this information. |
IlvMapFeature |
getNextFeature()
Returns the next map feature of the iterator or
null if the iteration is finished. |
IlvCoordinate |
getUpperLeftCorner()
Returns the upper left corner of the rectangle containing all
the map features of the list, or
null
if the iterator cannot provide this information. |
IlvVMAPTable |
getVMAPTable(String filename,
boolean readFully)
Gets the VMAP table of specified filename.
|
boolean |
isGeoreferenced()
Returns
true if the map reader can provide the
source projection of its map features. |
void |
restart()
Rewinds the iterator for a new use.
|
void |
setFaccFilter(String[] faccCodes)
Configures this reader to read only features with specified FACC codes.
|
void |
setFeatureClassFilter(String[] featureClasses)
Configures this reader to read only features of specified feature classes.
|
void |
setFeatureClassFilter(String[] featureClasses,
String[] faccCodes)
Configures this reader to read only features of specified feature classes and with specified
facc codes only.
|
void |
setLibraryName(String libraryName)
Sets the library used from which to build data.
|
void |
setRegionOfInterest(double lonMin,
double latMin,
double lonMax,
double latMax)
Sets region of interest to keep only features in this region when reading VMAP database.
|
void |
setUseOptionalData(boolean use)
Sets whether the reader should use VMAP feature records as gis components ID.
|
void |
setVerbose(boolean verbose)
Print error messages on the standard output stream.
|
void |
setVerbose(boolean verbose,
PrintStream printStream)
Print error messages on the specified output.
|
void |
write(IlvOutputStream stream)
Writes the attributes of a persistent object.
|
public static final String PROPERTY_FACC_CODE
public IlvVMAPReader(String databasePath)
databasePath
- Database directory.public IlvVMAPReader(IlvInputStream stream) throws IlvReadFileException
IlvVMAPReader
from the input streamstream
- the IlvInputStream
to read fromIlvReadFileException
public void write(IlvOutputStream stream) throws IOException
write
in interface IlvPersistentObject
stream
- the output streamIOException
- thrown when an exception occurs during
the write operation for this object.IlvPersistentObject.write(ilog.views.io.IlvOutputStream)
public void setRegionOfInterest(double lonMin, double latMin, double lonMax, double latMax)
setRegionOfInterest
in interface IlvMapRegionOfInterestIterator
lonMin
- min longitude (x) in Radians.latMin
- min latitude (y) in Radians.lonMax
- max longitude (x) in Radians.latMax
- max latitude (y) in Radians.public void clearRegionOfInterest()
public void setVerbose(boolean verbose, PrintStream printStream)
verbose
- true
for verbose messages.printStream
- Print stream where messages should go.public void setVerbose(boolean verbose)
verbose
- true
for verbose messages.public void setUseOptionalData(boolean use)
use
- true
if optional data should be read.public void setFaccFilter(String[] faccCodes)
IlvMapFeatureIterator
faccCodes
- the FACC codes of features to read.public String[] getFeatureClassList(String[] faccCodes1)
faccCodes1
- a list of desired facc codespublic void setFeatureClassFilter(String[] featureClasses)
IlvMapFeatureIterator
featureClasses
- the featureClasses to read.public void setFeatureClassFilter(String[] featureClasses, String[] faccCodes)
IlvMapFeatureIterator
featureClasses
- the featureClasses to read.faccCodes
- the facc codes of features to read.public IlvMapFeature getNextFeature() throws IOException
null
if the iteration is finished.
The returned map feature must be considered as volatile and
can be modified by the reader during the next call to its
getNextFeature
function.getNextFeature
in interface IlvMapFeatureIterator
IOException
- if an exception occurred when reading VMAP files.public void closeAllVMAPDataInputs() throws IOException
IOException
- if an exception occurred when closing input streams.public IlvVMAPTable getVMAPTable(String filename, boolean readFully) throws IOException, IlvVMAPFormatException
filename
- File name of requested VMAP table.readFully
- @see IlvVMAPTable#readTable(boolean)IOException
- if there was an error when reading VMAP files.IlvVMAPFormatException
- if the table does not comply with VMAP specifications.public IlvVMAPGeometryFactory getGeometryFactory(IlvVMAPTable featureTable)
IlvMapGeometry
factory for a given feature class table.featureTable
- the specified VMAP table.public String getLibraryName()
public void setLibraryName(String libraryName)
libraryName
- Name of library to use.public boolean isGeoreferenced()
true
if the map reader can provide the
source projection of its map features.isGeoreferenced
in interface IlvMapFeatureIterator
public IlvCoordinateSystem getCoordinateSystem()
getCoordinateSystem
in interface IlvMapFeatureIterator
null
if the coordinate system is unknown.public IlvCoordinate getUpperLeftCorner()
null
if the iterator cannot provide this information.getUpperLeftCorner
in interface IlvMapFeatureIterator
public IlvCoordinate getLowerRightCorner()
null
if the iterator cannot provide this information.getLowerRightCorner
in interface IlvMapFeatureIterator
public IlvFeatureRenderer getDefaultFeatureRenderer()
getDefaultFeatureRenderer
in interface IlvMapFeatureIterator
IlvFeatureRenderer
for this readerpublic void dispose()
dispose
in interface IlvMapFeatureIterator
public void clearTableCache()
public void restart()
restart
in interface IlvMapReusableFeatureIterator
public Rectangle2D getLatLonBounds()
getLatLonBounds
in interface IlvMapRegionOfInterestIterator
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.