BC MOEP Reader/Writer
The British Columbia (BC) Ministry of Environment and Parks (MOEP) format is a compact binary format used in the province of B.C., Canada. MOEP features have few attributes, one of which is a feature code that encodes the feature’s properties. MOEP files can store only integer coordinates.
FME provides reader and writer access to files in binary MOEP format, with either 16-bit or 32-bit integer coordinates.
Note: Throughout this chapter, a binary MOEP file will be referred to simply as an MOEP file; this reader/writer does not provide support for ASCII MOEP files.
Overview
Each MOEP file starts with a small header, which is immediately followed by a sequence of geometric features. The header contains information that is global to the MOEP file, including a file type, a name for the content of the file such as, a mapsheet ID, and whether the coordinates are specified with 16-bit or 32-bit integers. Each feature has a feature code, a single optional attribute, a geometric type, such as point, line, text, etc., and some type-specific information, like coordinates, rotation, text size, etc.
FME considers an MOEP dataset to be a collection of MOEP files in a single folder.
MOEP files are referenced by IDs rather than by physical file names. The mapping between IDs and physical names is defined by the MOEP file definition lines within the translation.
Reader Overview
The MOEP reader produces FME features for all the feature data held in MOEP files residing in a given folder. The MOEP reader first scans the folder it is given for the MOEP files which have been defined in the workspace. For each MOEP file that it finds, it checks to see if it the ID corresponding to the file is requested by looking at the list of IDs specified in the mapping file. If a match is found or if no IDs were specified in the mapping file, the MOEP file is opened for read. The MOEP reader extracts features from the file one at a time, and passes them on to the rest of FME for further processing. When the file is exhausted, the MOEP reader starts on the next file in the folder.
Writer Overview
The MOEP writer creates and writes feature data to MOEP files in the folder specified in the Writer Dataset field.
If the folder did not exist before the translation, the writer will create it. Any old MOEP files in the folder will be overwritten with the new feature data.
FME determines which file features are to be written to as they are routed to the MOEP writer. Many MOEP files can be written during a single FME session.