rwlogo

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
List of all members | Public Member Functions | Protected Member Functions
IlvGeoTIFFReader Class Reference

This class is an IlvMapFeatureIterator specialized for reading GeoTIFF files. More...

#include <ilviews/maps/format/geotiff/gtiffreader.h>

Inheritance diagram for IlvGeoTIFFReader:
IlvMapFeatureIterator

Public Member Functions

 IlvGeoTIFFReader (const char *filename)
 Creates an instance of the GeoTIFF reader from a file name. More...
 
 IlvGeoTIFFReader (istream &input)
 Creates an instance of the GeoTIFF reader from an istream. More...
 
IlInt getColumnCount ()
 Returns the number of columns. More...
 
IlvFeatureRenderergetDefaultFeatureRenderer (IlvDisplay *display)
 Returns the default renderer for this feature iterator. More...
 
IlInt getImageHeight ()
 Returns the height of the image. More...
 
IlInt getImageWidth ()
 Returns the width of the image. More...
 
virtual IlvMapsError getInitStatus () const
 Checks the initialization status of this feature iterator. More...
 
virtual IlBoolean getLowerRightCorner (IlvCoordinate &coordinate) const
 Returns the lower right corner of the rectangle containing all the map features of this iterator. More...
 
virtual const IlvMapFeaturegetNextFeature (IlvMapsError &status)
 Returns the next map feature of the iterator, or 0 if the iteration is finished. The returned feature is owned by the feature iterator. More...
 
const IlvProjectiongetProjection () const
 Returns the projection in which the geometric coordinates of the map features are expressed or 0 if the feature iterator returns ungeoreferenced map features. More...
 
IlInt getRowCount ()
 Returns the number of row. More...
 
IlvTIFFStreamergetStreamer () const
 Retrieves the IlvTIFFStreamer opened by the reader. More...
 
IlUInt getTileHeight ()
 Returns the height of a tile in pixels. More...
 
IlvRectgetTileOrigin (IlvMapInfo *info)
 Returns the tile origin of the file opened by this reader. More...
 
IlUInt getTileWidth ()
 Returns the width of a tile in pixels. More...
 
virtual IlBoolean getUpperLeftCorner (IlvCoordinate &coordinate) const
 Returns the upper left corner of the rectangle containing all the map features of this iterator. More...
 
IlFloat getXScale ()
 Returns the x pixel scale. More...
 
IlFloat getYScale ()
 Returns the y pixel scale,. More...
 
IlBoolean isTiled () const
 Tells if the file opened by the reader is tiled or not. More...
 
virtual IlvBitmapDatareadTile (IlInt col, IlInt row)
 Reads the specified tile. More...
 
void setSourceProjection (IlvProjection *p)
 Sets the projection of geometries generated by this feature iterator. More...
 
- Public Member Functions inherited from IlvMapFeatureIterator
virtual IlvClassInfogetClassInfo () const =0
 Returns the class information for this feature iterator. More...
 

Protected Member Functions

virtual IlvMapFeaturegetMapFeature ()
 Returns the map feature. More...
 
virtual void setInitStatus (IlvMapsError status)
 Sets the error status of the reader. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvMapFeatureIterator
static IlvClassInfoClassInfo ()
 Returns the class information of the class. More...
 
static IlvClassInfo ** ClassInfoRef ()
 Returns the address of the class information of the class. More...
 

Detailed Description

This class is an IlvMapFeatureIterator specialized for reading GeoTIFF files.

Library: ilvmaps

Constructor & Destructor Documentation

IlvGeoTIFFReader::IlvGeoTIFFReader ( const char *  filename)

Creates an instance of the GeoTIFF reader from a file name.

Parameters
filenameThe name of a GeoTIFF file.
IlvGeoTIFFReader::IlvGeoTIFFReader ( istream &  input)

Creates an instance of the GeoTIFF reader from an istream.

Parameters
inputA stream opened on a GeoTIFF file.

Member Function Documentation

IlInt IlvGeoTIFFReader::getColumnCount ( )

Returns the number of columns.

If the file is tiled, the method returns the number of columns. If not, this method returns 1.

IlvFeatureRenderer* IlvGeoTIFFReader::getDefaultFeatureRenderer ( IlvDisplay display)
virtual

Returns the default renderer for this feature iterator.

Returns a renderer that can be used to translate the map features returned by this iterator into graphic objects. Feature iterators that store some rendering information in the attributes of the map features, such as color, text font, line thickness and so on, can return a specific renderer which is able to take these attributes into account during the rendering process.

