public class IlvTigerReader extends Object implements IlvMapRegionOfInterestIterator, IlvPersistentObject
IlvTigerDataSource
.Constructor and Description |
---|
IlvTigerReader(IlvInputStream stream)
Reconstructs a tiger reader from parameters read on an input stream.
|
IlvTigerReader(String fileName)
Creates a new
IlvTigerReader object. |
IlvTigerReader(URL url)
Creates a new
IlvTigerReader object. |
Modifier and Type | Method and Description |
---|---|
IlvTigerReader |
deriveReader(IlvTigerFeatureClass fClass,
Class<?> restrictTo)
Creates a derived reader that will only return features with the selected feature class and geometry class
|
void |
dispose()
Releases the resources allocated by the feature iterator
(files, connections, and so on).
|
IlvCoordinateSystem |
getCoordinateSystem()
Returns the NAD83 coordinate system.
|
IlvFeatureRenderer |
getDefaultFeatureRenderer()
Returns a renderer that can be used to translate the map features returned
by this iterator into graphic objects.
|
protected String |
getFileName()
Returns the fileName if this reader has been created using a
|
Rectangle2D |
getLatLonBounds()
Returns the latitude/longitude bounds for the list of geometries contained in the Tiger files.
|
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. |
protected URL |
getURL()
Returns the URL if this reader has been created using an URL.
|
boolean |
isGeoreferenced()
Returns
true . |
boolean |
recordMatches(IlvFeatureAttributeProperty properties)
Checks if the properties passed match the feature class filter.
|
void |
restart()
Rewinds the iterator for a new use.
|
void |
setFeatureClassFilter(IlvTigerFeatureClass featureClass)
Gives a filter class used to ignore some of the tiger features.
|
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 IlvTigerReader(String fileName)
IlvTigerReader
object.
TIGER/Line data is organized in "*.RTn" files, where n is a number indicating the file content.
All those files must be present and decompressed in the same place as the parameter file.fileName
- Any of the TIGER/Line file names.public IlvTigerReader(URL url) throws IOException
IlvTigerReader
object.url
- URL towards any of the TIGER/Line files.IOException
public IlvTigerReader(IlvInputStream stream)
stream
- stream to read from.protected String getFileName()
protected URL getURL()
public void setFeatureClassFilter(IlvTigerFeatureClass featureClass)
featureClass
- The featureClass to set as filter.public IlvTigerReader deriveReader(IlvTigerFeatureClass fClass, Class<?> restrictTo)
fClass
- feature class to filter features with.restrictTo
- subclass of IlvMapGeometry
to prevent mixing different types of features on the same layer.public boolean recordMatches(IlvFeatureAttributeProperty properties)
properties
- Properties to search for the "CFCC" field.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
IlvMapFeatureIterator.getNextFeature()
,
recordMatches(IlvFeatureAttributeProperty)
public boolean isGeoreferenced()
true
.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 void restart()
restart
in interface IlvMapReusableFeatureIterator
IlvMapReusableFeatureIterator.restart()
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 Rectangle2D getLatLonBounds()
getLatLonBounds
in interface IlvMapRegionOfInterestIterator
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)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.