FME Readers and Writers 2013 SP1 APT Reader The APT Reader allows FME to read APT files. Overview The APT is a published ASCII format used in design systems. It is a three-dimensional (3D) system. APT files store both feature geometry and attribution, and have an .apt file name extension. The extension is added to the basename of the APT file. The APT reader supports the storage of point, line, and polygon geometric data in .apt files. The APT format also stores features with no geometry (which are referred to as having a geometry of none). APT Quick Facts About Quick Facts Tables Format Type Identifier APT Reader/Writer Reader Licensing Level Professional Dependencies None Dataset Type File base name Feature Type Feature Name Typical File Extensions .apt Automated Translation Support Yes User-Defined Attributes No Coordinate System Support No Generic Color Support No Spatial Index Never Schema Required Not applicable Transaction Support No Geometry Type Attribute apt_type Geometry Support Geometry Supported? Geometry Supported? aggregate no point yes circles no polygon no - 135 - APT Reader Geometry Support Geometry Supported? Geometry Supported? circular arc no raster no donut polygon no solid no elliptical arc no surface no ellipses no text no line no z values yes none yes Reader Overview The APT reader then extracts features from a file one at a time, and passes them on to the rest of the FME for further processing. The reader finishes when it reaches the end of the file. APT Reader Parameters Search Envelope Use 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. Clip to Search Envelope Check this box if you want to remove any portions of exported features outside the area of interest. About Mapping File Directives Most mapping file directives correspond directly to a Reader or Writer parameter. To see detailed technical information for any format parameters, open the corresponding Mapping File Directives book in the table of contents. Feature Representation In addition to the generic FME feature attributes that FME Workbench adds to all features (see About Feature Attributes), this format adds the format-specific attributes described in this section. - 136 - FME Readers and Writers 2013 SP1 APT features consist of geometry and attributes. The attribute names are defined in the DEF line and there is a value for each attribute in each APT feature. The table below lists the attributes contained in all APT features. Attribute Name Contents apt_type The APT geometric type of this entity. Range: apt_point|apt_none Default: No default apt_ival This is the i coordinate to the point that is in normal vector. Range: Floating Point Number Default: Blank apt_jval This is the j coordinate to the point that is in normal vector. Range: Floating Point Number Default: Blank apt_kval This is the k coordinate to the point that is in normal vector. Range: Floating Point Number Default: Blank Points apt_type: apt_point APT point features specify a single x and y coordinate in addition to any associated user-defined attributes. There are no special FME attributes for the APT point type. Currently only point features are supported. Format Mapping File Directives Note: FME translations were originally based entirely on Mapping Files. Mapping files still exist under the surface but the interface has been almost entirely replaced by Workbench's graphical interface. Information on mapping files is included in this manual for technical reference purposes. Mapping Files are ASCII text files that contain a series of rules that specify the FME readers, writers, and transformations (in Workbench, these are represented by transformers). - 137 - APT Reader A mapping file (.fme) is a series of commands for FME to perform. Mapping files use functions and factories to transform the data. They also contain the definition and parameters for the readers and writers. A mapping file can be run through the FME Quick Translator. Before FME Workbench was designed and developed (about 2001), this was the only way to configure a translation process. You can create a mapping file either by manually programming it or by using FME Workbench. In Workbench, there is still an Export as .fme tool on the toolbar. The Workbench file format itself (.fmw file) is partially a mapping file with an XML header. When FME runs a workspace it is converted into a mapping file. Since mapping files are written in a plain ASCII format, so you can use any text editor to edit them. To see what a mapping file looks like: select one or more transformers in Workbench, copy them, and then paste them in a text editor. The mapping file equivalent of those transformers will be pasted. Directives and Reader/Writer Keywords Directives are processed by the reader or writer. Directives are prefixed by the current <ReaderKeyword> or <WriterKeyword> in a mapping file. By default, the keywords for formats are the format shortname (viewable in the Formats Gallery, or in the Format Quick Facts tables. Reader Directives The following paragraphs contain the directives processed by the APT reader. The suffixes shown are prefixed by the current <ReaderKeyword> in a mapping file. By default, the <ReaderKeyword> for the APT reader is APT. DATASET Required/Optional: Required Contains the directory name of the input APT files. The value for this keyword is the file path of the APT file to be read. A typical mapping file fragment specifying an input APT dataset looks like: APT_DATASET /usr/data/apt/aptfile.apt Workbench Parameter: Source APT File(s) DEF Required/Optional Optional This keyword defines the APT file, and each APT file must be defined before it can be read. The definition specifies the base name of the file, and the names and the types of all attributes. The syntax of a APT DEF line is: <ReaderKeyword>_DEF <baseName> \ [<attrName> <attrType>]+ - 138 - FME Readers and Writers 2013 SP1 The basename specified on the APT DEF lines is constructed by using either the file name without the extension specified by the DATASET keyword, or using apt_record (used only when APT is the source). APT files require at least one attribute to be defined. The attribute definition given must match the definition of the file being read. If it does not, translation is halted and the true definition of the APT file’s attributes gets logged to the log file. The following table shows the attribute types supported. Field Type Description char(<width>) Character fields store fixed-length strings. The width parameter controls the maximum number of characters that can be stored by the field. No padding is required for strings shorter than this width. date Date fields store dates as character strings with the format YYYYMMDD. number(<width>, <decimals>) Number fields store single and double precision floating point values. The width parameter is the total number of characters allocated to the field, including the decimal point. The decimals parameter controls the precision of the data and is the number of digits to the right of the decimal. logical Logical fields store TRUE/FALSE data. Data read or written from and to such fields must always have a value of either true or false. The following mapping file fragment defines a APT file DEF line when APT is the source file format. APT_DEF apt_record \ apt_ival char(254) \ apt_jval char(254) \ apt_kval char(254) SEARCH_ENVELOPE This directive specifies a bounding box used to filter the input features. Only features that interact with the bounding box are returned. If this directive is not specified, then all features are returned.This directive is only honoured by the MITAB-based MapInfo reader in FME. This is the only MapInfo reader available on the UNIX platforms supported by FME, and can optionally be enabled on Windows platforms by renaming the mitab.dll in the FME home directory to mapinfo.dll. Mapping File Syntax <ReaderKeyword>_SEARCH_ENVELOPE <minX> <minY> <maxX> <maxY> - 139 - APT Reader 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 - 140 -
© Copyright 2026 Paperzz