Options > Maps > Predefined Readers > The GeoTIFF Reader > The IlvGeoTIFFReader Class
The IlvGeoTIFFReader Class
The IlvGeoTIFFReader class implements the IlvFeatureIterator abstract class. The getNextFeature method returns an IlvMapFeature containing an IlvMapImage geometry. The TIFF image can then be rendered by the IlvDefaultImageRenderer to produce an IlvIcon. The TIFF reader takes one parameter as argument: the TIFF file name.
The reader can be used as any reader that conforms to the Maps reader framework:
IlvMapsError status;
IlvGeoTIFFReader* reader =
new IlvGeoTIFFReader(filename);
status = reader->getInitStatus();
if(status != IlvMaps::NoError())
return status;
const IlvMapFeature* feature =
reader->getNextFeature(status);
if(status != IlvMaps::NoError())
return status;
IlvFeatureRenderer* renderer = reader->getDefaultFeatureRenderer(display);
// Image is known to be in the geographic projection.
IlvGeographicProjection* projection = new IlvGeographicProjection();
IlvMapInfo info(projection);
IlvGraphic* graphic = renderer->makeGraphic(*feature,
info,
status);
IlvManager* manager = new IlvManager(display);
manager->addObject(graphic, IlFalse);
return IlvMaps::NoError();
Published date: 05/24/2022
Last modified date: 02/24/2022