rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvMapLoader Class Reference

A convenience class to load map files into an IlvManager. More...

#include <ilviews/maps/format/maploader.h>

List of all members.

Public Member Functions

 IlvMapLoader (IlvManager *manager)
 Initializes an IlvMapLoader that will load map files into the specified manager. If an IlvMapInfo is attached to the manager, and if the objects are read from a georeferenced map file (from which it is possible to know the projection used), the graphic objects will be automatically projected using the manager's projection.
virtual IlUInt load (IlvMapFeatureIterator *featureIterator, IlvFeatureRenderer *renderer, IlvMapsError &status)
 Loads the map features using the specified feature iterator and translates them into graphic objects using the specified map renderer. Once translated, these objects are added to the manager this map loader is attached to.
virtual IlUInt load (IlvMapFeatureIterator *iterator, IlvMapsError &status)
 Loads the map features using the specified feature iterator.
virtual IlUInt load (const char *fileName, IlvMapsError &status)
 Loads the map file specified as argument.
virtual IlvMapFeatureIteratormakeFeatureIterator (const char *fileName)
 Instantiates a feature iterator from file name.
void setDefaultSourceProjection (IlvProjection *projection)
 Sets the source projection.

Detailed Description

A convenience class to load map files into an IlvManager.

Library: ilvmaps

This class allows map files to be loaded automatically into a manager. For instance, this class can load map files, automatically detecting their format, or load all the graphics from a feature iterator.


Constructor & Destructor Documentation

IlvMapLoader::IlvMapLoader ( IlvManager manager  ) 

Initializes an IlvMapLoader that will load map files into the specified manager. If an IlvMapInfo is attached to the manager, and if the objects are read from a georeferenced map file (from which it is possible to know the projection used), the graphic objects will be automatically projected using the manager's projection.

Parameters:
manager The manager to which the graphic objects will be added.
See also:
IlvMapInfo

Member Function Documentation

virtual IlUInt IlvMapLoader::load ( IlvMapFeatureIterator featureIterator,
IlvFeatureRenderer renderer,
IlvMapsError &  status 
) [virtual]

Loads the map features using the specified feature iterator and translates them into graphic objects using the specified map renderer. Once translated, these objects are added to the manager this map loader is attached to.

Parameters:
reader The map reader.
renderer The map renderer.
status Returns the status of the processing (IlvMaps::NoError() if no error occurs).
Returns:
The number of features read.
virtual IlUInt IlvMapLoader::load ( IlvMapFeatureIterator iterator,
IlvMapsError &  status 
) [virtual]

Loads the map features using the specified feature iterator.

The map features are translated to graphic objects using the default feature renderer of the feature iterator. These objects are then added to the manager. This method returns the number of features read.

Parameters:
reader The feature iterator.
stats Returns the status of the processing (IlvMaps::NoError() if no error occurs).
Returns:
The number of features read.
virtual IlUInt IlvMapLoader::load ( const char *  fileName,
IlvMapsError &  status 
) [virtual]

Loads the map file specified as argument.

This method tries to determine the format of the map and instantiates the appropriate feature iterator. It translates the features returned by the feature iterator to graphic objects using the default feature renderer of the feature iterator. The graphic objects are then added to the manager. This method returns the number of features read.

Parameters:
fileName The name of the file to be loaded.
status Returns the status of the processing (IlvMaps::NoError() if no error occurs).
Returns:
The number of features read.
virtual IlvMapFeatureIterator* IlvMapLoader::makeFeatureIterator ( const char *  fileName  )  [virtual]

Instantiates a feature iterator from file name.

Tries to instantiate a map reader to read the data from the specified file. This method is used by the IlvMapLoader::load() method. Subclassing the IlvMapLoader and overloading this method is a way to add support to user-defined map readers for the IlvMapLoader::load() method.

Parameters:
filename The name of the map file.
Returns:
An IlvMapFeatureIterator or null if the map format could not be determined.
void IlvMapLoader::setDefaultSourceProjection ( IlvProjection projection  ) 

Sets the source projection.

Use this method to affect the source projection to read a file that is not georeferenced but for which you know the projection used.

Parameters:
projection The new source projection. The map loader locks the new projection.
 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.