Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvS57Reader Class Reference

This class is used to read an S57 file or an S57 catalog file. More...

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

Inheritance diagram for IlvS57Reader:
IlvS57Loader

Public Member Functions

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

Detailed Description

This class is used to read an S57 file or an S57 catalog file.

Library: ilvmaps

This class reads an S57 file or an S57 catalog file to load into memory the different features define in the file (or files of the catalog). The IlvS57Loader class uses these S57 features to determine the geometry, then builds an IlvMapFeature object which will be used by a renderer object to create an IlvGraphic object that you display in an IlvManager for example.

Note: The reader uses different files like S57Attributes.txt or S57Values.txt which are located into ILVHOME/data/maps/s57.

See also
IlvS57Loader, ILvS57Renderer

Constructor & Destructor Documentation

IlvS57Reader::IlvS57Reader ( IlvDisplay display)

Initializes an instance of the reader.

Parameters
displayThe display.

Member Function Documentation

IlvFRIDRecord* IlvS57Reader::getFeature ( IlInt  index)

Returns a read feature.

Parameters
indexThe feature index.
Returns
The feature. The feature must NOT be deleted. However if the index is invalid, this function returns 0. If you wish to to keep the pointer somewhere, you need to use the lock function to lock it and the unLock function to release it.
IlInt IlvS57Reader::getFeatureCount ( )

Returns the feature count.

Returns
The feature count.
IlvFRIDRecord** IlvS57Reader::getFeatures ( )

Returns an array of the read features.

Returns
The features. The array must NOT be deleted.
void IlvS57Reader::readCatalog ( IL_STDPREF ifstream *  stream,
const IlString dir,
IlBoolean  skipNon000Files 
)

Reads an S57 catalog file.

Reads an S57 catalog file which is a set of S57 files where each S57 file contains a set of S57 features.

Parameters
streamThe stream which is associated with the catalog file.
dirThe directory where the catalog file is located.
skipNon000FilesIf IlTrue, the S57 files which have no 000 extension are ignored.
IlvDSIDRecord* IlvS57Reader::readFile ( IL_STDPREF ifstream *  stream)

Reads an S57 file which is not a catalog.

Parameters
streamThe stream which is associated with the S57 file.
Returns
The DSID (Data Set Identification field) record.
void IlvS57Reader::reset ( )

Reset the reader.

If you want to use the same reader to read several catalogs, you need to call this function if you want to remove all information from the previous catalog.


© 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.