rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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

List of all members.

Public Member Functions

 IlvGeoTIFFReader (istream &input)
 Creates an instance of the GeoTIFF reader from an istream.
 IlvGeoTIFFReader (const char *filename)
 Creates an instance of the GeoTIFF reader from a file name.
IlInt getColumnCount ()
 Returns the number of columns.
IlvFeatureRenderergetDefaultFeatureRenderer (IlvDisplay *display)
 Returns the default renderer for this feature iterator.
IlInt getImageHeight ()
 Returns the height of the image.
IlInt getImageWidth ()
 Returns the width of the image.
virtual IlvMapsError getInitStatus () const
 Checks the initialization status of this feature iterator.
virtual IlBoolean getLowerRightCorner (IlvCoordinate &coordinate) const
 Returns the lower right corner of the rectangle containing all the map features of this iterator.
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.
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.
IlInt getRowCount ()
 Returns the number of row.
IlvTIFFStreamergetStreamer () const
 Retrieves the IlvTIFFStreamer opened by the reader.
IlUInt getTileHeight ()
 Returns the height of a tile in pixels.
IlvRectgetTileOrigin (IlvMapInfo *info)
 Returns the tile origin of the file opened by this reader.
IlUInt getTileWidth ()
 Returns the width of a tile in pixels.
virtual IlBoolean getUpperLeftCorner (IlvCoordinate &coordinate) const
 Returns the upper left corner of the rectangle containing all the map features of this iterator.
IlFloat getXScale ()
 Returns the x pixel scale.
IlFloat getYScale ()
 Returns the y pixel scale,.
IlBoolean isTiled () const
 Tells if the file opened by the reader is tiled or not.
virtual IlvBitmapDatareadTile (IlInt col, IlInt row)
 Reads the specified tile.
void setSourceProjection (IlvProjection *p)
 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.

Protected Member Functions

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

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:
filename The name of a GeoTIFF file.
IlvGeoTIFFReader::IlvGeoTIFFReader ( istream &  input  ) 

Creates an instance of the GeoTIFF reader from an istream.

Parameters:
input A 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 (  )  [protected, virtual]

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:
status Stores 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:
info The 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  )  [protected, virtual]

Sets the error status of the reader.

Parameters:
status The 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:
projection The projection to be set. This projection becomes shared and is locked by this feature iterator.

Reimplemented from IlvMapFeatureIterator.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, 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.