Views
Maps Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Protected Member Functions
IlvShapeFileTileLoader Class Reference

This class implements a tile loader to read tiles from an ESRI Shapefile whose spatial index has been created. More...

#include <ilviews/maps/format/shapefile/shptloader.h>

Inheritance diagram for IlvShapeFileTileLoader:
IlvMapTileLoader IlvTileLoader

Public Member Functions

 IlvShapeFileTileLoader (const char *shpFilename, const char *dbfFilename, const char *shxFilename, const char *indexFilename, const IlvMapAdapter *adapter)
 Constructs a new .shp file tile loader. More...
 
const char * getDBFFilename () const
 Returns the file from which this tile loader loads attributes. More...
 
virtual IlvFeatureRenderergetDefaultFeatureRenderer (IlvDisplay *display)
 Returns the default feature renderer for this tile loader. More...
 
virtual IlvMapFeatureIteratorgetFeatureIterator (IlvTile *tile)
 Returns the feature iterator to load features from the specified tile. More...
 
virtual IlBoolean getLowerRightCorner (IlvCoordinate &c) const
 Returns the lower right corner of data read by this tile loader. More...
 
virtual IlvMapInfogetMapInfo ()
 Returns the IlvMapInfo used to generate the IlvGraphic objects. More...
 
const char * getSHPFilename () const
 Returns the file from which this tile loader loads geometries. More...
 
const char * getSHXFilename () const
 Returns the file used as the shape index file. More...
 
const char * getSpatialIndexFilename () const
 Returns the spatial index file used by this tile loader to index geometries by tile. More...
 
virtual IlvRectgetTileOrigin ()
 Returns the tile origin. More...
 
virtual IlBoolean getUpperLeftCorner (IlvCoordinate &c) const
 Returns the upper left corner of the data read by this tile loader. More...
 
virtual IlBoolean isPersistent () const
 Indicates if this tile loader must be saved by a tile controller. More...
 
- Public Member Functions inherited from IlvMapTileLoader
virtual IlvFeatureRenderergetFeatureRenderer (IlvDisplay *display)
 Returns the renderer to use with this tile loader. More...
 
IlvMapsError getInitStatus () const
 Checks the initialization status of this tile loader. More...
 
virtual IlBoolean isAttachingAttributes () const
 Test if this tile loader is attaching attributes. More...
 
IlBoolean isOwnerOfRenderer () const
 Returns whether the tile loader is owner of its feature renderer or not. More...
 
virtual IlvMapsError load (IlvTile *tile)
 Method called when a tile has to be loaded. More...
 
virtual void release (IlvTile *tile)
 Releases the specified tile. More...
 
virtual void setAttachingAttributes (IlBoolean set)
 Specifies whether this tile loader is attaching attributes to the graphic objects it loads. More...
 
virtual void setFeatureRenderer (IlvFeatureRenderer *renderer, IlBoolean owner=IlFalse)
 Sets the renderer to use with this tile loader. More...
 
- Public Member Functions inherited from IlvTileLoader
virtual void controllerDeleted (IlvTileController *controller)
 Called when the controller is deleted. More...
 
virtual void tileDeleted (IlvTile *tile)
 Called when a tile is deleted during the controller destruction. More...
 

Protected Member Functions

virtual IlvShapeFileReadergetReader (const char *shpFilename, const char *dbfFilename, const char *shxFilename)
 Creates the IlvShapeFileReader to read from specified files. More...
 
- Protected Member Functions inherited from IlvMapTileLoader
 IlvMapTileLoader ()
 Constructor. More...
 
void setInitStatus (IlvMapsError status)
 Sets the error status of the tile loader. More...
 

Detailed Description

This class implements a tile loader to read tiles from an ESRI Shapefile whose spatial index has been created.

Library: ilvmaps

An ESRI Shapefile can be opened in load-on-demand mode if:

If an attribute table (.dbf file) is available, the attributes can be attached to objects.

Constructor & Destructor Documentation

◆ IlvShapeFileTileLoader()

IlvShapeFileTileLoader::IlvShapeFileTileLoader ( const char *  shpFilename,
const char *  dbfFilename,
const char *  shxFilename,
const char *  indexFilename,
const IlvMapAdapter adapter 
)

