This class is used to get the list of features of the S57 files. More...
#include <ilviews/maps/format/s57/s57loader.h>
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 IlvMapLineString * | createMapLineString (IlvFRIDRecord *fr, IlvS57EnumerationArray &ori, IlvS57EnumerationArray &usags) |
Creates a map line string object from an S57 feature. More... | |
virtual IlvMapMultiPoint * | createMapMultiPoint (IlvFRIDRecord *fr, IlvS57EnumerationArray &ori, IlvS57EnumerationArray &usags) |
Creates a map multi point object from an S57 feature. More... | |
virtual IlvMapPolygon * | createMapPolygon (IlvFRIDRecord *fr, IlvS57EnumerationArray &ori, IlvS57EnumerationArray &usags) |
Creates a map polygon object from an S57 feature. More... | |
virtual IlvFeatureRenderer * | getDefaultFeatureRenderer (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 IlvMapFeature * | getNextFeature (IlvMapsError &error) |
Returns the next map feature from the list of S57 features. More... | |
const IlvProjection * | getProjection () 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... | |
IlvFRIDRecord * | getFeature (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... | |
IlvDSIDRecord * | readFile (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 IlvClassInfo * | getClassInfo () 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 IlvClassInfo * | ClassInfo () |
Returns the class information of the class. More... | |
static IlvClassInfo ** | ClassInfoRef () |
Returns the address of the class information of the class. More... | |
This class is used to get the list of features of the S57 files.
Library: ilvmaps
IlvS57Reader
, IlvS57Renderer
. IlvS57Loader::IlvS57Loader | ( | IlvDisplay * | display | ) |
Initializes a new S57 loader.
display | The display instance that is used. |
IlvS57Loader::IlvS57Loader | ( | IlvDisplay * | display, |
const IlString & | fileName | ||
) |
Initializes a new S57 loader before it reads the S57 file.
display | The display instance that is used. |
fileName | The file name or catalog file name to read. |
|
virtual |
Creates a map line string object from an S57 feature.
Creates an IlvMapLineString
object from an S57 feature.
fr | The S57 feature. |
ori | The orientation of the S57 feature. |
usags | The usage indicator of the S57 feature. |
|
virtual |
Creates a map multi point object from an S57 feature.
Creates an IlvMapMultiPoint
object from an S57 feature.
fr | The S57 feature. |
ori | The orientation of the S57 feature. |
usags | The usage indicator of the S57 feature. |
|
virtual |
Creates a map polygon object from an S57 feature.
Creates an IlvMapPolygon
object from an S57 feature.
fr | The S57 feature. |
ori | The orientation of the S57 feature. |
usags | The usage indicator of the S57 feature. |
|
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.
display | The display that is used by the returned renderer. |
Implements IlvMapFeatureIterator.
const char* IlvS57Loader::getFilename | ( | ) | const |
Returns the S57 file or the S57 catalog file.
|
virtual |
Checks the initialization status of this feature iterator.
Implements IlvMapFeatureIterator.
|
virtual |
Computes the lower right corner of the rectangle containing all the map features of this iterator.
result | Set on return to the lower right corner of the rectangle containing all the map features of this iterator. |
IlFalse
if lower right is unknown. Implements IlvMapFeatureIterator.
|
virtual |
Returns the next map feature from the list of S57 features.
error | Contains the error message if one occurs. |
0
. You must manage the deletion of the returned map feature. Implements IlvMapFeatureIterator.
|
virtual |
Returns the projection in which the geometric coordinates of the map features are expressed.
0
if the feature iterator returns ungeoreferenced map features. Implements IlvMapFeatureIterator.
|
virtual |
Computes the upper left corner of the rectangle containing all the map features of this iterator.
result | Set on return to the upper left corner of the rectangle containing all the map features of this iterator. |
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 is called.
filename | The file name. |