public class IlvS57Reader extends Object implements IlvMapRegionOfInterestIterator, IlvPersistentObject
Modifier and Type | Field and Description |
---|---|
static String |
AGENCY_ATTR
Name of the feature attribute that contains agency name.
|
protected ArrayList<ilog.views.maps.defense.format.s57.S57Reader.FRIDRecord> |
allFeatures
the current list of features
|
static String |
CODE_ATTR
Name of the feature attribute that contains S57 object code number.
|
static String |
CODENAME_ATTR
Name of the feature attribute that contains S57 object code name.
|
static String |
GROUP_ATTR
Name of the feature attribute that contains S57 group number.
|
static String |
ID_ATTR
Name of the feature attribute that contains S57 object id.
|
static String |
TYPE_ATTR
Name of the feature attribute that contains primitive type.
|
Constructor and Description |
---|
IlvS57Reader()
Creates a new
IlvS57Reader . |
IlvS57Reader(IlvInputStream stream)
Reconstructs an S57 reader from parameters read from an input stream.
|
IlvS57Reader(String fileName)
Reads an S57 file (if
fileName ends with 000) or a catalog. |
IlvS57Reader(URL url)
Reads an S57 file (if
fileName ends with 000) or a catalog. |
Modifier and Type | Method and Description |
---|---|
void |
clearFeatures()
Clears all the features read.
|
IlvMapRegionOfInterestIterator |
deriveReader(IlvFeatureClassInformation vfeatureClass,
IlvGeometryClassFilter vgeometryClass)
Creates a derived reader that only returns features with the selected
feature class and geometry class.
|
void |
dispose()
Releases the resources allocated by the feature iterator
(files, connections, and so on).
|
static String |
findAttributeNameFromLabel(String label)
A utility method to retrieve the S57 attribute identifier from the
attribute label.
|
IlvCoordinateSystem |
getCoordinateSystem()
Returns the spatial reference system that describes the coordinate
system of geometric coordinates of the map features.
|
IlvFeatureRenderer |
getDefaultFeatureRenderer()
Returns a renderer that can be used to translate the map features returned
by this iterator into graphic objects.
|
ilog.views.maps.defense.format.s57.S57Reader.FRIDRecord[] |
getFeatures() |
Rectangle2D |
getLatLonBounds()
Computes the bounds for all the features read.
|
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. |
IlvThreadMonitoringData |
getMonitoringData()
Returns the thread monitoring 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. |
boolean |
isGeoreferenced()
Returns
true if the map reader can provide the
source projection of its map features. |
void |
readCatalog(URL catalogURL,
boolean skipNon000Files,
IlvThreadMonitoringData data)
Reads a S57 catalog.
|
ilog.views.maps.defense.format.s57.S57Reader.DSIDRecord |
readFile(URL url)
Decodes a file.
|
void |
restart()
Rewinds the iterator for a new use.
|
void |
setFeatureClassFilter(IlvFeatureClassInformation vfeatureClass)
Sets a filter on the S57 code.
|
void |
setGeometryClassFilter(IlvGeometryClassFilter vgeometryClass)
Sets a filter on the geometry class.
|
void |
setMonitoringData(IlvThreadMonitoringData monitorData)
Sets the thread monitoring information.
|
void |
setRegionOfInterest(double minX,
double minY,
double maxX,
double maxY)
Sets the region of interest to return features for.
|
void |
write(IlvOutputStream stream)
Writes the attributes of a persistent object.
|
public static final String AGENCY_ATTR
public static final String ID_ATTR
public static final String CODE_ATTR
public static final String GROUP_ATTR
public static final String TYPE_ATTR
public static final String CODENAME_ATTR
protected ArrayList<ilog.views.maps.defense.format.s57.S57Reader.FRIDRecord> allFeatures
public IlvS57Reader()
IlvS57Reader
.public IlvS57Reader(String fileName) throws IOException
fileName
ends with 000) or a catalog.
The resulting features can be retrieved usingfileName
- The file name or catalog to read.IOException
public IlvS57Reader(URL url) throws IOException
fileName
ends with 000) or a catalog.
The resulting features can be retrieved usingurl
- URL of the S57 file.IOException
- if the url cannot be opened.public IlvS57Reader(IlvInputStream stream)
stream
- The stream to read from.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 Rectangle2D getLatLonBounds()
getLatLonBounds
in interface IlvMapRegionOfInterestIterator
lat/lon
bounds in degrees.public void setRegionOfInterest(double minX, double minY, double maxX, double maxY)
IlvMapFeatureIterator.getNextFeature()
method should not return any feature which geometry is outside this area.setRegionOfInterest
in interface IlvMapRegionOfInterestIterator
minX
- longitude min in radians.minY
- latitude min in radians.maxX
- longitude max in radians.maxY
- latitude max in radians.IlvMapRegionOfInterestIterator.setRegionOfInterest(double,
double, double, double)
public void restart()
restart
in interface IlvMapReusableFeatureIterator
IlvMapReusableFeatureIterator.restart()
public IlvThreadMonitoringData getMonitoringData()
monitorData
.public void setMonitoringData(IlvThreadMonitoringData monitorData)
monitorData
- The monitorData
to set.public IlvMapFeature getNextFeature()
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
IlvMapFeatureIterator.getNextFeature()
public boolean isGeoreferenced()
true
if the map reader can provide the
source projection of its map features.isGeoreferenced
in interface IlvMapFeatureIterator
IlvMapFeatureIterator.isGeoreferenced()
public IlvCoordinateSystem getCoordinateSystem()
getCoordinateSystem
in interface IlvMapFeatureIterator
null
if the coordinate system is unknown.IlvMapFeatureIterator.getCoordinateSystem()
public IlvCoordinate getUpperLeftCorner()
null
if the iterator cannot provide this information.getUpperLeftCorner
in interface IlvMapFeatureIterator
IlvMapFeatureIterator.getUpperLeftCorner()
public IlvCoordinate getLowerRightCorner()
null
if the iterator cannot provide this information.getLowerRightCorner
in interface IlvMapFeatureIterator
IlvMapFeatureIterator.getLowerRightCorner()
public IlvFeatureRenderer getDefaultFeatureRenderer()
getDefaultFeatureRenderer
in interface IlvMapFeatureIterator
IlvMapFeatureIterator.getDefaultFeatureRenderer()
public void dispose()
dispose
in interface IlvMapFeatureIterator
IlvMapFeatureIterator.dispose()
public IlvMapRegionOfInterestIterator deriveReader(IlvFeatureClassInformation vfeatureClass, IlvGeometryClassFilter vgeometryClass)
vfeatureClass
- The feature class to filter features with.vgeometryClass
- Information about the subclass of IlvMapGeometry
to
prevent the mixing of different types of feature on the same
layer.setFeatureClassFilter(IlvFeatureClassInformation)
,
setGeometryClassFilter(IlvGeometryClassFilter)
public void setFeatureClassFilter(IlvFeatureClassInformation vfeatureClass)
vfeatureClass
- Information about the feature to filter.public void setGeometryClassFilter(IlvGeometryClassFilter vgeometryClass)
vgeometryClass
- Information about the accepted geometries.public static String findAttributeNameFromLabel(String label)
label
- The label to find the identifier for.BUSIGL
.public ilog.views.maps.defense.format.s57.S57Reader.DSIDRecord readFile(URL url) throws IOException
url
- url of the S57 file.IOException
public ilog.views.maps.defense.format.s57.S57Reader.FRIDRecord[] getFeatures()
public void readCatalog(URL catalogURL, boolean skipNon000Files, IlvThreadMonitoringData data) throws IOException
catalogURL
- skipNon000Files
- data
- IOException
public void clearFeatures()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.