public class IlvImageReader extends Object implements IlvMapFeatureIterator
IlvMapFeatureIterator specialized
for reading image files. The supported image formats are those
supported by the Java Platform (GIF, JPEG, or PNG).| Constructor and Description |
|---|
IlvImageReader(String filename,
IlvCoordinate ul,
IlvCoordinate lr)
Constructs an
IlvImageReader
by specifying the name of the image file to read and the
coordinates of the image. |
IlvImageReader(URL url,
IlvCoordinate ul,
IlvCoordinate lr)
Constructs an
IlvImageReader
by specifying the URL of the image file to read and the
coordinates of the image. |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes this reader.
|
IlvCoordinateSystem |
getCoordinateSystem()
Returns the associated coordinate system that has been set
by the
setCoordinateSystem method or null
if none has been set. |
IlvFeatureRenderer |
getDefaultFeatureRenderer()
Returns an
IlvFeatureRenderer suitable
for the IlvMapFeature built by this
reader. |
IlvCoordinate |
getLowerRightCorner()
Retrieves the lower right corner of the image or
null if none has been set. |
IlvMapFeature |
getNextFeature()
Returns the
IlvMapFeature whose geometry is
an IlvMapImage. |
IlvCoordinate |
getUpperLeftCorner()
Retrieves the upper left corner of the image or
null if none has been set. |
boolean |
isGeoreferenced()
Tells if the reader is georeferenced (that is
if a source projection has been defined for this reader.
|
void |
setCoordinateSystem(IlvCoordinateSystem cs)
Sets the source coordinate system of the reader.
|
public IlvImageReader(String filename, IlvCoordinate ul, IlvCoordinate lr) throws IOException, IlvMapFormatException, FileNotFoundException
IlvImageReader
by specifying the name of the image file to read and the
coordinates of the image.filename - The name of the image file.ul - The upper left coordinates of the image.lr - The lower right coordinates of the image.FileNotFoundException - The file specified
by filename does not exist.IOExceptionIlvMapFormatExceptionFileNotFoundExceptionpublic IlvImageReader(URL url, IlvCoordinate ul, IlvCoordinate lr) throws IOException, IlvMapFormatException
IlvImageReader
by specifying the URL of the image file to read and the
coordinates of the image.url - The name of the image file.ul - The upper left coordinates of the image.lr - The lower right coordinates of the image.IOExceptionIlvMapFormatExceptionpublic IlvMapFeature getNextFeature() throws IOException
IlvMapFeature whose geometry is
an IlvMapImage. Since an image is only
one map feature, a second call to this method will return
null.getNextFeature in interface IlvMapFeatureIteratorIlvMapFeature.IOExceptionpublic void setCoordinateSystem(IlvCoordinateSystem cs)
cs - The source coordinate system.public IlvCoordinate getLowerRightCorner()
null if none has been set.getLowerRightCorner in interface IlvMapFeatureIteratorpublic IlvCoordinate getUpperLeftCorner()
null if none has been set.getUpperLeftCorner in interface IlvMapFeatureIteratorpublic IlvFeatureRenderer getDefaultFeatureRenderer()
IlvFeatureRenderer suitable
for the IlvMapFeature built by this
reader. The returned IlvFeatureRenderer is
an IlvDefaultImageRenderer.getDefaultFeatureRenderer in interface IlvMapFeatureIteratorIlvDefaultImageRenderer.public boolean isGeoreferenced()
isGeoreferenced in interface IlvMapFeatureIteratortrue if a source projection has been set,
false otherwise.public IlvCoordinateSystem getCoordinateSystem()
setCoordinateSystem method or null
if none has been set.getCoordinateSystem in interface IlvMapFeatureIteratornull
if the coordinate system is unknown.public void dispose()
dispose in interface IlvMapFeatureIterator© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.