rwlogo

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
List of all members | Public Member Functions
IlvS57Loader Class Reference

This class is used to get the list of features of the S57 files. More...

#include <ilviews/maps/format/s57/s57loader.h>

Inheritance diagram for IlvS57Loader:
IlvS57Reader IlvMapFeatureIterator

Public Member Functions

 IlvS57Loader (IlvDisplay *display)
 Initializes an S57 loader. More...
 
 IlvS57Loader (IlvDisplay *display, const IlString &fileName)
 Initializes an S57 loader before it reads the S57 file. More...
 
virtual IlvMapLineStringcreateMapLineString (IlvFRIDRecord *fr, IlvS57EnumerationArray &ori, IlvS57EnumerationArray &usags)
 Creates a map line string object from an S57 feature. More...
 
virtual IlvMapMultiPointcreateMapMultiPoint (IlvFRIDRecord *fr, IlvS57EnumerationArray &ori, IlvS57EnumerationArray &usags)
 Creates a map multi point object from an S57 feature. More...
 
virtual IlvMapPolygoncreateMapPolygon (IlvFRIDRecord *fr, IlvS57EnumerationArray &ori, IlvS57EnumerationArray &usags)
 Creates a map polygon object from an S57 feature. More...
 
virtual IlvFeatureRenderergetDefaultFeatureRenderer (IlvDisplay *)
 Returns the default renderer for this feature iterator. More...
 
const char * getFilename () const
 Returns the S57 file or the S57 catalog file. More...
 
virtual IlvMapsError getInitStatus () const
 Checks the initialization status of this feature iterator. More...
 
virtual IlBoolean getLowerRightCorner (IlvCoordinate &) const
 Returns the lower right corner of the rectangle containing all the map features of this iterator. More...
 
virtual const IlvMapFeaturegetNextFeature (IlvMapsError &error)
 Returns the next map feature from the list of S57 features. More...
 
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. More...
 
virtual IlBoolean getUpperLeftCorner (IlvCoordinate &) const
 Returns the upper left corner of the rectangle containing all the map features of this iterator. More...
 
void readIt ()
 Reads the map features. More...
 
void restart ()
 Sets position to the beginning of the map feature list.
 
void setFilename (const char *filename)
 Sets the S57 file or the S57 catalog file. More...
 
- Public Member Functions inherited from IlvS57Reader
 IlvS57Reader (IlvDisplay *display)
 Initializes an instance of the reader. More...
 
IlvFRIDRecordgetFeature (IlInt index)
 Returns a read feature. More...
 
IlInt getFeatureCount ()
 Returns the feature count. More...
 
IlvFRIDRecord ** getFeatures ()
 Returns an array of the read features. More...
 
void readCatalog (IL_STDPREF ifstream *stream, const IlString &dir, IlBoolean skipNon000Files)
 Reads an S57 catalog file. More...
 
IlvDSIDRecordreadFile (IL_STDPREF ifstream *stream)
 Reads an S57 file which is not a catalog. More...
 
void reset ()
 Reset the reader. More...
 
- Public Member Functions inherited from IlvMapFeatureIterator
virtual IlvClassInfogetClassInfo () const =0
 Returns the class information for this feature iterator. More...
 
virtual void setSourceProjection (IlvProjection *projection)
 Sets the projection of geometries generated by this feature iterator. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvMapFeatureIterator
static IlvClassInfoClassInfo ()
 Returns the class information of the class. More...
 
static IlvClassInfo ** ClassInfoRef ()
 Returns the address of the class information of the class. More...
 

Detailed Description

This class is used to get the list of features of the S57 files.

Library: ilvmaps

This class is used to get the list of map features from a set of S57 files.

See Also
IlvS57Reader, IlvS57Renderer

Constructor & Destructor Documentation

IlvS57Loader::IlvS57Loader ( IlvDisplay display)

Initializes an S57 loader.

Parameters
displayThe display.
IlvS57Loader::IlvS57Loader ( IlvDisplay display,
const IlString fileName 
)

Initializes an S57 loader before it reads the S57 file.

Parameters
displayThe display.
fileNameThe file name or catalog file name to read.

Member Function Documentation

virtual IlvMapLineString* IlvS57Loader::createMapLineString ( IlvFRIDRecord fr,
IlvS57EnumerationArray ori,
IlvS57EnumerationArray usags 
)
virtual

Creates a map line string object from an S57 feature.

Creates an IlvMapLineString object from an S57 feature.

Parameters
frThe S57 feature.
oriThe orientation of the S57 feature.
usagsThe usage indicator of the S57 feature.
Returns
The created object.
virtual IlvMapMultiPoint* IlvS57Loader::createMapMultiPoint ( IlvFRIDRecord fr,
IlvS57EnumerationArray ori,
IlvS57EnumerationArray usags 
)
virtual

Creates a map multi point object from an S57 feature.

Creates an IlvMapMultiPoint object from an S57 feature.

Parameters
frThe S57 feature.
oriThe orientation of the S57 feature.
usagsThe usage indicator of the S57 feature.
Returns
The created object.
virtual IlvMapPolygon* IlvS57Loader::createMapPolygon ( IlvFRIDRecord fr,
IlvS57EnumerationArray ori,
IlvS57EnumerationArray usags 
)
virtual

Creates a map polygon object from an S57 feature.

Creates an IlvMapPolygon object from an S57 feature.

Parameters
frThe S57 feature.
oriThe orientation of the S57 feature.
usagsThe usage indicator of the S57 feature.
Returns
The created object.
virtual IlvFeatureRenderer* IlvS57Loader::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.

const char* IlvS57Loader::getFilename ( ) const

Returns the S57 file or the S57 catalog file.

Returns
The S57 file.
virtual IlvMapsError IlvS57Loader::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 IlvS57Loader::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 const IlvMapFeature* IlvS57Loader::getNextFeature ( IlvMapsError &  error)
virtual

Returns the next map feature from the list of S57 features.

Parameters
errorContains the error message if one occurs.
Returns
The next map feature from the list of S57 features. If there is an error or no more features, returns 0. You must manage the deletion of the returned map feature.

Implements IlvMapFeatureIterator.

const IlvProjection* IlvS57Loader::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.

virtual IlBoolean IlvS57Loader::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.

void IlvS57Loader::readIt ( )

Reads the map features.

This function reads the S57 features from the S57 file or the S57 catalog files. This function is called by the constructor with two parameters. If you have been used the constructor with one parameter, you need to call setFilename function beforehand.

void IlvS57Loader::setFilename ( const char *  filename)

Sets the S57 file or the S57 catalog file.

Sets the S57 file, this file can be a 57 catalog file which contains several S57 files. In the case of catalog, all its files will be read when the readIt function will be called.

Parameters
filenameThe file name.

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