Views
Maps Package API Reference Guide
Product Documentation:
Views Documentation Home
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 a new S57 loader. More...
 
 IlvS57Loader (IlvDisplay *display, const IlString &fileName)
 Initializes a new 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
 Computes 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. More...
 
virtual IlBoolean getUpperLeftCorner (IlvCoordinate &) const
 Computes 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 a new 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 (std::ifstream *stream, const IlString &dir, IlBoolean skipNon000Files)
 Reads an S57 catalog file. More...
 
IlvDSIDRecordreadFile (std::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

See also
IlvS57Reader, IlvS57Renderer.

Constructor & Destructor Documentation

◆ IlvS57Loader() [1/2]

IlvS57Loader::IlvS57Loader ( IlvDisplay display)

Initializes a new S57 loader.

Parameters
displayThe display instance that is used.

◆ IlvS57Loader() [2/2]

IlvS57Loader::IlvS57Loader ( IlvDisplay display,
const IlString fileName 
)

Initializes a new S57 loader before it reads the S57 file.

Parameters
displayThe display instance that is used.
fileNameThe file name or catalog file name to read.

Member Function Documentation

◆ createMapLineString()

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.

◆ createMapMultiPoint()

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.

◆ createMapPolygon()

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.

◆ getDefaultFeatureRenderer()

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.

Parameters
displayThe display that is used by the returned renderer.
Returns
The default renderer for this feature iterator.

Implements IlvMapFeatureIterator.

◆ getFilename()

const char* IlvS57Loader::getFilename ( ) const

Returns the S57 file or the S57 catalog file.

Returns
The S57 file.

◆ getInitStatus()

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.

◆ getLowerRightCorner()

virtual IlBoolean IlvS57Loader::getLowerRightCorner ( IlvCoordinate result) const
virtual

Computes the lower right corner of the rectangle containing all the map features of this iterator.

Parameters
resultSet on return to the lower right corner of the rectangle containing all the map features of this iterator.
Returns
IlFalse if lower right is unknown.

Implements IlvMapFeatureIterator.

◆ getNextFeature()

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.

◆ getProjection()

const IlvProjection* IlvS57Loader::getProjection ( ) const
virtual

Returns the projection in which the geometric coordinates of the map features are expressed.

Returns
The projection of the geometry, or 0 if the feature iterator returns ungeoreferenced map features.

Implements IlvMapFeatureIterator.

◆ getUpperLeftCorner()

virtual IlBoolean IlvS57Loader::getUpperLeftCorner ( IlvCoordinate result) const
virtual

Computes the upper left corner of the rectangle containing all the map features of this iterator.

Parameters
resultSet on return to the upper left corner of the rectangle containing all the map features of this iterator.
Returns
IlFalse if upper left is unknown.

Implements IlvMapFeatureIterator.

◆ readIt()

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.

◆ setFilename()

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 is called.

Parameters
filenameThe file name.