The TIFF reader can take two parameters as arguments:
the TIFF file name and a file that contains a connection between the
tag describing the coordinate system used by the image and the corresponding
WKT string. The reader retrieves the coordinate system of the image
in a WKT format if the image contains the appropriate tag, and then
retrieves the
IlvCoordinateSystem through the
IlvWKTCoordinateSystemDictionary class. This
coordinate system is then available through the
getCoordinateSystem method.
The default constructor, however, only takes the TIFF
file name parameter and uses an internal WKT file (wktdictionary.txt)
found in Rogue Wave® JViews jar files.
The reader can be used in the same way as any reader
that conforms to the Maps reader framework:
IlvGeotiffReader reader = new IlvGeotiffReader(tiffFile);
IlvFeatureRenderer renderer = reader.getDefaultFeatureRenderer();
IlvCoordinateSystem coordSys = reader.getCoordinateSystem();
if (coordSys != null)
manager.setNamedProperty(new IlvCoordinateSystemProperty(coordSys));
else
manager.removeNamedProperty(IlvCoordinateSystemProperty.NAME);
IlvCoordinateTransformation tr =
IlvCoordinateTransformation.CreateTransformation(coordSys, coordSys);
IlvGraphic g = renderer.makeGraphic(f, tr);
manager.addObject(g, false);