/*! \mainpage ISO8211Lib
An 8211 file (DDFModule) consists of a series of logical records. The fiarst record is special, and is called the DDR (Data Description Record). It basically contains definitions of all the data objects (fields or DDFFieldDefn objects) that can occur on the following data records.
The remainder of the records are known as DRs (data records - DDFRecord). They each contain one or more field (DDFField) instances. What fields appear on what records is not defined by ISO 8211, though more specific requirements may be implied by a particular data standard such as SDTS or S-57.
Each field instance has a name, and consists of a series of subfields. A given field always has the same subfields in each field instance, and these subfields are defined in the DDR (DDFSubfieldDefn), in association with their field definition (DDFFieldDefn). A field may appear 0, 1, or many times in a DR.
Each subfield has a name, format (from the DDFSubfieldDefn) and actual subfield data for a particular DR. Some fields contain an array of their group of subfields. For instance a coordinate field may have X and Y subfields, and they may repeat many times within one coordinate field indicating a series of points.
This would be a real good place for a UML diagram of ISO 8211, and the corresponding library classes!
To establish access to an ISO 8211 dataset, instantiate a DDFModule object, and then use the DDFModule::Open() method. This will read the DDR, and establish all the DDFFieldDefn, and DDFSubfieldDefn objects which can be queried off the DDFModule.
The use DDFModule::ReadRecord() to fetch data records (DDFRecord). When a record is read, a list of field objects (DDFField) on that record are created. They can be queried with various DDFRecord methods.
Data pointers for individual subfields of a DDFField can be fetched with DDFField::GetSubfieldData(). The interpreted value can then be extracted with the appropriate one of DDFSubfieldDefn::ExtractIntValue(), DDFSubfieldDefn::ExtractStringValue(), or DDFSubfieldDefn::ExtractFloatValue(). Note that there is no object instantiated for individual subfields of a DDFField. Instead the application extracts a pointer to the subfields raw data, and then uses the DDFSubfieldDefn for that subfield to extract a useable value from the raw data.
Once the end of the file has been encountered (DDFModule::ReadRecord() returns NULL), the DDFModule should be deleted, which will close the file, and cleanup all records, definitions and related objects.
The precise license text is:
Copyright (c) 1999, Frank Warmerdam
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
% unzip iso8211lib-1.4.zip
I would like to thank:
*/ /*! \page ISO8211_Example \include 8211view.cpp */