Returns
The default renderer for this feature iterator.

Implements IlvMapFeatureIterator.

IlInt IlvGeoTIFFReader::getImageHeight ( )

Returns the height of the image.

Returns
The image height in pixels.
IlInt IlvGeoTIFFReader::getImageWidth ( )

Returns the width of the image.

Returns
The image width in pixels.
virtual IlvMapsError IlvGeoTIFFReader::getInitStatus ( ) const
virtual

Checks the initialization status of this feature iterator.

Returns
The error code that may have happened during the iterator initialization.

Implements IlvMapFeatureIterator.

virtual IlBoolean IlvGeoTIFFReader::getLowerRightCorner ( IlvCoordinate result) const
virtual

Returns the lower right corner of the rectangle containing all the map features of this iterator.

Returns
IlFalse if lower right is unknown.

Implements IlvMapFeatureIterator.

virtual IlvMapFeature* IlvGeoTIFFReader::getMapFeature ( )
protectedvirtual

Returns the map feature.

Returns
The IlvMapFeature.
virtual const IlvMapFeature* IlvGeoTIFFReader::getNextFeature ( IlvMapsError &  status)
virtual

Returns the next map feature of the iterator, or 0 if the iteration is finished. The returned feature is owned by the feature iterator.

Parameters
statusStores the status of the operation. This status is IlvMaps::NoError() if no error occurs.
Returns
The next map feature available.

Implements IlvMapFeatureIterator.

const IlvProjection* IlvGeoTIFFReader::getProjection ( ) const
virtual

Returns the projection in which the geometric coordinates of the map features are expressed or 0 if the feature iterator returns ungeoreferenced map features.

Returns
The projection of the geometry.

Implements IlvMapFeatureIterator.

IlInt IlvGeoTIFFReader::getRowCount ( )

Returns the number of row.

If the file is tiled, the method returns the number of rows. If not, this method returns 1.

IlvTIFFStreamer* IlvGeoTIFFReader::getStreamer ( ) const

Retrieves the IlvTIFFStreamer opened by the reader.

Returns
The IlvTIFFStreamer opened by the reader.
IlUInt IlvGeoTIFFReader::getTileHeight ( )

Returns the height of a tile in pixels.

Returns
The height of a tile in pixels, or 0 if the image is not tiled.
IlvRect& IlvGeoTIFFReader::getTileOrigin ( IlvMapInfo info)

Returns the tile origin of the file opened by this reader.

If the file opened is not tiled, the method returns the whole image rectangle.

Parameters
infoThe IlvMapInfo used to adapt images coordinates to Rogue Wave Views coordinates.
Returns
The tile origin.
IlUInt IlvGeoTIFFReader::getTileWidth ( )

Returns the width of a tile in pixels.

Returns
The width of a tile in pixels, or 0 if the image is not tiled.
virtual IlBoolean IlvGeoTIFFReader::getUpperLeftCorner ( IlvCoordinate result) const
virtual

Returns the upper left corner of the rectangle containing all the map features of this iterator.

Returns
IlFalse if upper left is unknown.

Implements IlvMapFeatureIterator.

IlFloat IlvGeoTIFFReader::getXScale ( )

Returns the x pixel scale.

Returns
The x pixels scale.
IlFloat IlvGeoTIFFReader::getYScale ( )

Returns the y pixel scale,.

Returns
The y pixels scale.
IlBoolean IlvGeoTIFFReader::isTiled ( ) const

Tells if the file opened by the reader is tiled or not.

Returns
IlTrue if the file is tiled, IlFalse otherwise.
virtual IlvBitmapData* IlvGeoTIFFReader::readTile ( IlInt  col,
IlInt  row 
)
virtual

Reads the specified tile.

This method reads the tile at col, row and returns the resulting IlvBitmapData. If the file is not tiled or if the tile at col, row is not part of the image, the method returns 0.

Returns
The resulting IlvBitmapData.
virtual void IlvGeoTIFFReader::setInitStatus ( IlvMapsError  status)
protectedvirtual

Sets the error status of the reader.

Parameters
statusThe status to set.
void IlvGeoTIFFReader::setSourceProjection ( IlvProjection projection)
virtual

Sets the projection of geometries generated by this feature iterator.

This method is to be used when feature source is not georeferenced. The default implementation of this method does nothing.

Parameters
projectionThe projection to be set. This projection becomes shared and is locked by this feature iterator.

Reimplemented from IlvMapFeatureIterator.


© Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.