public class IlvGeotiffReader extends Object implements IlvMapFeatureIterator
IlvMapFeatureIterator
interface.
This reader uses org.apache.batik based libraries included in JViews jars ,
and needs these libraries in order to compile and run.
The georeferencing of the produced image is only available if the
file contains a coordinate system tag. This reader is also able to
retrieve a given tile assuming that the file is a tiled TIFF file.Constructor and Description |
---|
IlvGeotiffReader(String fileName)
Constructs a new TIFF reader by passing a TIFF file name .
|
IlvGeotiffReader(String fileName,
IlvWKTCoordinateSystemDictionary WKTdictionary)
Constructs a new TIFF reader by passing a TIFF file name and
a WKT coordinate system dictionary.
|
IlvGeotiffReader(URL url)
Constructs a new TIFF reader by passing a TIFF URL.
|
IlvGeotiffReader(URL url,
IlvWKTCoordinateSystemDictionary WKTdictionary)
Constructs a new TIFF reader by passing a TIFF URL and
a WKT coordinate system dictionary.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
This dispose method does not close the stream opened by the reader.
|
protected void |
finalize()
Calls
dispose() . |
IlvCoordinateSystem |
getCoordinateSystem()
Returns the coordinate system in which the image is expressed.
|
IlvFeatureRenderer |
getDefaultFeatureRenderer()
Retrieves the default feature renderer, which is an
IlvDefaultImageRenderer . |
RenderedImage |
getImage()
Returns the
RenderedImage opened by the reader. |
IlvCoordinate |
getLowerRightCorner()
Returns the lower right corner of the image.
|
IlvMapFeature |
getNextFeature()
Returns the map feature whose geometry
is an
IlvMapImage . |
IlvProjection |
getProjection()
Returns the projection in which the image is expressed.
|
RenderedImage |
getTile(int c,
int r)
Retrieves the tile at row c and column r
as a
RenderedImage . |
IlvRect |
getTileOrigin()
Retrieves the tile origin if the TIFF file is tiled.
|
IlvCoordinate |
getUpperLeftCorner()
Returns the upper left corner of the image.
|
boolean |
isGeoreferenced()
Checks the content of the TIFF directory.
|
boolean |
isInteractiveProjectionInputEnabled()
Returns true if the interactive input of the projection is enabled.
|
protected IlvMapGeometry |
makeGeometry()
Constructs the geometry, which is an
IlvMapImage . |
void |
setCoordinateSystem(IlvCoordinateSystem coordsys)
Sets the coordinate system in which the image is expressed.
|
void |
setInteractiveProjectionInputEnabled(boolean interactiveProjectionInputEnabled)
Enables the display of a dialog when projection information is missing (default is
true ). |
void |
setLowerRightCorner(IlvCoordinate c)
Sets the lower right corner of the image.
|
void |
setUpperLeftCorner(IlvCoordinate c)
Sets the upper left corner of the image.
|
public IlvGeotiffReader(String fileName, IlvWKTCoordinateSystemDictionary WKTdictionary) throws IOException
fileName
- The TIFF file name.WKTdictionary
- The dictionary of coordinate systems.IOException
public IlvGeotiffReader(URL url, IlvWKTCoordinateSystemDictionary WKTdictionary) throws IOException
url
- The TIFF URLWKTdictionary
- The dictionary of coordinate systems.IOException
public IlvGeotiffReader(URL url) throws IOException
url
- The TIFF file name.IOException
public IlvGeotiffReader(String fileName) throws IOException
fileName
- The TIFF file name.IOException
public IlvRect getTileOrigin() throws Exception
IllegalArgumentException
is thrown.Exception
- if the Tiff file is not tiled.public RenderedImage getTile(int c, int r)
RenderedImage
. The returned value can be null
if
the requested tile is not part of the image.c
- The tile column.r
- The tile row.protected IlvMapGeometry makeGeometry() throws IlvProjectionException, IOException
IlvMapImage
.IOException
IlvProjectionException
public IlvMapFeature getNextFeature() throws IOException
IlvMapImage
.getNextFeature
in interface IlvMapFeatureIterator
IlvMapGeometry
.IOException
- if the image cannot be decoded.public boolean isGeoreferenced()
isGeoreferenced
in interface IlvMapFeatureIterator
IlvMapFeatureIterator.isGeoreferenced()
public IlvProjection getProjection()
public IlvCoordinateSystem getCoordinateSystem()
getCoordinateSystem
in interface IlvMapFeatureIterator
public void setCoordinateSystem(IlvCoordinateSystem coordsys)
coordsys
- The coordinate system to use.public void setLowerRightCorner(IlvCoordinate c)
c
- The lower right cornerpublic IlvCoordinate getLowerRightCorner()
getLowerRightCorner
in interface IlvMapFeatureIterator
public void setUpperLeftCorner(IlvCoordinate c)
c
- The upper left corner of the image.public IlvCoordinate getUpperLeftCorner()
getUpperLeftCorner
in interface IlvMapFeatureIterator
public void dispose()
dispose
in interface IlvMapFeatureIterator
public RenderedImage getImage()
RenderedImage
opened by the reader.RenderedImage
opened by the reader.public IlvFeatureRenderer getDefaultFeatureRenderer()
IlvDefaultImageRenderer
.getDefaultFeatureRenderer
in interface IlvMapFeatureIterator
IlvDefaultImageRenderer
.public boolean isInteractiveProjectionInputEnabled()
true
if the interactive input of the projection is enabled.public void setInteractiveProjectionInputEnabled(boolean interactiveProjectionInputEnabled)
true
).
Some GeoTiff files have missing coordinate system information.
If you enable the interactive projection input, a dialog will then be displayed asking the user to interactively select the image internal projection.interactiveProjectionInputEnabled
- true
to enable interactive projection input.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.