Constructs a new .shp file tile loader.

Parameters
shpFilenameThe name of the .shp filename.
dbfFilenameThe name of the .dbf filename.
shxFilenameThe name of the .shx filename.
indexFilenameThe name of the Rogue Wave Views spatial index filename.
adapterThe adapter to be used for this .shp file.

Member Function Documentation

◆ getDBFFilename()

const char* IlvShapeFileTileLoader::getDBFFilename ( ) const

Returns the file from which this tile loader loads attributes.

Returns
The .dbf file from which this tile loader loads attributes.

◆ getDefaultFeatureRenderer()

virtual IlvFeatureRenderer* IlvShapeFileTileLoader::getDefaultFeatureRenderer ( IlvDisplay display)
virtual

Returns the default feature renderer for this tile loader.

Parameters
displayThe display instance that the renderer is using.

Implements IlvMapTileLoader.

◆ getFeatureIterator()

virtual IlvMapFeatureIterator* IlvShapeFileTileLoader::getFeatureIterator ( IlvTile tile)
virtual

Returns the feature iterator to load features from the specified tile.

This implementation returns an IlvLookAheadFeatureIterator to read features for the specified tile.

Parameters
tileThe tile.
Returns
The feature iterator.

Implements IlvMapTileLoader.

◆ getLowerRightCorner()

virtual IlBoolean IlvShapeFileTileLoader::getLowerRightCorner ( IlvCoordinate c) const
virtual

Returns the lower right corner of data read by this tile loader.

Parameters
cSet to the lower right coordinate of the data read by this tile loader.
Returns
IlFalse if the lower right corner is unknown.

◆ getMapInfo()

virtual IlvMapInfo* IlvShapeFileTileLoader::getMapInfo ( )
virtual

Returns the IlvMapInfo used to generate the IlvGraphic objects.

Returns
The IlvMapInfo used to generate the IlvGraphic objects.

Implements IlvMapTileLoader.

◆ getReader()

virtual IlvShapeFileReader* IlvShapeFileTileLoader::getReader ( const char *  shpFilename,
const char *  dbfFilename,
const char *  shxFilename 
)
protectedvirtual

Creates the IlvShapeFileReader to read from specified files.

Subclasses of IlvShapeFileTileLoader can override this method to produce a reader with the customized parameters for specific applications.

Parameters
shpFilenameThe name of the .shp filename.
dbfFilenameThe name of the .dbf filename.
shxFilenameThe name of the .shx filename.
Returns
The default implementation returns an IlvShapeFileReader with the specified files.

◆ getSHPFilename()

const char* IlvShapeFileTileLoader::getSHPFilename ( ) const

Returns the file from which this tile loader loads geometries.

Returns
the .shp file from which this tile loader loads geometries.

◆ getSHXFilename()

const char* IlvShapeFileTileLoader::getSHXFilename ( ) const

Returns the file used as the shape index file.

Returns
The .shx file used as the shape index file.

◆ getSpatialIndexFilename()

const char* IlvShapeFileTileLoader::getSpatialIndexFilename ( ) const

Returns the spatial index file used by this tile loader to index geometries by tile.

Returns
The spatial index file used by this tile loader to index geometries by tile.

◆ getTileOrigin()

virtual IlvRect& IlvShapeFileTileLoader::getTileOrigin ( )
virtual

Returns the tile origin.

Returns
The tile origin.

◆ getUpperLeftCorner()

virtual IlBoolean IlvShapeFileTileLoader::getUpperLeftCorner ( IlvCoordinate c) const
virtual

Returns the upper left corner of the data read by this tile loader.

Parameters
cSet to the upper left coordinate of the data read by this tile loader.
Returns
IlFalse if the upper left corner is unknown.

◆ isPersistent()

virtual IlBoolean IlvShapeFileTileLoader::isPersistent ( ) const
virtual

Indicates if this tile loader must be saved by a tile controller.

Returns
IlTrue since this tile loader is to be saved by a tile controller.

Implements IlvMapTileLoader.