Rogue Wave Views Maps Package API Reference Guide |
Rogue Wave Views Documentation Home |
A convenience class to load map files into an IlvManager
.
More...
#include <ilviews/maps/format/maploader.h>
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. More... | |
virtual IlUInt | load (const char *fileName, IlvMapsError &status) |
Loads the map file specified as argument. More... | |
virtual IlUInt | load (IlvMapFeatureIterator *iterator, IlvMapsError &status) |
Loads the map features using the specified feature iterator. More... | |
virtual IlUInt | load (IlvMapFeatureIterator *iterator, 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. More... | |
virtual IlvMapFeatureIterator * | makeFeatureIterator (const char *filename) |
Instantiates a feature iterator from file name. More... | |
void | setDefaultSourceProjection (IlvProjection *projection) |
Sets the source projection. More... | |
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.
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.
manager | The manager to which the graphic objects will be added. |
IlvMapInfo
|
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.
fileName | The name of the file to be loaded. |
status | Returns the status of the processing (IlvMaps::NoError() if no error occurs). |
|
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.
iterator | The feature iterator. |
status | Returns the status of the processing (IlvMaps::NoError() if no error occurs). |
|
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.
iterator | The feature iterator. |
renderer | The map renderer. |
status | Returns the status of the processing (IlvMaps::NoError() if no error occurs). |
|
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.
filename | The name of the map file. |
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.
projection | The new source projection. The map loader locks the new projection. |
© Copyright 2016, 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.