Reader Directives
The directives processed by the S-57 reader are listed below. The suffixes shown are prefixed by the current <ReaderKeyword> in a mapping file. By default, the <ReaderKeyword> for the S-57 reader is s57.
DATASET
The dataset may be specified as an S-57 data file or S-57 catalog file. If a single data file is selected, only that file will be in the dataset. If an S-57 catalog file – normally called CATALOG.030
– is selected, all S-57 data files listed in it will be selected.
Note: Please note that S-57 data files must have a file extension of .000 and S-57 catalog files must have an extension of .030. Arbitrary file extensions are not supported.
Required/Optional
Required
Mapping File Syntax
S57_DATASET NEWFILES\I
or
S57_DATASET NEWFILES\I\CA39995I.000
or
S57_DATASET NEWFILES\I\CATALOG.030
Workbench Parameter
Source S-57 (ENC) Hydrographic Data File(s)
IDs
Required/Optional
Optional
This optional specification is used to limit the available and defined S-57 files read. If no IDs are specified, then all available S-57 files in the dataset are read. The syntax of the IDs directive is:
<ReaderKeyword>_IDs <baseName1> \ <baseName2> ... \ <baseNameN>
The example below selects only the CA39995I.000 file for input during a translation:
S57_IDs CA39995I
Workbench Parameter
Feature Types to Read
FORCE_GENERIC
Required/Optional: Optional
The FME is programmed to recognize all feature object classes defined as part of the S-57 standard and to provide a feature schema for each object class with the set of attributes defined in the standard. However, in some cases it may be convenient to discard object class specific attributes and group all features in a small set of feature types based on the geometry type, rather than the S-57 object class.
The FORCE_GENERIC directive can be used to force all features to be treated as one of the feature types Point, Line, Area or Meta depending on their geometry. In this case, object-class-specific attributes are discarded, but the attributes GRUP, OBJL, RVER, AGEN, FIDN, DSNM, LNAM, and LNAM_REFS common to all features are still generated.
For example:
S57_FORCE_GENERIC ON
If the $FME_HOME/s57/*.csv files used to define the S-57 object classes cannot be found at run-time, the FORCE_GENERIC flag will automatically be turned on and an appropriate warning will be generated in the reader’s log output.
UPDATES
Required/Optional: Optional
The S-57 reader will by default apply all updates available for the datasets read. That is, if there are files ending in .001, .002 and so on, in the same folder with base datasets (ending in .000), these update files will be read and applied to the base feature set in accordance with S-57 update rules. The UPDATES directive in the mapping file may be set to IGNORE to ignore all updates. The default value is APPLY indicating that updates should be applied.
Workbench Parameter: Action to take on update files
FULL_STRUCTURE
Required/Optional: Optional
This directive allows primitives to be read as individual features whereby each feature has some extra information which could be used in future for writing to a S-57 dataset (not available yet). By default, this directive is OFF.
For example:
S57_FULL_STRUCTURE ON
PROFILE
Required/Optional: Optional
This specifies which enhanced version of S-57 dataset to read. This is used only during schema generation (mapping file or workspace generation) and has no effect during normal reading. The original specifications for S-57 could be modified by adding additional object classes or adding more attributes therefore marking it as a different flavor of original S-57.
By setting this directive to either ENC 3.1, Additional_Military_Layers or Inland_Waterways the reader can then process the schema accordingly.
By default, this directive is set to ENC 3.1.
For example:
Generate S57 NULL "<source datase>" "<mapping file name>" ---- Source_PROFILE_IN "Inland_Waterways"
Note: PROFILE_IN is the macro to use to set the value for the directive PROFILE.
SEARCH_ENVELOPE
Using the minimum and maximum x and y parameters, define a bounding box that will be used to filter the input features. Only features that interact with the bounding box are returned.
If all four coordinates of the search envelope are specified as 0, the search envelope will be disabled.
Mapping File Syntax
<ReaderKeyword>_SEARCH_ENVELOPE <minX> <minY> <maxX> <maxY>
Note: If all four coordinates of the search envelope are specified as zero, the search envelope will be disabled.
Required/Optional
Optional
Workbench Parameter
Minimum X, Minimum Y, Maximum X, Maximum Y
SEARCH_ENVELOPE_COORDINATE_SYSTEM
This directive specifies the coordinate system of the search envelope if it is different than the coordinate system of the data.
The COORDINATE_SYSTEM
directive, which specifies the coordinate system associated with the data to be read, must always be set if the SEARCH_ENVELOPE_COORDINATE_SYSTEM
directive is set.
If this directive is set, the minimum and maximum points of the search envelope are reprojected from the SEARCH_ENVELOPE_COORDINATE_SYSTEM
to the reader COORDINATE_SYSTEM
prior to applying the envelope.
Required/Optional
Optional
Mapping File Syntax
<ReaderKeyword>_SEARCH_ENVELOPE_COORDINATE_SYSTEM <coordinate system>
Workbench Parameter
Search Envelope Coordinate System
CLIP_TO_ENVELOPE
This directive specifies whether or not FME should clip features to the envelope specified in the SEARCH_ENVELOPE
directive.
Values
YES | NO (default)
Mapping File Syntax
<ReaderKeyword>_CLIP_TO_ENVELOPE [yes | no]
Workbench Parameter
Clip To Envelope
EXPOSED_ATTRS
This directive allows the selection of format attributes to be explicitly added to the reader feature type.
This is similar to exposing format attributes on a reader feature type once it has been generated; however, it is even more powerful because it enables schema-driven applications other than Workbench to access and leverage these attributes as if they were explicitly on the schema as user attributes.
The result of picking a list of attributes is a comma-separated list of attribute names and types that will be added to the schema features. Currently all reader feature types will receive the same set of additional schema attributes for a given instance of the reader.
Required/Optional
Optional
Mapping File Syntax
Not applicable.
While it is possible for FME Objects applications to invoke this directive, the required format is not documented.
This directive is intended for use in our GUI applications (for example, Workbench) only.
Workbench Parameter
Additional Attributes to Expose