rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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

List of all members.

Public Member Functions

 IlvS57Reader (IlvDisplay *display)
 Initializes an instance of the reader.
IlvFRIDRecordgetFeature (IlInt index)
 Returns a read feature.
IlInt getFeatureCount ()
 Returns the feature count.
IlvFRIDRecord ** getFeatures ()
 Returns an array of the read features.
void readCatalog (IL_STDPREF ifstream *stream, const IlString &dir, IlBoolean skipNon000Files)
 Reads an S57 catalog file.
IlvDSIDRecordreadFile (IL_STDPREF ifstream *stream)
 Reads an S57 file which is not a catalog.
void reset ()
 Reset the reader.

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:
display The display.

Member Function Documentation

IlvFRIDRecord* IlvS57Reader::getFeature ( IlInt  index  ) 

Returns a read feature.

Parameters:
index The 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:
stream The stream which is associated with the catalog file.
dir The directory where the catalog file is located.
skipNon000Files If 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:
stream The 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 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.