rwlogo

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave 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 .dbf file from which this tile loader loads attributes.
 
virtual IlvFeatureRenderergetDefaultFeatureRenderer (IlvDisplay *display)
 Returns the default feature renderer for this tile loader.
 
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.
 
const char * getSHPFilename () const
 Returns the .shp file from which this tile loader loads geometries.
 
const char * getSHXFilename () const
 Returns the .shx file used as the shape index file.
 
const char * getSpatialIndexFilename () const
 Returns the spatial index file used by this tile loader to index geometries by tile.
 
virtual IlvRectgetTileOrigin ()
 Returns the tile origin. More...
 
virtual IlBoolean getUpperLeftCorner (IlvCoordinate &c) const
 Returns the upper left corner of data read by this tile loader. More...
 
virtual IlBoolean isPersistent () const
 Returns IlTrue 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 ( 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.

Member Function Documentation

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.

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

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

Returns
The lower right corner.
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.
virtual IlvRect& IlvShapeFileTileLoader::getTileOrigin ( )
virtual

Returns the tile origin.

Returns
The tile origin.
virtual IlBoolean IlvShapeFileTileLoader::getUpperLeftCorner ( IlvCoordinate c) const
virtual

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

Returns
The upper left corner.
virtual IlBoolean IlvShapeFileTileLoader::isPersistent ( ) const
virtual

Returns IlTrue 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.


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