- Can be used to specify a style for its enclosed text through its “style” attribute.
l
... - Bolds the enclosed text.
l
... - Italicizes the enclosed text.
l
... - Underlines the enclosed text.
- 79 -
Adobe Geospatial PDF Writer
l
... - Adds a strikethrough to the enclosed text.
l
- Adds a line break.
The “style” XML attribute has the following format: “property:value;...;property:value” The following properties are supported: l
font-family - Specifies the font family of the text.
l
font-size - Specifies the point size of the font.
l
l
color - Specifies the color of the text. The color can be specified through the format “#RRGGBB” where each color component is specified as a hexadecimal value, or through the 16 HTML color names (http://www.w3.org/TR/REChtml40/types.html#h-6.5). text-decoration - Valid values are “underline” and “line-through”.
The following is an example rich text fme_text_string value: Hello World! In the PDF document, the text “Hello” will use the styling specified through the format attributes. The text “World!” appears on the next line and will have a font size of 30 but will inherit all other style attributes. Rasters pdf_type: pdf_raster A PDF raster feature is drawn as a grid of pixels comprising an image. Rasters written to PDF are converted to a JPEG2000 byte string and stored as a blob. Thus the nature of raster support is defined by the JPEG2000 format. The following attribute is applicable to raster features: Attribute Name
Contents
pdf_raster_compression_level
It sets the quality of the compression. The range of the value is from 0 (best quality) to 100 (worst quality). The default value is 75. Setting the value to 0 enables lossless compression. This is a writer attribute.
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.
- 80 -
FME Readers and Writers 2013 SP1
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). 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 or 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. PDF2D Mapping File Directives DATASET Required/Optional: Required The value for this directive is the path to the output file. If the output file does not exist, then the writer will create a new file. If the output file exists, then the writer will overwrite it. If other applications have the output file opened, then the writer will be unable to continue and the translation will fail. Workbench Parameter: Destination PDF File DEF Required/Optional: Required The PDF2D writer uses PDF2D_DEF lines to define feature types. A typical mapping file fragment specifying a feature type looks like: PDF2D_DEF \ [pdf_layer_order ]? \ [pdf_in_page_coordinates ]? \ [pdf_default_opacity ]? \ [pdf_layer_visibility ]? \ []*
- 81 -
Adobe Geospatial PDF Writer
The configuration parameters present on the definition line are described in the following table: Parameter
Contents
featureName
This declares the name of the feature type.
attributeName
This declares the name of an attribute. The maximum length of attribute names is 200 characters.
attributeType
This declares the type of the attribute. The only valid attribute type is string.
layerOrder
This declares the layer order of the feature type. Valid values are all integers. Feature types with lower layer orders will be drawn first. Therefore, features in feature types with higher layer orders will appear on top of features in feature types with lower layer orders. If a value is not specified, then the feature type will have an effective layer order value of ‘0’. If two features have identical layer order values, then the two will be ordered arbitrarily.
pageCoordinates
The value specifies whether the coordinates of geometries will be interpreted in page coordinates. If this attribute is set to YES, then the coordinates of the geometry are treated as page coordinate values, and the feature can be drawn anywhere on the page. The default value is NO.
opacity
This determines the opacity level of features of this feature type when their pdf_opacity feature attribute is unset. If this parameter is set, the value overrides the writer parameter DEFAULT_OPACITY. A value of 1.0 is fully opaque, and 0.0 is completely transparent.
visibility
If the value is VISIBLE, then the layer will be visible by default after opening the output file in Adobe Acrobat Reader. If set to HIDDEN, then the layer will not be initially visible. The visibility of layers can be toggled in Adobe Acrobat Reader after opening the file.
PAGE_SIZE This directive specifies the size of the output page of the PDF document. The default page size is Letter. Preset page sizes for common paper sizes can be selected, or the page size can be specified in typographical points in the format . Required/Optional
- 82 -
FME Readers and Writers 2013 SP1
Optional Values A3 | A4 | A5 | B5 | Ledger | Legal | Legal-half | Letter (Default) | Letter-half | <0 ...> <0 ...> Workbench Parameter Page size PAGE_VIEWPORT (Location of Map on Page) This directive determines where to place the map on the page, and how large the map should be on the page. The format for this directive is four integers separated by spaces describing the lower left corner and the upper right corner of the viewport/rectangle, specified in typographical points. The lower left corner of the page contains coordinate (0,0) and the top right corner contains coordinate (,), where these two values are the page size specified by PAGE_SIZE. If the aspect ratios of the page viewport and the world viewport (WORLD_VIEWPORT) differ, then the lesser scaling factor will be chosen: data inside the world viewport will not be clipped and data outside the world viewport might become visible. If a value for the directive is not specified, then the page viewport rectangle will be a centered rectangle with a width and length that is 90% of the page width and length. The page viewport coordinates must be between (0,0) and (page width,page height).
- 83 -
Adobe Geospatial PDF Writer
Required/Optional Optional Values The values can also be specified as a percentage of the page width and page height. The values must be an integer ending with a percentage sign. The values can also be negative values, and they are interpreted as being relative to the top and right edges instead of the left and bottom edges. For example, for a page size of 1000 by 1000 points, the rectangle “50 50 –50 –50” is identical to the rectangle “50 50 950 950” for this page size. Workbench Parameter Page viewport dimensions WORLD_VIEWPORT (Map Extents) This directive specifies the extents of the map to write within the page viewport, by defining the lower left and upper right corners of the page viewport in map units.
- 84 -
FME Readers and Writers 2013 SP1
Geometry outside these extents will be clipped when drawn on the page. The format for the directive is four floating point numbers separated by spaces describing the lower left corner and the upper right corner of the rectangle. If a value for the directive is not specified, then the world viewport rectangle will be the bounding box of the entire dataset. Required/Optional Optional Values Workbench Parameter World viewport dimensions DEFAULT_OPACITY This directive specifies the opacity value of the fill color of area geometries. The boundaries of area geometries are not affected by this setting. Required/Optional Optional Values <0.0...1.0> A value of 0 corresponds to complete transparency and a value of 1 is complete opaqueness. Default Value: 0.4 Workbench Parameter Default fill opacity value DEFAULT_POINT_SIZE This directive specifies the default radius in typographical points for point geometry. Required/Optional Optional Values <0.0...> Default Value: 1.0 Workbench Parameter Default point size value
- 85 -
Adobe Geospatial PDF Writer
DEFAULT_LINE_WIDTH This directive specifies the default width in typographical points for line geometry and boundaries of area geometry. Required/Optional Optional Values <0.0...> Default Value: 1.0 Workbench Parameter Default line width value PANEL_VISIBILITY This directive determines the panel that is visible immediately after opening the output PDF file in Adobe Acrobat software. Required/Optional Optional Values None (default): No panel will be initially displayed Layers: Layer panel will be visible after opening the file Pages: Page Thumbnails panel will be visible Workbench Parameter Navigation Panel to Display RANDOMIZE_FEATURE_TYPE_COLOR This directive specifies whether features without the fme_color attribute set will be assigned a random color based on its feature type. Required/Optional Optional Values YES (default) NO (features without the fme_color attribute set will be assigned the color black) Workbench Parameter Randomize Feature Type Color
- 86 -
FME Readers and Writers 2013 SP1
RICH_TEXT Required/Optional: Optional This directive specifies whether the text string of text features is in the rich text format. If this directive is set to NO, then the text string is written as-is to the page. If this directive is set to YES, then the text string will be processed for style directives. For more details, see the “Text” section under Feature Representation. Values: YES|NO Default Value: NO Workbench Parameter: Text in rich text format FONT_DIRECTORIES Required/Optional: Optional This directive specifies the directories that the writer will search in to find the TrueType fonts used in the workspace. The workspace directory of the translation is always searched. Values: Default Value: Workbench Parameter: TrueType font directories WRITE_ATTRIBUTES Required/Optional: Optional This directive specifies whether attribution data will be written. Not writing attribution data will decrease the file size of the output file and may improve viewing performance. Values: YES|NO Default Value: YES Workbench Parameter: Write attributes COMPRESS_STREAMS Required/Optional: Optional This directive specifies whether streams in PDF files will be compressed. Values: YES|NO Default Value: YES Workbench Parameter: Compress streams COMPRESS_OBJECT_STREAMS This directive specifies the object stream compression, and the output format of the PDF cross-reference information and trailer.
- 87 -
Adobe Geospatial PDF Writer
If the directive is set to YES, the output file will contain compressed object streams, and cross-reference information will be stored in cross-reference streams. If the directive is set to NO, the output file will not contain compressed object streams, and cross-reference information will be stored in a cross-reference table and trailer. Compressed object streams and cross-reference streams are supported in PDF1.5 and higher. Required/Optional Optional Values YES (default) | NO Workbench Parameter Compress Object Streams PDF_14_COMPATIBILITY Required/Optional: Optional This directive specifies whether or not to write files compatible with PDF 1.4 viewers. The default value of NO means that features introduced in PDF 1.5 and later will be used, including object stream compression and the JPEG2000 raster image format. A value of YES means that the output file will not contain compressed object streams, cross-reference information is stored in a cross-reference table and xref trailer, and rasters are encoded in the JPEG format. Note that the COMPRESS_OBJECT_STREAMS directive is deprecated, and equivalent to the opposite of this directive. Values: YES|NO Default Value: NO Workbench Parameter: PDF 1.4 Compatibility FRAME_SPECS Required/Optional: Optional This directive can be used to specify frame and page properties (see the Multi-page Support section). If the output will have a static number of frames and pages (i.e., the number and properties of frames and pages is not dependant on the data) then this directive provides a convenient and simple method of specifying frame and page properties. The format for this directive is a whitespace-delimited sequence of keywords and values: Specification: [PageSpec|FrameSpec]* PageSpec: page PageSpecAttributes* PageSpecAttributes: page_size FrameSpec: frame FrameSpecAttributes* FrameSpecAttributes: page_number
- 88 -
FME Readers and Writers 2013 SP1
| frame_rectangle | frame_order | world_rectangle The formats of the , , , , and values are identical to the formats for the pdf_page_ number, pdf_page_size, pdf_frame_rectangle, and pdf_world_rectangle attributes respectively. The order that these attributes are specified is insignificant. Properties that are not specified will use their default values as described in the Multi-page Support section. The following is an example value for this directive: frame f1 frame_rectangle 10% 10% -10% -10% page_number 2 frame f2 frame_order 0 frame f3 frame_order 1 page 1 page_size 500 500 The result is as follows: The output document has two pages. Both pages have size 500x500 points (the unspecified second page inherits its page size from the first page). Frame “f1” will have a 10% margin on the second page. Frame “f3” will be drawn above frame “f2” on the first page, and the two frames will have the frame rectangle specified by the PAGE_VIEWPORT writer directive. All three frames use the world rectangle specified by the WORLD_VIEWPORT writer directive. Features can be written to one of these three frames by setting the pdf_frame_name attribute to “f1”, “f2”, or “f3”. Workbench Parameter Frame and Page Specification Lines
- 89 -
FME Readers and Writers 2013 SP1
Adobe Illustrator (IEPS) Writer The Adobe Illustrator Encapsulated PostScript® (IEPS) Writer module enables FME to write Encapsulated PostScript export files specifically formatted to work with Adobe Illustrator. Illustrator IEPS is a different flavour of EPS and makes use of some of the functionality of Adobe Illustrator. The most significant additions are the use of layers and object attributes. In this format, many of the PostScript keywords have been shortened into special Adobe Illustrator single letter functions. The implication is that EPS files produced by this writer cannot be used outside of Adobe Illustrator. The standard EPS writer should be used if the EPS is to be used in other applications. IEPS is most often used for high-quality plots in desktop publishing software. Note: This writer may write files that are quite large since it does create an output coordinate for every source coordinate. If you find your .eps files getting too large, it is recommended that you first generalize your source data to make it less dense using the FME’s @Generalize function (or the FME Workbench Generalizer transformer). IEPS Quick Facts About Quick Facts Tables Format Type Identifier
IEPS
Reader/Writer
Writer
Licensing Level
Base
Dependencies
None
Dataset Type
File
Feature Type
Layer name
Typical File Extensions
.eps
Automated Translation Support
Yes
User-Defined Attributes
Yes
Coordinate System Support
No
Generic Color Support
Yes
Spatial Index
Not applicable
Schema Required
Yes
Transaction Support
No
Geometry Type Attribute
ieps_type
Encoding Support
No
- 91 -
Adobe Illustrator (IEPS) Writer
Geometry Support Geometry
Supported?
Geometry
Supported?
aggregate
no
point
yes
circles
no
polygon
yes
circular arc
no
raster
no
donut polygon
yes
solid
no
elliptical arc
no
surface
no
ellipses
no
text
no
line
yes
z values
no
none
no
Overview IEPS is a two-dimensional (2D) format with the ability to store user-defined attributes for the geometric data. All IEPS information is contained in a single page beginning with a version header as well as a bounding box definition. IEPS is based upon the PostScript format which provides methods for graphical drawing, simple programming control structures and the ability to create user-defined variables and functions. All IEPS data is contained in a single file with an .ieps extension. File Name Extension
Contents
.ieps
All vector geometric data.
The IEPS writer supports export of points, lines, polygons, and text geometric data. Some geometric entities may have display properties such as pen width, line type, and color. Color may be specified in red/green/blue (RGB) as well as cyan/magenta/yellow/black (CMYK). Writer Overview The IEPS writer creates and writes feature data to an IEPS file specified by the DATASET keyword. The writer searches the mapping file for the _ DATASET keyword in the mapping file. This keyword is required to be in the mapping file. An old IEPS file in the directory with the same file name is overwritten with the new feature data. A typical mapping file fragment specifying the output IEPS file looks like: IEPS_DATASET /usr/data/ieps/myfile.ieps
- 92 -
FME Readers and Writers 2013 SP1
Adobe Illustrator EPS Writer Parameters Size Width Specifies the maximum EPS units (1 unit = 1/72 inch) for the width of the output map. Height Specifies the maximum EPS units (1 unit = 1/72 inch) for the height of the output map. Buffer Ratio The percentage of buffer room between the border of the output EPS map within the specified bounding box. Line Width The value in pixels of the line width you wish to use by default. The default value is set to 1. The value entered for this parameter must be at least 0 (which is the thinnest printable line width). Text Width This width is similar to line width, except it is applied to text features. The default value is set to 1. The value entered for this parameter must be at least 0, which is the thinnest printable line width. Line Join Type Specifies the default corner types that should be drawn onto paths. Square Specifies a sharp corner. Round Specifies a rounded corner. Butt Specifies a butt-end corner. Line Cap Type Specifies the default cap that will be used on line segments. Square Specifies square-end caps. Round Specifies rounded-end caps. Butt Specifies butt-end caps.
- 93 -
Adobe Illustrator (IEPS) Writer
Map Parameters Maintain Map Aspect Ratio Select Yes to indicate that the original map aspect will be maintained to fit within the destination-defined bounding box. This means that the entire destination bounding box defined may not used. Select No to cause the original map to be stretched onto the defined destination bounding box. Force CMYK By choosing Yes, then all color usage output to the IEPS file is in CMYK. By default, this value is No, meaning that a mix of RGB and CMYK color schemes may be in the output IEPS file. However, despite forcing CMYK color output, some IEPS viewers may not support the setcmykcolor call in their library. In these cases, the actual output of colors is done using a function we define in PostScript which interfaces exactly like the setcmykcolor call, but uses setrgbcolor underneath. This will depend on the IEPS viewer you are using 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. IEPS features consist of geometry but no user-defined attributes, although there are special attributes to hold the type of the geometric entity and its display parameters. The feature type of a feature written to IEPS is used to specify its layer in the output Adobe Illustrator file. All IEPS features contain a ieps_type attribute, which identifies the geometric type. Each element type also has a color associated with it. Depending on the geometric type, the feature contains additional attributes specific to the geometric type. These are described in subsequent sections. Attribute Name
Contents
ieps_type
The IEPS geometric type of this entity. Range: ieps_polyline| ieps_area| ieps_text| ieps_point Default: No default
- 94 -
FME Readers and Writers 2013 SP1
Attribute Name
Contents
ieps_cmyk_color
This is a string that represents the color intensities of the element. It is formatted as cyan (C), magenta (M), yellow (Y) and black (K), This color attribute has highest priority. If present, it will be used in preference over ieps_color and fme_ color attributes. Range: String. (0..1, 0..1, 0..1, 0...1) Default: String (0,0,0, 1)
ieps_cmyk_fill_color
This is a string that represents the fill color intensities of the element. It is formatted as cyan (C), magenta (M), yellow (Y) and black (K), This color attribute has highest priority. If present, it will be used in preference over ieps_fill_color and fme_fill_color attributes. Range: String. (0..1, 0..1, 0..1, 0...1) Default: String (0,0,0,1)
ieps_color
This is a string that represents the color intensities of the element. It is formatted as red, green, blue intensities which range between 0..1 Note that if this attribute is not found, then fme_color will be used. Range: String. (0..1, 0..1, 0..1) Default: String (0,0,0)
ieps_fill_color
This is a string that represents the color intensities of the element. It is formatted as red, green, blue intensities which range between 0..1. If this attribute is not found, then the writer will refer to fme_fill_color. Range: String. (0..1, 0..1, 0..1) Default: None
ieps_url
Allows you to attach a URL to a feature. The URL should be formatted as http://www.safe.com. Range: String Default: No Default
ieps_dash_on
The number of pixels to be used as the on part of the dashed line used to draw the feature. If ieps_ pen_linewidth is specified, then this value is multiplied by the size of the pen to determine the number of pixels. If both ieps_dash_on and ieps_ dash_off are 0, then a solid line is used.
- 95 -
Adobe Illustrator (IEPS) Writer
Attribute Name
Contents Range: Integer > 0 Default: 0
ieps_dash_off
The number of pixels to be used as the off part of the dashed line used to draw the feature. If ieps_ pen_linewidth is specified, then this value is multiplied by the size of the pen to determine the number of pixels. If both ieps_dash_on and ieps_ dash_off are 0, then a solid line is used. Range: Integer > 0 Default: 0
ieps_line_join_type
Specify the type of corner that should be drawn onto this path. 0 = sharp corners, 1 = rounded corners, 2 = buttend corners Range: 0, 1, 2 Default: 0 Optional: Yes
ieps_line_cap_type
Specify the type of caps on line ends. 0 = butt end caps, 1 = rounded end caps, 2 = square end caps Range: 0, 1, 2 Default: 0 Optional: Yes
ieps_locked_flag
This determines whether or not the feature can be selected for editing when the document is opened in Adobe Illustrator. If set to 0, the feature can be selected for editing. If set to 1, the feature is locked and cannot be selected. Range: 0, 1 Default: 0 Optional: Yes
Areas ieps_type: ieps_area IEPS polygon features specify area (polygonal) features. The areas that make up a single feature may or may not be disjoint, and may contain polygons that have holes. Each area has a pen style associated with it to control the color, line weight, line type, and brush pattern used when it’s drawn. If the area contains holes then when the fill pattern is applied, the holes enclosed by the area will not be filled. If no pen style is defined for a polygon entity, the previous style is used.
- 96 -
FME Readers and Writers 2013 SP1
The following table lists the special FME attribute names used to control the IEPS polygon settings. Attribute Name
Contents
ieps_line_width
Defines the line width used to draw the polyline. By default, the line is drawn one pixel wide. Range: Float >= 0 Default: 0.0 (the thinnest line that can be rendered at device resolution, i.e. 1 pixel wide)
Polylines ieps_type: ieps_polyline IEPS polyline features specify linear features defined by a sequence of x and y coordinates. Polylines encapsulate the concept of a line since a line is just a sequence of two points. Each polyline has a pen style associated with it that specifies the color, line weight, and line type used when the line is drawn. If no pen type is defined for a polyline entity, if line attributes aren’t found, then default parameters are used. The table below lists the special FME attribute names used to control the IEPS polyline settings. Attribute Name
Contents
ieps_line_width
Defines the line width used to draw the polyline. By default, the line is drawn one pixel wide. Range: Float >= 0 Default: 0.0 (the thinnest line that can be rendered at device resolution, i.e. 1 pixel wide)
Text ieps_type: ieps_text IEPS text is used for text annotation in IEPS. The coordinates specify the lower left coordinates of the text when it is placed. In addition, the size and angle in which the text is output can be specified. The table below lists the special FME attribute names used to control the IEPS text: Attribute Name
Contents
ieps_size
The size of the text specified in ground units Range: float > 0 Default: 0
ieps_illustrator_size
The size of the point text specified in points. If this is set, it will override the ieps_size value. Range: float > 0
- 97 -
Adobe Illustrator (IEPS) Writer
Attribute Name
Contents Default: 12pt
ieps_rotation
The text rotation is given in degrees and measured counterclockwise up from the horizontal. Range: -360..360 Default: 0
ieps_font
The PostScript name of the font. The fonts supported depend on the destination of the IEPS file. Some typical fonts are Times, Helvetica and Courier. Range: String Default: NewBaskerville
ieps_style
The style of the font. This attribute must be matched with the current font since it’s the combination of font and style that IEPS recognizes. Some typical fonts and styles are Times-(None, Roman, Italic, Bold, BoldItalic), Helvetica-(None, Oblique, Bold, BoldOblique) and Courier-(None, Oblique, Bold, BoldOblique). Note the keyword ‘NONE’ can be specified to indicate no style on the font. Range: String Default: Bold
ieps_text_string
The text to be displayed. Range: String Default: No default
ieps_text_width
Defines the line width used to stroke the text. By default, the stroked line is drawn one pixel wide. Range: Float >= 0 Default: 0.0 (the thinnest line that can be rendered at device resolution, i.e. 1 pixel wide)
ieps_render_type
This determines how the text is output. 0 = filled, 1 = stroked, 2 = stroked and filled Range: 0,1,2 Default: 2
Point ieps_type: ieps_point
- 98 -
FME Readers and Writers 2013 SP1
IEPS point is used for point annotation in IEPS. Points will be represented as text. By default, a symbol will be represented by a period. Attribute Name
Contents
ieps_size
The size of the point text specified in ground units Range: float > 0 Default: 0
ieps_illustrator_size
The size of the point text specified in points. If this is set, it will override the ieps_size value. Range: float > 0 Default: 12pt
ieps_rotation
The text rotation is given in degrees and measured counterclockwise up from the horizontal. Range: -360..360 Default: 0
ieps_font
The PostScript name of the font. The fonts supported depend on the destination of the IEPS file. Some typical fonts are Times, Helvetica and Courier. Range: String Default: NewBaskerville
ieps_style
The style of the font. This attribute must be matched with the current font since it’s the combination of font and style that IEPS recognizes. Some typical fonts and styles are Times-(None, Roman, Italic, Bold, BoldItalic), Helvetica-(None, Oblique, Bold, BoldOblique) and Courier-(None, Oblique, Bold, BoldOblique). Note the keyword ‘NONE’ can be specified to indicate no style on the font. Range: String Default: Bold
ieps_symbol_string
The text to be displayed. Range: String Default: “.”
ieps_symbol_width
Defines the line width used to stroke the text. By default, the stroked line is drawn one pixel wide. Range: Float >= 0 Default: 0.0 (the thinnest line that can be rendered
- 99 -
Adobe Illustrator (IEPS) Writer
Attribute Name
Contents at device resolution, i.e. 1 pixel wide)
ieps_render_type
This determines how the text is output. 0 = filled, 1 = stroked, 2 = stroked and filled Range: 0,1,2 Default: 2
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). 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 or 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. IEPS Writer Directives DATASET Required/Optional: Required
- 100 -
FME Readers and Writers 2013 SP1
The IEPS writer processes the DATASET keyword as described in Writer Overview. Additional keywords can be used to set default parameters that are applied to all applicable features in the file. However, the values set by the keywords can be overwritten if the feature itself has a value defined for that parameter. For example, although the LINE_WIDTH keyword may be used to specify a default width of 5 for all lines in the file, if an ieps_polyline feature has its ieps_line_width set to a value of 2, then the line width of 2 will be used over the default value of 5. Workbench Parameter: Destination Adobe Illustrator EPS File DEF Required/Optional: Required This is a required keyword that defines the layers within the file. DEF lines also list the attributes that will be saved as object tags on features of that layer, and may also include the attribute IEPS_LAYER_COLOR. This should be followed by an RGB combination ranging in intensities from 0 to 255, separated by commas. This defines the layer color seen in Adobe Illustrator. Attribute
Contents
Required/Optional
IEPS_LAYER_COLOR
This is an attribute that can be used on a DEF line. It defines the layer color seen in Illustrator.
Optional
Range: 0..255, 0..255, 0..255 Default: No Default RESOLUTION _X and RESOLUTION _Y Required/Optional: Optional These directives define the bounding box of the IEPS output file. The bounding box extends from the lower left corner of the page (defined as 0,0) and extends out to the values entered. By default, the X value is set to 612 and the Y value is set to 792. These values map onto an 8.5 x 11-inch piece of paper. Range: Integer > 0 Default: RESOLUTION_X: 612 RESOLUTION_Y: 792 Workbench Parameter: Width (points), Height (points) MAINTAIN_ASPECT Required/Optional: Optional This directive is followed by a value of YES or NO. By default, the value is set to YES. A YES indicates that the original map aspect will be maintained to fit within the destination-defined bounding box. This means that the entire destination bounding box
- 101 -
Adobe Illustrator (IEPS) Writer
defined may not used. Alternatively, the value NO causes the original map to be stretched onto the defined destination bounding box. Range: YES | NO Default: YES Workbench Parameter: Maintain Map Aspect Ratio LINE_WIDTH Required/Optional: Optional This directive is followed by the value in pixels of the line width you wish to use by default. The default value is set to 0, which is the thinnest printable line width. Range: float >= 0 Default: 0.0 (1 pixel wide: the thinnest line that can be rendered at device resolution) Workbench Parameter: Line Width (pixels) TEXT_WIDTH Required/Optional: Optional This directive has an attribute just like LINE_WIDTH except that this width is applied to text features. The default value is set to 0, which is the thinnest printable line width. Range: float >= 0 Default: 0.0 (1 pixel wide: the thinnest line that can be rendered at device resolution) Workbench Parameter: Text Width (pixels) TEXT_FONT Required/Optional: Optional This directive specifies the default font applied to all text features. The font must be a PostScript name. The fonts supported depend on the destination of the IEPS file. Some typical fonts are NewBaskerville, Times, Helvetica and Courier. The default is NewBaskerville since it is the most commonly installed with Adobe Illustrator. Range: String Default: NewBaskerVille Workbench Parameter: Text Font TEXT_STYLE Required/Optional: Optional This directive specifies the default style to be applied to the text font all text features. This attribute must be matched to the current font since it is the combination of text font and text style that is recognized by Adobe Illustrator. Some typical font and style combinations are NewBaskerville-(None, Bold), Times-(None, Roman, Italic, Bold,
- 102 -
FME Readers and Writers 2013 SP1
BoldItalic), Helvetica-(None, Oblique, Bold, BoldOblique), and Courier-(None, Oblique, Bold, BoldItalic). Note that the keyword NONE can be used to specify that no style should be applied to the font. Range: String Default: Bold Workbench Parameter: Text Style LINE_JOIN_TYPE Required/Optional: Optional This directive is followed by the values 0, 1, or 2. These values specify the default shape to be put at corners of paths painted: 0 specifies a sharp corner, 1 specifies a rounded corner, and 2 specifies a butt-end corner. Range: 0, 1, 2 Default: 0 Workbench Paramter: Line Join Type LINE_CAP_TYPE Required/Optional: Optional This directive is followed by the values 0, 1, or 2. These values specify the default cap that will be used on line segments. 0 specifies butt-end caps, 1 specifies roundedend caps and 2 specifies square-end caps. Range: 0, 1, 2 Default: 0 Workbench Parameter: Line Cap Type FORCE_CMYK Required/Optional: Optional By setting the value following this keyword to YES, then all color usage output to the IEPS file is in CMYK. By default, this value is NO, meaning that a mix of RGB and CMYK color schemes may be in the output IEPS file. However, despite forcing CMYK color output, some IEPS viewers may not support the setcmykcolor call in their library. In these cases, the actual output of colors is done using a function we define in PostScript which interfaces exactly like the setcmykcolor call, but uses setrgbcolor underneath. This will depend on the IEPS viewer you are using. Range: YES | NO Default: NO Workbench Parameter: Force CMYK LOCK_FEATURES Required/Optional: Optional
- 103 -
Adobe Illustrator (IEPS) Writer
If set to YES, by default all features will be locked and cannot be selected or edited in Adobe Illustrator. Note: Even if LOCK_FEATURES is set to YES, individual features can be unlocked if its eps_lock_feature is set to 0 (meaning NOT locked). Hence, an individual eps_lock_feature value overrides this LOCK_FEATURES default value. Range: YES | NO Default: NO Workbench Parameter: Lock Features RENDER_TYPE Required/Optional: Optional This directive determines how the text is output. This value will be used as the default render type for all text in the file but it will be overridden if the text feature has its own user-defined render type value. This directive is followed by the values 0, 1, or 2. These values specify the default rendering that will be applied to text features: 0 = fill, 1 = stroke, 2 = stroke and fill. The default value is 2. Range: 0, 1, 2 Default: 2 Workbench Parameter: Render Type
- 104 -
FME Readers and Writers 2013 SP1
Adobe Illustrator – Avenza MAPublisher Writer The Adobe® Illustrator® – Avenza MAPublisher writer allows FME to translate and import data into the Adobe Illustrator file format, complete with Avenza MAPublisher MAP Views and MAP Layers.
Overview The Adobe Illustrator – Avenza MAPublisher writer provides export options to convert GIS data into a new Adobe Illustrator document, complete with MAPublisher MAP Views and MAP Layers. With the Adobe Illustrator – Avenza MAPublisher writer, it is possible to create an Adobe Illustrator document containing data from formats that are not natively supported by Avenza MAPublisher using the power of FME format translations within FME Workbench. The Adobe Illustrator – Avenza MAPublisher writer provides the following capabilities: MAPublisher 8.6 for Adobe Illustrator supports FME FFS file import. This means that any format that can be converted to FFS through FME can be translated to an Adobe Illustrator document.
l
FME FFS support:
l
Batch Import Into Adobe Illustrator Files/Templates:
Import data into existing Adobe Illustrator documents with preconfigured styles applied on-the-fly using autoassign functionality and fit the imported data to the page and to existing or new MAP Views (with FME Auto license for MAPublisher).
Adobe Illustrator – Avenza MAPublisher Quick Facts About Quick Facts Tables Format Type Identifier
MAPUBLISHER
Reader/Writer
Writer
Licensing Level
Professional
Dependencies
l l
Avenza MAPublisher 8.6 and newer Adobe Illustrator
Dataset Type
File
Feature Type
FME Feature Type names
Typical File Extensions
.ffs (with conjoined .ai/.ait)
Automated Translation Support
Yes
User-Defined Attributes
Yes
Coordinate System Support
No
Generic Color Support
Yes
Spatial Index
No
- 105 -
Overview
Schema Required
No
Transaction Support
No
Geometry Type Attribute
fme_type
Encoding Support
Yes Geometry Support
Geometry
Supported?
Geometry
Supported?
aggregate
yes
point
yes
circles
yes
polygon
yes
circular arc
yes
raster
no
donut polygon
yes
solid
no
elliptical arc
yes
surface
no
ellipses
yes
text
yes
line
yes
z values
no
none
yes
Writer Overview This module writes into a temporary FME FFS dataset and then translates the data into an Adobe Illustrator file for use with Avenza MAPublisher. Because it is not possible to access all the wide range of controls that Adobe Illustrator provides to create a feature-rich map from within another application you may want to create a preset file in Adobe Illustrator that will be used as a template for your destination data first. It is typical that the data read into a new destination map will include data that lies outside the extents of the template map. To fit the data to the extents of the map, you must enable the Fit to Page After Adding Data option. Data can added to a template containing a MAP View or a new MAP View can be created if one doesn't exist. Imported data is automatically assigned a MAP Layer type by MAPublisher. Note: Tip: use the MAP Theme styesheet Auto-Assign option in MAPublisher to automatically have your custom styles applied as data is imported into Adobe Illustrator. After GIS data is successfully imported into Adobe Illustrator, there are several options to handle the document using the Document disposition drop-down options to leave the document open, save it, or save and close it. To save a document using a specified name, enter it into the Destination AI file box and set the document disposition to Save or Save and Close. If you'd like to retain some of the original format attributes, you may want to turn the Strip format attributes option off.
- 106 -
FME Readers and Writers 2013 SP1
Adobe Illustrator - Avenza MAPublisher Writer Parameters Adobe Illustrator Parameters Initial AI File/Template Browse to the map file that will be used as a template for the destination map. This option opens an existing Adobe Illustrator file (*.ai) or Adobe Illustrator Template file (*.ait). When an Adobe Illustrator document is selected, it is used to determine extents of the map, unless there are pre-existing matching MAP Views in the document. If no file is set for this option, a prompt will appear to create a new document when the import process starts in Adobe Illustrator. Destination AI File and Document Disposition After GIS data is successfully imported into Adobe Illustrator, there are several options to handle the document using the Document disposition drop-down options: l
l
l
Leave open: After the import process is complete, the Adobe Illustrator document will be kept open. Save: After the import process is complete, the Adobe Illustrator document will be saved, but will remain open. Save and close: After the import process is complete, the document will be saved and then closed.
To save a document using a specified name, enter it into the Destination AI file box and set the document disposition to Save or Save and Close. Alternatively, you can specify only the Initial AI File, in which case it will be overwritten in the process. When no Destination AI file name is set and the Initial AI file is either a new document or a template, a prompt at the end of the automation process to specify a file name will appear. Existing Document MAP View Fit to Page After Adding Data Enable this option to scale the data (existing and incoming) to fit to the extent of the art board. If Matching MAP View Found When an existing Adobe Illustrator file contains a MAP View with the same coordinate system as the data being imported with MAPublisher-FME Auto, the If Matching Existing MAP View Found option contains several options to handle the imported datasets: l l
Create New MAP View: The datasets will be imported to a new MAP View. Prompt the User: A prompt will appear during the automation whether or not the GIS data should be imported to an existing MAP View. With this option, user can
- 107 -
Overview
specify which MAP View to use. This option is useful when there are multiple MAP Views with the same coordinate system available in the specified AI file. l
Add data to first matching MAP View: If the specified AI file has multiple MAP Views with the same coordinate system, GIS data via FME Automation will be brought to the first MAP View with the same coordinate system as the one with the GIS dataset being imported.
Other Parameters Strip Format Attributes When GIS data is converted to FME Feature Store (FFS) format, the FFS file may contain extra attributes to preserve information of the original data format such as dimension, geometry type, and feature type information. Enable this option to prevent these attributes from being imported into the Adobe Illustrator document. Note that FFS retains all the attribute data from its initial sources, which may include source format-specific attributes, source user attributes, etc. While disabling this option minimizes the amount of data imported, enabling it may result in better rendering of the original dataset features and allow you to perform stylization in MAPublisher based on the original source attributes. Wait for Result from MAPublisher By default, after sending a request to MAPublisher to perform an import operation, FME does not wait for the application to complete it and immediately proceeds to the next item. When this option is enabled, the format writer will wait for MAPublisher to finish its work and report the results to the FME log, rather than having it displayed in MAPublisher. Quit Launched Illustrator if Unused MAPublisher-FME Automation starts Adobe Illustrator if it is not running. Enable this option to quit Adobe Illustrator after the import process if it was launched by FME and it has no other pending requests. If Adobe Illustrator is already running when MAPublisher FME Auto begins, this option will be ignored. Please also note: l
l
All writers in the workspace should have this option enabled in order for Adobe Illustrator to quit. Depending on timing, Adobe Illustrator may quit and launch multiple times if this option is set, since it makes the decision about quitting only based on the requests that have arrived so far.
Character Encoding By default, the current system locale is used to decode language-specific data for attribute definitions and values. This option is the way to specify which encoding should be used to interpret the attribute data in MAPublisher.
- 108 -
FME Readers and Writers 2013 SP1
FFS File Compression Level This option is inherited from FME FFS writer option and has three settings: None, Medium, and High. A lower compression level will result in faster operation while a higher compression level will result in smaller file sizes. 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 The Adobe Illustrator - Avenza MAPublisher writer uses FME translation abilities to store FME features through the FFS format, therefore no special attributes apply. All attributes on the feature are read and written. 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). 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 or in a mapping file. By default, the
- 109 -
Overview
keywords for formats are the format shortname (viewable in the Formats Gallery, or in the Format Quick Facts tables. MAPublisher Writer Directives AIFILESRC This directive specifies the pathname to the map file that will be used as a template for the destination map. This directive is used to open an existing Adobe Illustrator file (*.ai) or Adobe Illustrator Template file (*.ait). When an Adobe Illustrator document is selected, it is used to determine extents of the map, unless there are pre-existing matching MAP Views in the document. If no file is set for this option, a prompt will appear to create a new document when the import process starts in Adobe Illustrator. Required/Optional Optional Workbench Parameter Initial AI File/Template AIFILEDST This directive specifies the pathname to the map file that will be used as the destination map. Alternatively, you can specify only AIFILESRC parameter, in which case it will be overwritten in the process. When AIFILEDST is not provided and AIFILESRC is either a new document or a template, a prompt at the end of the automation process to specify a file name will appear. Required/Optional Optional Workbench Parameter Destination AI File DOCUMENT_POLICY This directive specifies how the document is handled after GIS data is successfully imported into Adobe Illustrator. There are several options: After the import process is complete, the Adobe Illustrator document will be kept open. Leave open:
After the import process is complete, the Adobe Illustrator document will be saved, but will remain open. Save:
After the import process is complete, the document will be either saved under its current name, or saved as the file name specified by AIFILEDST parameter, if provided, and then will be closed. Save and close:
Required/Optional Required
- 110 -
FME Readers and Writers 2013 SP1
Workbench Parameter Document Disposition DATASET This directive specifies the pathname to an FFS file that will be created by FME Workbench as a temporary storage to transfer the data to Adobe Illustrator. After the import process is complete, the file name can be safely re-used by other writers. Required/Optional Required Workbench Parameter FFS Dataset QUITAPPLICATION This directive is used to open or close Adobe Illustrator. MAPublisher FME Auto starts Adobe Illustrator if it is not running. Enable this option to quit Adobe Illustrator after the import process if it was launched by FME and it has no other pending requests. If Adobe Illustrator is already running when MAPublisher FME Auto begins, this option will be ignored. Please also note that all the writers in the workspace should have this option enabled for Adobe Illustrator to quit. Please also note that depending on timing, Adobe Illustrator may quit and launch multiple times if this option is set since it makes the decision about quitting only based on the requests that have arrived so far. Required/Optional Optional Workbench Parameter Quit Launched Illustrator If Unused MAPVIEW_POLICY When an existing Adobe Illustrator file contains a MAP View with the same coordinate system as the data being imported with MAPublisher-FME Auto, the If Matching Existing MAP View Found option contains several options to handle the imported datasets: Create New MAP View:
The datasets will be imported to a new MAP View.
A prompt will appear during the automation whether or not the GIS data should be imported to an existing MAP View. With this option, user can specify which MAP View to use. This option is useful when there are multiple MAP Views with the same coordinate system available in the specified Ai file. Prompt the User:
If the specified Ai file has multiple MAP Views with the same coordinate system, GIS data via FME Automation will be brought to the first MAP View with the same coordinate system as the one with the GIS dataset being imported. All data to first matching MAP View:
Required/Optional
- 111 -
Overview
Required Workbench Parameter If Matching MAP View Found MAPVIEW_AUTOSCALE This directive is used to scale the data (existing and incoming) to fit to the extent of the art board. Required/Optional Optional Workbench Parameter Fit to Page After Adding Data WAIT_FOR_RESULT By default, after sending a request to MAPublisher to perform an import operation, FME does not wait for the application to complete it and immediately proceeds to the next item. If this directive is set to "yes", the format writer will wait for MAPublisher to finish its work and report the results to the FME log, rather than having it displayed in MAPublisher. Required/Optional Optional Workbench Parameter Wait For Result from MAPublisher CODEC_NAME A string of language-specific data encoding for attribute definitions and values. The character encoding is the way to specify what encoding should be used to interpret the attribute data in MAPublisher. Required/Optional Optional Workbench Parameter Character Encoding STRIP_FORMAT_ATTRIBUTES When GIS data is converted to FME Feature Store (FFS) format, the FFS file may contain extra attributes to preserve information of the original data format such as dimension, geometry type, and feature type information. Enable this option to prevent these attributes from being imported into the Adobe Illustrator document.
- 112 -
FME Readers and Writers 2013 SP1
Note that FFS retains all the attribute data from its initial sources, which may include source format-specific attributes, source user attributes, etc. While disabling this option minimizes the amount of data imported, enabling it may result in better rendering of the original dataset features and allow you to perform stylization in MAPublisher based on the original source attributes. Required/Optional Optional Workbench Parameter Strip Format Attributes
- 113 -
FME Readers and Writers 2013 SP1
Aeronautical Information Exchange Model (AIXM) Reader/Writer The AIXM Reader/Writer enables FME to read Aeronautical Information Exchange Model format files. This chapter assumes familiarity with the AIXM format. Overview The Aeronautical Information Exchange Model (AIXM) format was developed by EUROCONTROL, the European Organisation for the Safety of Air Navigation, to allow aeronautical data standardization and exchange. The role of AIXM is to enable systems to exchange aeronautical information in the form of XML-encoded data. AIXM Quick Facts About Quick Facts Tables Format Type Identifier
AIXM
Reader/Writer
Both
Dataset Type
File
Licensing Level
Professional
Dependencies
None
Feature Type
AIXM entity name
Typical File Extensions
.xml
Automated Translation Support
No
User-Defined Attributes
No
Coordinate System Support
Yes
Generic Color Support
No
Spatial Index
Never
Schema Required
No
Transaction Support
No
Geometry Type Attribute
xml_type Geometry Support
Geometry
Supported?
Geometry
Supported?
aggregate
yes
point
yes
circles
yes
polygon
yes
circular arc
yes
raster
no
- 115 -
Aeronautical Information Exchange Model (AIXM) Reader/Writer
Geometry Support Geometry
Supported?
Geometry
Supported?
donut polygon
no
solid
no
elliptical arc
no
surface
no
ellipses
no
text
no
line
yes
z values
no
none
yes
Reader Overview The AIXM reader presents features by normalizing the XML data into the entities of the AIXM Entity-Relational model. Thus, the feature representation is not equivalent to the AIXM XML format representation of the AIXM E-R model entity. Aeronautical Information Exchange Model (AIXM) 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. Writer Overview The AIXM writer has a fixed output schema that closely resembles the AIXM EntityRelational model. The reader can be connected directly to the writer and the output file will be nearly identical to the original source file.
- 116 -
FME Readers and Writers 2013 SP1
Feature Representation In addition to the generic FME feature attributes that FME Workbench adds to all features (seeAbout Feature Attributes), special FME feature attributes are used by the AIXM reader to store the characteristics of the features it reads. The AIXM Reader module utilizes the XML Reader module in processing the AIXM XML file. Thus, the feature representation is similar to the feature representation of the XML Reader module. The format attribute, xml_type, which may identify the geometry type of the feature, is identical in intent to the same attribute set by the XML Reader. Details of this attribute can be found in the XML Reader/Writer documentation. Attribute Name
Contents
aixm_update_ID
When an AIXM Update message changes the natural key that identifies an object, then this attribute will hold the old natural key of the object to be updated.
aixm_update_group_no
This attribute determines the order of the AIXM Group elements within the output file. The values of this attribute are integers, and identifies the feature with a specific group. When all features are received by the AIXM writer, features are grouped according to the values of their aixm_update_group_no attribute, and the groups are written in ascending order of through group numbers. If this attribute is not specified, then the feature will be grouped with group number zero.
aixm_update_name
The value of this attribute specifies the ‘name’ attribute of the AIXM Group element that holds the feature.
aixm_update_subname
The value of this attribute specifies the ‘sub-name’ attribute of the AIXM Group element that holds the feature.
aixm_update_reason
The value of this attribute specifies the ‘reason’ attribute of the AIXM Group element that holds the feature.
aixm_update_type
The value of this attribute determines the type of the AIXM Update message for that particular feature: New, Update, or Withdrawn.
aixm_noseq
The AIXM reader normalizes the XML schema. After this transformation, child elements that composed a parent element may become independent features. If the child elements were ordered within the parent element, then this attribute will hold the sequence number that determines the child element’s placement within a parent element.
- 117 -
Aeronautical Information Exchange Model (AIXM) Reader/Writer
Attribute Name
Contents
aixm_update_changed
This is a list attribute that holds the names of attributes that are flagged as changed in an AIXM Update message.
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). 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 or 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 suffixes shown below are prefixed by the current in a mapping file. By default, the for the AIXM reader is AIXM. DATASET Required/Optional: Required The value for this directive is the path of the AIXM file to be read. A typical mapping file fragment specifying an input AIXM dataset looks like: AIXM_DATASET /usr/data/aixm.xml
- 118 -
FME Readers and Writers 2013 SP1
Workbench Parameter: Source Aeronautical Information Exchange Model (AIXM) File (s) INTERPOLATE Required/Optional: Optional The value for this directive determines whether non-linear interpolation will be performed between two vertices of an area or line geometry. This keyword will also determine the representation of geometry data. Further information on this topic can be found under the Feature Representation heading. An example mapping file fragment specifying that interpolation should be performed looks like: INTERPOLATE Yes 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 _SEARCH_ENVELOPE 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
- 119 -
Aeronautical Information Exchange Model (AIXM) Reader/Writer
Optional Mapping File Syntax _SEARCH_ENVELOPE_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 _CLIP_TO_ENVELOPE [yes | no] Workbench Parameter Clip To Envelope Writer Directives The directives processed by the AIXM writer are listed below. The suffixes shown will be prefixed by the current in a mapping file. By default, the for the AIXM writer is AIXM. DATASET Required/Optional: Required The value for this keyword is the path of the output AIXM file. A typical mapping file fragment specifying an output AIXM file looks like: AIXM_DATASET /usr/data/aixm.xml Workbench Parameter: Destination Aeronautical Information Exchange Model (AIXM) File WRITE_MODE Required/Optional: Optional The value for this keyword determines the type of AIXM file, either an AIXM Snapshot or AIXM Update, produced by the writer. Valid values are UPDATE and SNAPSHOT. The default value is UPDATE: AIXM_WRITE_MODE UPDATE Workbench Parameter: AIXM writer mode
- 120 -
FME Readers and Writers 2013 SP1
ORIGIN Required/Optional: Optional The value for this keyword is a string that determines the originator of the AIXM message: AIXM_ORIGIN ABC Workbench Parameter: Origin CREATED Required/Optional: Optional The value for this keyword determines the date and time that the AIXM message was created. The string should be a valid XML dateTime string: AIXM_CREATED 2002-10-10 Workbench Parameter: Created EFFECTIVE Required/Optional: Optional The value for this keyword determines the date and time that the AIXM message becomes effective. The string should be a valid XML dateTime string: AIXM_CREATED 2002-10-10 Workbench Parameter: Effective USE_CHG Required/Optional: Optional The value for this keyword determines whether the ‘chg’ XML attributes will be added to each XML element written by the writer. Valid values are YES and NO. If the value is YES, then XML elements whose names appear in the aixm_update_changed format specific attribute will have an XML attribute named ‘chg’ with a value of ‘1’ inserted. The default value for this keyword is YES: AIXM_USE_CHG YES Workbench Parameter: Add 'chg' attributes
- 121 -
FME Readers and Writers 2013 SP1
Aircom ENTERPRISE Map Data/ASSET Data Reader/Writer Note: This format is not supported by FME Base Edition. This format requires an extra-cost plug-in. Please contact Safe Software for details. The AIRCOM ENTERPRISE Map Data Reader/Writer provides FME with access to AIRCOM International’s ENTERPRISE format. Overview The AIRCOM ENTERPRISE format is a collection of different types of data. These types of data include height, clutter, vector, text, building vector, and population vector. The data is stored in a hierarchy of directories, with each subdirectory containing a different type of data. Each subdirectory will contain an index.txt file that will act as a guide to the location and type of data that is in the directory. There can be an unlimited number of subdirectories under the main directory. These subdirectories can have any name that is legal for that operating system, but each subdirectory can only contain one type of data. The index.txt file contained in each subdirectory contains different fields depending upon the type of data contained in that subdirectory. The type of data that is stored is described below: ENTERPRISE Quick Facts About Quick Facts Tables Format Type Identifier
ENTERPRISE
Reader/Writer
Both
Dataset Type
Reader: File, Writer: Directory
Licensing Level
Professional
Dependencies
Extra-cost plug-in
Feature Type
Feature Name
Typical File Extensions
.txt
Automated Translation Support
No
User-Defined Attributes
No
Coordinate System Support
No
Generic Color Support
No
Spatial Index
No
Schema Required
No
Transaction Support
No
Encoding Support
No
Geometry Type Attribute
enterprise_type
- 123 -
Aircom ENTERPRISE Map Data/ASSET Data Reader/Writer
Geometry Support Geometry
Supported?
Geometry
Supported?
aggregate
yes
point
yes
circles
yes
polygon
yes
circular arc
yes
raster
yes
donut polygon
no
solid
no
elliptical arc
no
surface
no
ellipses
no
text
no
line
yes
z values
no
none
yes
Band Interpretations
Int16
Palette Key Interpretations
UInt8, UInt16
Palette Value Interpretations
String
Nodata Value
-9999 for height
Cell Origin (x, y)
0, 0
Rotation Support
No
GCP Support
No
World File Support
No
TAB File Support
No
Height Data The data file name corresponds to a binary file that contains height values for each square on the raster defined by the easting-northing coordinates. Clutter Data The data file name corresponds to a binary file that contains key values for the each square on the raster defined by the easting-northing coordinates. The key values correspond to strings found in the menu.txt file. Array Data The data file name corresponds to a binary file that contains array values for the each square on the raster defined by the easting-northing coordinates. Vector Data Each data file listed in the index file contains a set of 2D vectors that all have the same feature name.
- 124 -
FME Readers and Writers 2013 SP1
Text Data Each data file listed in the index file contains a set of text features that all have the same feature name. Population Vector Data Each data file listed in the index file contains a set of 2D polygons that all have the same feature name. Building Vector Data Each data file listed in the index file contains a set of 2D polygons that all have the same feature name. For reading, the FME considers an AIRCOM ENTERPRISE dataset to be the location of an index.txt file in one of the ENTERPRISE subdirectories. For writing, the dataset is the name of the subdirectory to write a single ENTERPRISE type. The FME reader can automatically determine which type of data is in this subdirectory. The FME writer determines which ENTERPRISE type is being written and creates an appropriate directory structure and index.txt file for the destination dataset. Reader Overview The ENTERPRISE reader produces FME features for all feature data held in those files listed in the index.txt file. The reader only returns the feature names selected using the DEF or IDs keywords. If none were specified, then all the features are read. When the index.txt file is exhausted, the ENTERPRISE reader is closed. Aircom ENTERPRISE Map Data/ASSET Data 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.
- 125 -
Aircom ENTERPRISE Map Data/ASSET Data Reader/Writer
Writer Overview The ENTERPRISE writer creates and writes feature data of a single type (Vector, Clutter, Heights, etc.) into a single directory specified by the DATASET directive. The directory need not exist before the translation occurs. Any old files in the directory may be overwritten with the new feature data without warning. The type of data that will be written by FME is determined by what is selected in the data type drop-down list in the ENTERPRISE settings box. If first_feature is selected, the first feature routed to the ENTERPRISE writer by FME determines the type of data that will be written and all subsequent features will be written out as that type, if possible. Each of the other options corresponds to the selected ENTERPRISE feature type being written out. Note: Types enterprise_vector, enterprise_vector_point, enterprise_ vector_line, and enterprise_vector_polygon may all be written to the same dataset. ENTERPRISE only supports a limited set of coordinate systems. Please consult your ENTERPRISE documentation to ensure that you are writing data using one of the supported coordinate systems. FME Raster Features FME raster features represent raster data and use several concepts that are unlike those used in the handling of vector data. See About FME Rasters. The Height feature type supports rasters with a single numeric band. The Clutter feature type supports rasters with a single band that has a String palette. The Array feature type supports multiple numeric bands. The exact makeup of the bands depends on the array type (see the enterprise_array_type attribute). 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. The attribute types created by the ENTERPRISE format are listed below. Field Type
Description
char()
Character fields store fixed-length strings. The width parameter controls the maximum characters that can be stored by the field. When a character field is written, it is right-padded with blanks, or truncated, to fit the width.
decimal(,)
Decimal fields store single and double precision
- 126 -
FME Readers and Writers 2013 SP1
Field Type
Description 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.
ENTERPRISE features consist of geometry and attribute information. All ENTERPRISE FME features contain the enterprise_type attribute that identifies the geometric type. Depending on the geometric type, the feature may contain additional attributes specific to the geometric type. These are described in subsequent sections. Attribute Name
Contents
enterprise_type
The ENTERPRISE geometric type of this entity. Range:
enterprise_height| enterprise_clutter| enterprise_array| enterprise_vector| enterprise_vector_point| enterprise_vector_line| enterprise_vector_polygon| enterprise_buildpop| enterprise_text Default: No default enterprise_data_file_name
The filename this feature came from (or should be written to) as listed in the index.txt file. Range: Default: or data.txt
Height Rasters enterprise_type: enterprise_height ENTERPRISE height features represent a raster of 3D values, where the z-coordinate reflects the height value for the raster square whose top-left corner is defined by the (x, y) point. These features have one special attribute associated with them. Attribute Name
Contents
enterprise_raster_filename
The root filename of the feature that is being represented.
Clutter Rasters enterprise_type: enteprise_clutter
- 127 -
Aircom ENTERPRISE Map Data/ASSET Data Reader/Writer
ENTERPRISE height features represent a raster of 2D values, but where the zcoordinate reflects a key value for the raster square whose top-left corner is defined by the (x, y) point. The key value is a classified string value. These features have one special attribute associated with them. Attribute Name
Contents
enterprise_raster_filename
The root filename of the feature that is being represented.
Array Rasters enterprise_type: enteprise_array ENTERPRISE array features represent a raster of 2D values, but where the zcoordinate reflects an array field value for the raster square whose top-left corner is defined by the (x, y) point. The array field value is an integer value. These features have four special attribute associated with them. Attribute Name
Contents
enterprise_raster_file_type
The raster file type of the raster feature that is being represented. The value can only be “coverage” for now.
enterprise_array_type
The array type of the raster feature that is being represented. This attribute depends on the raster file type. For “coverage” raster file type, this attribute can have one of the following values: best_server_array nth_best_server_array worst_interferer_array total_interference_array worst_connection_array average_connection_array total_received_array
enterprise_array_field
The field name of the array of the raster feature that is being represented. This attribute depends on the array type. This attribute can have one of the following values: number_of_servers cell_key layer_key signal_level ci_level carrier connection
- 128 -
FME Readers and Writers 2013 SP1
Attribute Name
Contents level not_used
Vectors enterprise_type: enterprise_vector enterprise_type: enterprise_vector_point enterprise_type: enterprise_vector_line enterprise_type: enterprise_vector_polygon ENTERPRISE vector features represent linear features and are 2D. These features have the following special attribute associated with them. Attribute Name
Contents
enterprise_description
The description of the feature as stored in the dataset. Maximum size is 12 characters.
enterprise_feature_name
The name of the feature as stored in the dataset. Maximum size is 254 characters.
Building Height or Population Polygons enterprise_type: enterprise_buildpop ENTERPRISE buildpop features represent closed polygonal features that are 2D. These features have the following special attributes associated with them. Attribute Name
Contents
enterprise_description
The description of the feature as stored in the dataset. Maximum size is 12 characters.
enterprise_attribute_file_name
The filename this feature came from (or should be written to) as listed in the index.txt file. Range: Default:_att or data_att.txt
enterprise_attribute_value
A numeric value associated with that feature. This is either the height of the building or the population of the area represented by the polygon. Range: Any real number
enterprise_attribute_ description
The description of the attribute for the feature as stored in the dataset. Maximum size is 12 characters.
enterprise_feature_name
The name of the feature as stored in the dataset. Maximum size is 254 characters.
- 129 -
Aircom ENTERPRISE Map Data/ASSET Data Reader/Writer
Text enterprise_type: enterprise_text ENTERPRISE text features hold text information. A single 2D position is associated with the text block. Text features may have the following special attributes associated with them. Attribute Name
Contents
enterprise_text_string
The text string of the feature. Maximum size is 254 characters.
enterprise_text_size
The size of the text string of the feature. This is ignored when writing. When reading, this is initially set to a multiple of the MBR of the file the text is read from. Maximum size is 254 characters.
enterprise_feature_name
The name of the feature as stored in the dataset. Maximum size is 254 characters.
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). 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 or in a mapping file. By default, the
- 130 -
FME Readers and Writers 2013 SP1
keywords for formats are the format shortname (viewable in the Formats Gallery, or in the Format Quick Facts tables. Reader Directives The suffixes shown are prefixed by the current in a mapping file. By default, the for the ENTERPRISE reader is ENTERPRISE. DATASET Required/Optional: Required The value for this keyword is the path of the input index.txt file to be read. This dataset MUST be a file called index.txt. Example: ENTERPRISE_DATASET /usr/data/aircom/europe/index.txt Workbench Parameter: Source Aircom ENTERPRISE Map Data/ASSET Data File(s) MERGE_FEATURE_NAMES Required/Optional: Optional Specifies whether or not to group common feature names in the source index.txt file. If this directive is set to YES, the rows in the index file with common feature names will be grouped as one feature name. If this is changed to NO, each row in the index file will be treated as a unique feature name. All feature names will be made unique by adding the filename to the feature name. Value: YES | NO Default Value: YES Example: The following example shows a generated unique feature name from the filename myfile.txt and the feature name myfeaturename. myfeaturename Workbench Parameter: Merge Feature Names 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 _SEARCH_ENVELOPE
- 131 -
Aircom ENTERPRISE Map Data/ASSET Data Reader/Writer
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 _SEARCH_ENVELOPE_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 _CLIP_TO_ENVELOPE [yes | no] Workbench Parameter Clip To Envelope
- 132 -
FME Readers and Writers 2013 SP1
Writer Directives The suffixes shown are prefixed by the current in a mapping file. By default, the for the ENTERPRISE writer is ENTERPRISE. 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 _CLIP_TO_ENVELOPE [yes | no] Workbench Parameter Clip To Envelope DATA_TYPE Required/Optional: Optional The optional definition specifies only the type or class of data that the writer will output. Values: first_feature height clutter building_raster backdrops vector population_vector building_vector "text" Note: The ENTERPRISE writer can only output one of these types during a translation, and all features will be attempted to be written out as this type, if possible. Tip: If you wish to write out several different types at once, you may consider using FME’s MultiWriter, which will direct each of the ENTERPRISE writers being used to write out a different type. Default Value: first_feature If this keyword is not specified, the default first_feature is used. In this case, the data type of the first feature that is passed to the writer determines what type of data the writer will produce. Example:
- 133 -
Aircom ENTERPRISE Map Data/ASSET Data Reader/Writer
_DATA_TYPE vector
- 134 -
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 or 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 in a mapping file. By default, the 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: _DEF \ []+
- 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()
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(, )
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 _SEARCH_ENVELOPE
- 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 _SEARCH_ENVELOPE_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 _CLIP_TO_ENVELOPE [yes | no] Workbench Parameter Clip To Envelope
- 140 -
FME Readers and Writers 2013 SP1
ARC Digitized Raster Graphics (ADRG) Reader Note: This format is not supported by FME Base Edition. This format requires the Advanced Raster Pack license. Contact Safe Software for details. The ADRG Reader module enables FME to access data in the Arc-Digitized Raster Graphics (ADRG) format. Overview ADRG is a standard National Imagery and Mapping Agency (NIMA) digital product designed to support applications that require a raster map background display. ADRG is a military format that conforms to the ISO 8211 standard. ADRG data is divided into geographic data sets as Distribution Rectangles (DRs). ADRG directories contain a general information file (.GEN extension) and one or more ADRG zone distribution rectangle (ZDR) image files (.IMG extension). The GEN file provides image parameters and support data for the ZDR image files associated with a DR. For each dataset, image data within a ZDR image file is returned as a single feature, since this feature will contain the entire image data of one ZDR image file. All ADRG data is assumed to be in LL84. Data in polar zones will be automatically converted to LL84, which may result in some distortion of the image. ADRG Quick Facts About Quick Facts Tables Format Type Identifier
ADRG
Reader/Writer
Reader
Licensing Level
Professional
Dependencies
Advanced Raster Pack
Dataset Type
File
Feature Type
ADRG or
Typical File Extensions
.gen and .img
Automated Translation Support
Yes
User-Defined Attributes
Through TAB files
Coordinate System Support
Yes
Generic Color Support
No
Spatial Index
No
- 141 -
ARC Digitized Raster Graphics (ADRG) Reader
Schema Required
No
Transaction Support
No
Encoding Support
No
Geometry Type Attribute
adrg_type Geometry Support
Geometry
Supported?
Geometry
Supported?
aggregate
yes
point
yes
circles
no
polygon
yes
circular arc
no
raster
yes
donut polygon
yes
solid
no
elliptical arc
no
surface
no
ellipses
no
text
no
line
yes
z values
no
none
yes
Band Interpretations
Red8, Green8, Blue8
Palette Key Interpretations
not applicable
Palette Value Interpretations
not applicable
Nodata Value
0,0,0
Cell Origin (x, y)
0.5, 0.5
Rotation Support
No
GCP Support
No
World File Support
No
TAB File Support
Yes
Reader Overview FME considers a single ADRG general information file to be a dataset. The ADRG general information file contains the ZDR image file names. The image files are raster files containing pixel data, and each pixel in the file is a point in a single FME raster feature. ARC Digitized Raster Graphics (ADRG) Reader Parameters Dataset Parameters Group by GEN Filename The only feature type this reader will use is the reader type name, which in this case is ADRG. No (default):
- 142 -
FME Readers and Writers 2013 SP1
The feature type of each dataset is the filename (without the path or the extension) of the dataset. Yes:
Schema Attributes Additional Attributes to Expose This parameter exposes Format Attributes in Workbench when you create a workspace: l
l
In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime. In a non-dynamic scenario where you have multiple feature types, it is convenient to expose additional attributes from one parameter. For example, if you have ten feature types and want to expose the same attribute in each one, it is easier to define it once than it is to set each feature type individually in the workspace.
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. FME Raster Features FME raster features represent raster data and use several concepts that are unlike those used in the handling of vector data. See About FME Rasters. ADRG only supports rasters that have a Red8 band, a Green8 band, and a Blue8 band. Feature Representation In addition to the generic FME feature attributes that FME Workbench adds to all features (see See " About Feature Attributes" on page 15), this format adds the
- 143 -
ARC Digitized Raster Graphics (ADRG) Reader
format-specific attributes described in this section. ADRG features specify a matrix of x, y coordinates and 3-byte RGB pixels. Attribute Name
Contents
adrg_type
This will always be adrg_raster.
adrg_noz
The number of zone image files.
adrg_rty
The record id number.
adrg_prt
The product type.
adrg_nam
The ZDR image name.
adrg_zna
The ARC zone number.
adrg_swo
The westernmost longitude of the extent within the zone (including the overlapped region) of the unpadded cartographic image in arc degrees.
adrg_swa
The southernmost latitude of the extent within the zone (including the overlapped region) of the unpadded cartographic image in arc degrees.
adrg_neo
The easternmost longitude of the extent within the zone (including the overlapped region) of the unpadded cartographic image in arc degrees.
adrg_nea
The northernmost latitude of the extent within the zone (including the overlapped region) of the unpadded cartographic image in arc degrees.
adrg_arv
The ARC value Asz (adjusted for scale and zone), which is the number of pixels per 360 degrees longitude.
adrg_brv
The ARC value Bs (adjected for scale), which is the number of pixels per 360 degrees latitude.
adrg_lso
The longitude of the upper left corner of the ZDR image in WGS 84 coordinates.
adrg_pso
The latitude of the upper left corner of the ZDR image in WGS 84 coordinates.
adrg_txt
Free text (e.g., digitizing system description).
adrg_nul
The row number of the upper right corner of the ZDR image (in pixels).
adrg_nus
The column number of the upper right corner of the ZDR image (in pixels).
adrg_nll
The row number of the lower left corner of the ZDR
- 144 -
FME Readers and Writers 2013 SP1
Attribute Name
Contents image (in pixels).
adrg_nls
The column number of the lower left corner of the ZDR image (in pixels).
adrg_nfl
The image height (in tiles).
adrg_nfc
The image width (in tiles).
adrg_pnc
The number of pixels per tile row.
adrg_pnl
The number of rows per tile.
adrg_pcb
The number of bits per pixel count.
adrg_pvb
The number of bits per pixel value.
adrg_bad
The GEO DATA FILE name.
adrg_ws1
The lower band edge wavelength in nanometers.
adrg_ws2
The upper band edge wavelength in nanometers.
adrg_tif
The tile index map flag (true indicates there are tiles with no data; false indicates that all tiles contain RGB graphic data).
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). 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.
- 145 -
ARC Digitized Raster Graphics (ADRG) Reader
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 or 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 suffixes shown in the directives below are prefixed by the current in a mapping file. By default, the for the ADRG reader is ADRG. DATASET Required/Optional: Required The value for this directive is the name of a single ADRG general information file. The normal extension for the general information files is .gen. An example of the DATASET keyword in use is: ADRG_DATASET “C:\DATA\ADRG\AGCA0101.GEN” Workbench Parameter: Source ADRG File(s) GROUP_BY_DATASET Required/Optional: Required The value for this directive is either Yes or No. When the value is set to No, the only feature type this reader will use is the reader type name, which in this case is ADRG. When the value is set to Yes, the feature type of each dataset is the filename (without the path or the extension) of the dataset. The default value for this directive is No. An example of the GROUP_BY_DATASET keyword in use is: GROUP_BY_DATASET “Yes” 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
- 146 -
FME Readers and Writers 2013 SP1
_SEARCH_ENVELOPE 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 _SEARCH_ENVELOPE_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 _CLIP_TO_ENVELOPE [yes | no] Workbench Parameter Clip To Envelope
- 147 -
ARC Digitized Raster Graphics (ADRG) Reader
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
- 148 -
FME Readers and Writers 2013 SP1
ARC Standard Raster Product (ASRP) Reader Note: This format is not supported by FME Base Edition. This format requires the Advanced Raster Pack license. Contact Safe Software for details. The ARC Standard Raster Product (ASRP) Reader allows FME to access data in the ASRP format. Overview ASRP is a military format that conforms to the ISO 8211 standard, and its data is derived directly from ADRG. ASRP data is divided into geographic data sets as Distribution Rectangles (DRs). ASRP directories contain a general information file (.GEN extension) and one or more ASRP zone distribution rectangle (ZDR) image files (.IMG extension)). The GEN file provides image parameters and support data for the ZDR image files associated with a DR. For each dataset, image data within a ZDR image file is returned as a single feature, since this feature will contain the entire image data of one ZDR image file. All ASRP data is assumed to be in LL84. Data in polar zones will be automatically converted to LL84, which may result in some distortion of the image. ASRP Quick Facts About Quick Facts Tables Format Type Identifier
ASRP
Reader/Writer
Reader
Licensing Level
Professional
Dependencies
Advanced Raster Pack
Dataset Type
File
Feature Type
ASRP or
Typical File Extensions
.gen and .img
Automated Translation Support
Yes
User-Defined Attributes
Through TAB files
Coordinate System Support
Yes
Generic Color Support
No
Spatial Index
No
Schema Required
No
Transaction Support
No
Encoding Support
No
Geometry Type Attribute
asrp_type
- 149 -
ARC Standard Raster Product (ASRP) Reader
Geometry Support Geometry
Supported?
Geometry
Supported?
aggregate
no
point
no
circles
no
polygon
no
circular arc
no
raster
yes
donut polygon
no
solid
no
elliptical arc
no
surface
no
ellipses
no
text
no
line
no
z values
no
none
no
Band Interpretations
not applicable
Palette Key Interpretations
UInt8
Palette Value Interpretations
RGB24
Nodata Value
0,0,0
Cell Origin (x, y)
0.5, 0.5
Rotation Support
No
GCP Support
No
World File Support
No
TAB File Support
Yes
Reader Overview FME considers a single ASRP general information file to be a dataset. The ASRP general information file contains the ZDR image file names. The image files are raster files containing pixel data, and each pixel in the file is a point in a single FME raster feature. ARC Standard Raster Product (ASRP) Reader Parameters Dataset Parameters Group by GEN Filename No (default): The only feature type this reader will use is the reader type name, which in this case is ASRP. Yes: The feature type of each dataset is the filename (without the path or the extension) of the dataset. Schema Attributes Additional Attributes to Expose This parameter exposes Format Attributes in Workbench when you create a
- 150 -
FME Readers and Writers 2013 SP1
workspace: l
l
In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime. In a non-dynamic scenario where you have multiple feature types, it is convenient to expose additional attributes from one parameter. For example, if you have ten feature types and want to expose the same attribute in each one, it is easier to define it once than it is to set each feature type individually in the workspace.
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. FME Raster Features FME raster features represent raster data and use several concepts that are unlike those used in the handling of vector data. See About FME Rasters. ASRP only supports rasters that have a single UInt8 band with an RGB24 palette. 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. ASRP features specify a matrix of x, y coordinates and 3-byte RGB pixels. Attribute Name asrp_type
Contents This will always be asrp_raster.
- 151 -
ARC Standard Raster Product (ASRP) Reader
asrp_noz
The number of zone image files.
asrp_rty
The record id number.
asrp_prt
The product type.
asrp_nam
The ZDR image name.
asrp_zna
The ARC zone number.
asrp_swo
The westernmost longitude of the extent within the zone (including the overlapped region) of the unpadded cartographic image in arc degrees.
asrp_swa
The southernmost latitude of the extent within the zone (including the overlapped region) of the unpadded cartographic image in arc degrees.
asrp_neo
The easternmost longitude of the extent within the zone (including the overlapped region) of the unpadded cartographic image in arc degrees.
asrp_nea
The northernmost latitude of the extent within the zone (including the overlapped region) of the unpadded cartographic image in arc degrees.
asrp_arv
The ARC value Asz (adjusted for scale and zone), which is the number of pixels per 360 degrees longitude.
asrp_brv
The ARC value Bs (adjusted for scale), which is the number of pixels per 360 degrees latitude.
asrp_lso
The longitude of the upper left corner of the ZDR image in WGS 84 coordinates.
asrp_pso
The latitude of the upper left corner of the ZDR image in WGS 84 coordinates.
asrp_txt
Free text (e.g., digitizing system description).
asrp_nul
The row number of the upper right corner of the ZDR image (in pixels).
asrp_nus
The column number of the upper right corner of the ZDR image (in pixels).
asrp_nll
The row number of the lower left corner of the ZDR image (in pixels).
asrp_nls
The column number of the lower left corner of the ZDR image (in pixels).
asrp_nfl
The image height (in tiles).
- 152 -
FME Readers and Writers 2013 SP1
asrp_nfc
The image width (in tiles).
asrp_pnc
The number of pixels per tile row.
asrp_pnl
The number of rows per tile.
asrp_pcb
The number of bits per pixel count.
asrp_pvb
The number of bits per pixel value.
asrp_bad
The GEO DATA FILE name.
asrp_ws1
The ON-color-code value (0 - 255)
asrp_ws2
The OFF-color-code value (0 - 255)
asrp_tif
The tile index map flag (true indicates there are tiles with no data; false indicates that all tiles contain RGB graphic data).
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). 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 or in a mapping file. By default, the
- 153 -
ARC Standard Raster Product (ASRP) Reader
keywords for formats are the format shortname (viewable in the Formats Gallery, or in the Format Quick Facts tables. Reader Directives The suffixes shown are prefixed by the current in a mapping file. By default, the for the ASRP reader is ASRP. DATASET Required/Optional: Required The value for this directive is the name of a single ASRP general information file. The normal extension for the general information files is .gen. An example of the DATASET directive in use is: ASRP_DATASET “C:\DATA\ASRP\AGCA0101.GEN” Workbench Parameter: Source ASRP File(s) GROUP_BY_DATASET Required/Optional: Required The value for this directive is either Yes or No. When the value is set to No, the only feature type this reader will use is the reader type name, which in this case is ASRP. When the value is set to Yes, the feature type of each dataset is the filename (without the path or the extension) of the dataset. The default value for this directive is No. An example of the GROUP_BY_DATASET keyword in use is: GROUP_BY_DATASET “Yes” 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 _SEARCH_ENVELOPE Note: If all four coordinates of the search envelope are specified as zero, the search envelope will be disabled. Required/Optional Optional
- 154 -
FME Readers and Writers 2013 SP1
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 _SEARCH_ENVELOPE_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 _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
- 155 -
ARC Standard Raster Product (ASRP) Reader
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
- 156 -
FME Readers and Writers 2013 SP1
ASPRS LIDAR Data Exchange Format (LAS) Reader/Writer Format Note: This format is not supported by FME Base Edition. The American Society Photogrammetry and Remote Sensing (ASPRS) LIDAR (LAS) Reader allows FME to read LIDAR (data exchange format standard) LAS specifications.
Overview The LAS file is intended to contain LIDAR point records. The data will generally be put into this format from software (provided by LIDAR hardware vendors) which combines GPS, IMU, and laser pulse range data to produce X, Y, and Z point data. The intention of the data format is to provide an open format that allows different LIDAR hardware and software tools to output data in a common format. FME supports LAS versions 1.0, 1.1, and 1.2. The format contains binary data consisting of a header block, Variable Length Records (VLRs), and point data. Note: Reading and writing of arbitrary VLRs is not currently supported; only defined georeferencing information VLRs are supported. About Point Clouds A point cloud is a type of geometry that is useful for storing large amounts of data, typically gathered from LIDAR applications. The use of LIDAR allows for fast and accurate collection of data, such as for forestry canopy measurements, or landscape modeling. Point cloud geometry allows for quick and efficient processing of a large collection of vertices in 3D space that represent the external surfaces of objects. Together, these vertices form a model which can be transformed, and visualized. Some operations of the point cloud geometry involve thinning, splitting, and combining to produce a more useable set of vertices. This is an example point cloud image:
- 157 -
Overview
Associated with each vertex are a number of properties called components, which contain a value that describes the point. These component values can be used to classify different sections of the collection of points contained in the point cloud geometry. The specific set of components stored by the point cloud is referred to as the interpretation. The default value specifies the value that will be assigned to the component when no other information is available. For example, this could occur if writing a point cloud to a format that requires a certain component to be present, but that component does not exist on the input point cloud. Default Value
Interpretation
Allowed Values
Intensity
1.7E +/- 308 (15 digits)
0
The magnitude of the intensity of the pulse return.
Color
0 to 65,535
0
The color of the object at the point, in RGB color.
Classification
0 to 65,535
0
The classification value categorizes the points into fields, such as ground, building, water, etc.
Returns
1-5
1
The return value is the return number from a pulse.
Number of returns
1-5
1
The total number of detected returns from a single pulse.
Angle
-90 to 90
0
The angle of the pulse that the point was scanned at.
Flight line
0 to 4,294,967,295
0
The flight line number the point was detected in.
Scan Direction
0 and 1
0
The direction in which a scanning mirror was directed when the point was detected.
Point ID
1 to 65,535
0
This point ID is indicative of the point origin.
POSIX time
1.7E +/- 308 (15
0
Used to express the time,
- 158 -
Description
FME Readers and Writers 2013 SP1
Interpretation
Default Value
Allowed Values digits)
Description as the number of seconds elapsed since UTC January 1st, 1970.
User data
0 to 65,535
0
The user data value is for the user to use.
GPS time and GPS week
GPS Week: 1.7E +/308 (15 digits)
0
Together, these two values express the time since January 6th, 1980. The GPS Week represents a week number, and the GPS time represents the number of seconds into a week.
0
The flight line edge value is a flag for points that lie on the edge of the scan, along the flight line.
GPS Time: 0 to 65, 535
Flight line Edge
1 for points on the edge, 0 otherwise.
LAS Quick Facts About Quick Facts Tables Format Type Identifier
LAS
Reader/Writer
Both
Licensing Level
Professional
Dependencies
None
Dataset Type
Reader: File, Writer: Directory
Feature Type
LAS or
Typical File Extensions
.las .laz
Automated Translation Support
Yes
User-Defined Attributes
No
Coordinate System Support
Yes
Generic Color Support
No
Spatial Index
Never
Schema Required
Not Applicable
Transaction Support
No
Geometry Type Attribute
las_type
Encoding Support
No
- 159 -
Overview
Geometry Support Geometry
Supported?
Geometry
Supported?
aggregate
no
point
no
circles
no
point cloud
yes
circular arc
no
polygon
no
donut polygon
no
raster
no
elliptical arc
no
solid
no
ellipses
no
surface
no
line
no
text
no
none
no
z values
no
Point Cloud Component
Data Type
Notes
fmepc_angle
REAL64
Range: -90 to 90
fmepc_classification
UINT8
fmepc_color_r
UINT16
Only supported in version 1.1+
fmepc_color_g
UINT16
Only supported in version 1.1+
fmepc_color_b
UINT16
Only supported in version 1.1+
fmepc_flight_line_edge
UINT8
Range: 0 to 1
fmepc_flight_line
not supported
While not directly supported, flight line will be written as point source ID if point source ID does not exist on the point cloud.
fmepc_gps_time
REAL64
fmepc_gps_week
not supported
fmepc_intensity
UINT16
fmepc_number_of_returns
UINT8
Range: 1 to 5
fmepc_point_source_id
UINT16
Only supported in version 1.1+
- 160 -
FME Readers and Writers 2013 SP1
fmepc_posix_time
not supported
fmepc_return
UINT8
Range: 1 to 5
fmepc_scan_direction
UINT8
Range: 0 to 1
fmepc_user_data
UINT8 (version 1.1+) or UINT16 (version 1.0)
Reader Overview FME considers a single LAS file to be a dataset. Each dataset contains a single FME point cloud feature. ASPRS Lidar Data Exchange Format (LAS) Reader Parameters Dataset Parameters Group By Filename/Dataset If you select this option, feature types are grouped by dataset, and are named using the filename of each dataset (without the path or the extension). If you do not select this option, the only feature type this reader will use is the reader type name. Schema Attributes Additional Attributes to Expose This parameter exposes Format Attributes in Workbench when you create a workspace: l
l
In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime. In a non-dynamic scenario where you have multiple feature types, it is convenient to expose additional attributes from one parameter. For example, if you have ten feature types and want to expose the same attribute in each one, it is easier to define it once than it is to set each feature type individually in the workspace.
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.
- 161 -
Overview
Writer Overview FME considers a dataset to be a directory name. The feature type of each dataset is the filename. The LAS writer distinguishes duplicate output files by appending numbers to the filenames. ASPRS Lidar Data Exchange Format (LAS) Writer Parameters ASPRS LAS Version
Select the version number of ASPRS LAS from the drop-down list. Compress Files This parameter enables or disables compression when writing an LAS file. Compression significantly decreases file size; compressed files are often only 10-20% of the original size. However, compressed files take longer to read than uncompressed files. Note: This parameter applies only to machines using the Windows operating system. 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. Attribute Name
Contents
las_type
This will always be las_point_cloud.
las_file_creation_date
The date on which this file was created (LAS 1.1 and 1.2), or the date on which the data was collected (LAS 1.0).
las_file_source_id
The file source ID. A value of zero is interpreted to mean that an ID has not been assigned.
las_generating_software
Description of the generating software.
las_gps_time_type
Specifies the meaning of GPS Time in the Point Records. Only present in LAS 1.2 or later. A value of 0 indicates that GPS time in the point record fields is GPS Week Time (the same as previous versions of LAS). A value of 1 indicates that GPS Time is standard GPS Time (satellite GPS Time) minus 1 x 109. The offset moves the time back to near zero to improve floating point resolution.
las_project_id
A complete Globally Unique Identifier to serve as a project ID. By assigning a Project
- 162 -
FME Readers and Writers 2013 SP1
ID and using a File Source ID (defined above) every file within a project and every point within a file can be uniquely identified, globally. las_system_identifier
A string identifying the hardware system or operation that generated the data.
las_version
The version of the LAS file.
las_vertical_coordsys_code
The GeoTIFF code identifying the vertical coordinate system.
las_vertical_datum_code
The GeoTIFF code identifying the vertical datum.
las_vertical_units_code
The GeoTIFF code identifying the units of the vertical coordinate system.
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). 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 or 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.
- 163 -
Overview
Reader Directives The directives listed below are processed by the LAS reader. The suffixes shown are prefixed by the current in a mapping file. By default, the for the LAS reader is LAS. DATASET The value for this directive is the LAS file to be read. Required/Optional Required Mapping File Syntax LAS_DATASET /usr/data/test.las Workbench Parameter Source ASPRS LAS File(s) GROUP_BY_DATASET The value for this directive can be either Yes or No. When the value is set to No, the only feature type this reader will use is the reader type name, which in this case is LAS. When the value is set to Yes, the feature type of each dataset is the filename (without the path or the extension) of the dataset. The default value for this directive is No. Required/Optional Required Mapping File Syntax LAS_DATASET /usr/data/test.las Workbench Parameter Source ASPRS LAS File(s) 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 _SEARCH_ENVELOPE
- 164 -
FME Readers and Writers 2013 SP1
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 _SEARCH_ENVELOPE_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 _CLIP_TO_ENVELOPE [yes | no] Workbench Parameter Clip To Envelope
- 165 -
Overview
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 Writer Directives The directives listed below are processed by the LAS writer. The suffixes shown are prefixed by the current in a mapping file. By default, the for the LAS writer is LAS. DATASET The value for this directive is the path of the output directory where the data will be written.. Required/Optional Required Mapping File Syntax LAS_DATASET /usr/data/ Workbench Parameter Destination ASPRS LAS Directory VERSION The version of the LAS file to be written.
- 166 -
FME Readers and Writers 2013 SP1
Required/Optional Optional Values 1.0 | 1.1 | 1.2 (default) Mapping File Syntax LAS_DATASET VERSION 1.1 Workbench Parameter ASPRS LAS Version ARCGIS_LAS_DATASET This directive identifies the name of the Esri ArcGIS LAS Dataset file to create. The .lasd file produced using this directive will reference all the LAS files created by the FME LAS Writer during the translation. An .lasd file is required to work with LAS files in the Esri ArcGIS environment. By default, the .lasd file will be written to the same directory as the .las files to which it refers. To write the .lasd to a different directory, use a fully qualified path. This directive applies to machines using the Windows operating system. Note that this option is currently incompatible with compression. When writing compressed LAS files, a .lasd file will not be generated. Note: To use this directive, you must install and license both ArcGIS 10.1 (or newer) and the 3D Analyst extension. Required/Optional Optional Values Mapping File Syntax LAS_ARCGIS_LAS_DATASET terrain.lasd Workbench Parameter ArcGIS LAS Dataset (.lasd) COMPUTE_STATISTICS_ON_ARCGIS_LAS_DATASET This directive is applicable when an ArcGIS LAS Dataset is written. It determines whether to calculate statistics for the LAS files referenced by the ArcGIS LAS Dataset. Required/Optional Optional
- 167 -
Overview
Values Yes | No (default) Mapping File Syntax LAS_COMPUTE_STATISTICS_ON_ARCGIS_LAS_DATASET Yes Workbench Parameter Compute Statistics on ArcGIS LAS Dataset USE_RELATIVE_PATHS_IN_ARCGIS_LAS_DATASET This directive is applicable when an ArcGIS LAS Dataset is written. It determines whether the references to the LAS files within the ArcGIS LAS Dataset are stored using relative or absolute path names. Use relative paths when the LAS files referenced by the ArcGIS LAS Dataset will be moved from their original location (for example, moved to a server). Required/Optional Optional Values Yes (default) | No Mapping File Syntax LAS_USE_RELATIVE_PATHS_IN_ARCGIS_LAS_DATASET No Workbench Parameter Use Relative Paths in ArcGIS LAS Dataset COMPRESSION Enables or disables compression when writing an LAS file. Compression will significantly decrease file size: compressed files are often only 10-20% of the original size. However, compressed files take longer to read than uncompressed files. This directive applies to machines using the Windows operating system. Required/Optional Optional Values Yes | No (default) Mapping File Syntax LAS_COMPRESSION YES
- 168 -
FME Readers and Writers 2013 SP1
Workbench Parameter Compress Files RESCALE_COORDINATES The LAS format stores coordinates as int32 values with a scale and offset factor. Since FME stores coordinates as real64 values, there is no guarantee that LAS will be able to store the coordinate data as is. To resolve this, the LAS writer will rescale coordinates to span the int32 range (2147483647 to 2147483647) and calculate a new scale and offset factor to preserve the original coordinate values as closely as possible. However, this rescaling may slightly distort some coordinates if they were already safely storable as int32. To disable this rescaling, set this option to No. Required/Optional Optional Values Yes (default) | No Mapping File Syntax RESCALE_COORDINATES YES Workbench Parameter Re-scale Coordinates
ASTM E57 Reader Writer Format Note: This format is not supported by FME Base Edition. The ASTM E57 Reader/Writer allows FME to access data in the E57 format. Overview The E57 file format is a compact, vendor-neutral format for storing point clouds, images, and metadata produced by 3D imaging systems, such as laser scanners. A single E57 file may contain any number of point clouds and rasters. E57 files are structured as a tree. A path is a string that specifies the sequence of element names when traversing the tree. Point cloud data is read from path /data3D. Raster data is read from path /images2D. An E57 file may contain attributes and geometry traits. Elements at the root of the tree are treated as attributes, e.g. /guid. Elements within a geometry node will be treated as geometry traits, e.g. /data3D/0/points/guid.
- 169 -
ASTM E57 Reader Writer
Note: All features will share the same attributes, but traits will differ per feature. Point Cloud Each point cloud may contain an arbitrary set of components, and each component may have an arbitrary data type. A mapping between E57 element and FME component may be specified through the COMPONENT_MAP directive. For example, /data3D/0/points/colorRed could be mapped to FME component fmepc_color_r. The following is the set of standard E57 component names, and the corresponding default FME component name: E57 Element
FME Component
cartesianX
fmepc_x
cartesianY
fmepc_y
cartesianZ
fmepc_z
sphericalRange sphericalAzimuth sphericalElevation rowIndex columnIndex returnCount returnIndex
fmepc_return
timeStamp
fmepc_gps_time
intensity
fmepc_intensity
colorRed
fmepc_color_r
colorGreen
fmepc_color_g
colorBlue
fmepc_color_b
cartesianInvalidState sphericalInvalidState isTimeStampInvalid isIntensityInvalid Point clouds in E57 may have either Cartesian coordinates or spherical coordinates. If a dataset only contains spherical coordinates, the cartesianX, cartesianY, and cartesianZ elements may still be selected as part of the component map, in which case the spherical values will be converted to Cartesian values.
- 170 -
FME Readers and Writers 2013 SP1
Raster Each image node, e.g. /images2D/0/, contains a raster. These images may be stored as one of four representations: visualReferenceRepresentation, pinholeRepresentation, sphericalRepresentation, or cylindricalRepresentation. The representation type controls which additional properties are stored (see the Feature Representation section for more details). Note: One image node may actually contain two rasters: one of the set { pinholeRepresentation, sphericalRepresentation, or cylindricalRepresentation}, and one visualReferenceRepresentation node. In this case, the reader will produce an aggregate geometry that holds both rasters. Similarly, the writer can ingest aggregates of two rasters. Note: Raster data is stored within an E57 file as PNG or JPEG blobs. An image mask may optionally be stored separately from the image data. When reading, FME will combine the image mask and data into a single raster. Additional Notes E57 elements that that are not part of the set (i.e. user attributes, traits, or components not in the table above) should be stored in "Extensions." Each extension in a file shall be defined by a prefix and namespace. Extensions are controlled in FME through the e57_extensions{}.prefix and e57_extensions{}.uri format attributes. On reading, these attributes specify the extensions in the source dataset. On writing, these attributes may be used to define extensions. User attributes, traits, and components should be stored in extensions to ensure compatibility with other E57 readers. So for example, instead of writing a user attribute called "myAttr", one might would write a user attribute called "ext:myAttr", and define the "ext" extension through the e57_extensions{}.prefix and e57_extensions{}.uri format attributes. E57 Quick Facts
Format Type Identifier
E57
Reader/Writer
Both
Licensing Level
Professional
Dependencies
Reader: None Writer: None
Dataset Type
Reader: File Writer: Directory
Feature Type
[_][_ ]
- 171 -
ASTM E57 Reader Writer
Typical File Extensions
.e57
Automated Translation Support
Yes
User-Defined Attributes
Yes
Coordinate System Support
Yes
Generic Color Support
No
Spatial Index
No
Schema Required
No
Transaction Support
No
Encoding Support
UTF8
Geometry Type
e57_type
Band Interpretations
PNG: Red8, Red16, Green8, Green16, Blue8, Blue16, Alpha8, Alpha16, Gray8, Gray16 JPEG: Red8, Green8, Blue8, Gray8
Palette Key Interpretations
PNG: UInt8 JPEG: N/A
Palette Value Interpretations
PNG: RGB24 JPEG: N/A
Nodata Value
PNG: Any JPEG: N/A
Cell Origin (x, y)
0.5, 0.5
Rotation Support
No
GCP Support
No
World File Support
No
TAB File Support
No
Geometry
Supported?
Geometry
Supported?
aggregate
no
point
no
circles
no
polygon
no
- 172 -
FME Readers and Writers 2013 SP1
Geometry
Supported?
Geometry
Supported?
circular arc
no
raster
yes
donut polygon
no
solid
no
elliptical arc
no
surface
no
ellipses
no
text
no
line
no
z values
yes
None
no
point cloud
yes
Point Cloud Component
Data Type
fmepc_angle
arbitrary
fmepc_classification
arbitrary
fmepc_color_r
arbitrary
fmepc_color_g
arbitrary
fmepc_color_b
arbitrary
fmepc_flight_line_edge
arbitrary
fmepc_flight_line
arbitrary
fmepc_gps_time
arbitrary
fmepc_gps_week
arbitrary
fmepc_intensity
arbitrary
fmepc_number_of_returns
arbitrary
fmepc_point_source_id
arbitrary
fmepc_posix_time
arbitrary
fmepc_return
arbitrary
fmepc_scan_direction
arbitrary
fmepc_user_data
arbitrary
Notes
Reader Overview FME considers a single E57 file to be a dataset. Each dataset contains one or more point cloud and raster features. ASTM E57 Reader Parameters Dataset Parameters Group By Filename/Dataset
- 173 -
ASTM E57 Reader Writer
If you select this option, feature types are grouped by dataset, and are named using the filename of each dataset (without the path or the extension). If you do not select this option, the only feature type this reader will use is the reader type name. Group By Subdataset If you select this option, feature types are grouped by subdataset, and are named using the subdataset name. If you do not select this option, the only feature type this reader will use is the reader type name. If both Group by Filename and Group by Subdataset are specified, feature type names are in the format filename_subdatasetname. Point Cloud Component Mapping Click here Use this matrix to map E57 element names to FME point cloud components. Each FME component that is mapped will appear in the point cloud geometry. Schema Attributes Additional Attributes to Expose This parameter exposes Format Attributes in Workbench when you create a workspace: l
l
In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime. In a non-dynamic scenario where you have multiple feature types, it is convenient to expose additional attributes from one parameter. For example, if you have ten feature types and want to expose the same attribute in each one, it is easier to define it once than it is to set each feature type individually in the workspace.
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.
- 174 -
FME Readers and Writers 2013 SP1
Writer Overview FME considers a dataset to be a directory name. The feature type of each dataset is the filename. ASTM E57 Writer Parameters Point Cloud Component Mapping Use this matrix to map FME point cloud components to E57 element names. Raster Default Raster Format Specifies the underlying format to which rasters are written. 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. Attribute Name
Contents
e57_type
This will always be e57_point_cloud.
e57_creation_datetime
Date and time that the file was created.
e57_creation_datetime_ isatomicclockreferenced
This attribute will be present with a value of 1 if, and only if, the time stored in e57_creation_ datetime is obtained from an atomic clock time source. Shall be either 0 or 1.
e57_extensions{}.prefix
A list of extension prefixes.
e57_extensions{}.uri
A list of the URI for each extension.
e57_format_name
Name of the format. Shall contain the string "ASTM E57 3D Imaging Data File". This is a reader attribute.
e57_guid
A globally unique identification (GUID) String for the current version of the file.
e57_library_version
The version identifier for the E57 file format library that wrote the file.
e57_geometry_index
The index of this point cloud or raster in the file.
e57_version_major
The major version number of the file format. This is a reader attribute.
e57_version_minor
The minor version number of the file format.
- 175 -
ASTM E57 Reader Writer
Attribute Name
Contents This is a reader attribute.
This format adds the following format-specific traits for point cloud geometries. Trait Name
Contents
e57_acquisition_start
The start date and time that the data was acquired.
e57_acquisition_start_ isatomicclockreferenced
This attribute will be present with a value of 1 if, and only if, the time stored in e57_acquisition_start is obtained from an atomic clock time source. Shall be either 0 or 1.
e57_acquisition_end
The end date and time that the data was acquired.
e57_acquisition_end_ isatomicclockreferenced
This attribute will be present with a value of 1 if, and only if, the time stored in e57_acquisition_end is obtained from an atomic clock time source. Shall be either 0 or 1.
e57_atmospheric_pressure
The atmospheric pressure, measured at the sensor, at the time of data collection (in Pascals).
e57_description
A description of the point cloud.
e57_guid
A globally unique identifier for the current version of the point cloud.
e57_original_guids{}
A list of of globally unique identifiers identifying the data set (or sets) from which the points in this point cloud originated.
e57_relative_humidity
The percentage relative humidity, measured at the sensor, at the time of data collection.
e57_sensor_hardware_version
The version identifier for the sensor hardware at the time of data collection.
e57_sensor_model
The model name or number for the sensor used to collect the points in this point cloud.
e57_sensor_serial_number
The serial number for the sensor used to collect the points in this point cloud.
e57_sensor_software_version
The version identifier for the software used for the data collection.
e57_sensor_vendor
The name of the manufacturer for the sensor used to collect the points in this point cloud.
e57_temperature
The ambient temperature, measured at the sensor, at the time of data collection (in degrees Celsius).
This format adds the following format-specific traits for raster geometries.
- 176 -
FME Readers and Writers 2013 SP1
Trait Name
Contents
e57_acquisition_datetime
The date and time that the image was acquired.
e57_acquisition_datetime_ isatomicclockreferenced
This attribute will be present with a value of 1 if, and only if, the time stored in e57_acquisition_datetime is obtained from an atomic clock time source. Shall be either 0 or 1.
e57_associated_pointcloud_ The globally unique identifier for the point cloud object guid that was being acquired when the picture was taken. e57_description
A user-defined description for the image.
e57_image_representation
The representation of the image. Values are visualReferenceRepresentation, pinholeRepresentation, sphericalRepresentation, and cylindricalRepresentation.
e57_raster_format
The underlying format in which the raster is stored. Either PNGRASTER or JPEG.
e57_rotation_w
The scalar part of the rotation quaternion.
e57_rotation_x
The i coefficient of the rotation quaternion.
e57_rotation_y
The j coefficient of the rotation quaternion.
e57_rotation_z
The k coefficient of the rotation quaternion.
e57_sensor_model
The model name or number for the sensor.
e57_sensor_serial_number
The serial number for the sensor.
e57_sensor_vendor
The name of the manufacturer for the sensor used to collect the image.
e57_separate_image_mask
Whether the image mask (alpha band) is stored in a separate blob from the data.
This format adds the following format-specific traits for raster geometries with an image representation of pinholeRepresentation: Trait Name
Contents
e57_focal_length
The camera’s focal length (in meters).
e57_pixel_height
The height of the pixels in the camera (in meters).
e57_pixel_width
The width of the pixels in the camera (in meters).
e57_principal_point_x
The X coordinate in the image of the principal point, (in pixels). The principal point is the intersection of the z axis of the camera.
e57_principal_point_y
The Y coordinate in the image of the principal point (in pixels).
- 177 -
ASTM E57 Reader Writer
This format adds the following format-specific traits for raster geometries with an image representation of sphericalRepresentation: Trait Name
Contents
e57_pixel_height
The width of a pixel in the image (in radians).
e57_pixel_width
The height of a pixel in the image (in radians).
This format adds the following format-specific traits for raster geometries with an image representation of cylindricalRepresentation: Trait Name
Contents
e57_pixel_height
The height of a pixel in the image (in meters).
e57_pixel_width
The width of a pixel in the image (in radians).
e57_principal_point_y
The Y coordinate in the image of the principal point (in pixels). This is the intersection of the z = 0 plane with the image.
e57_radius
The closest distance from the cylindrical image surface to the center of projection (that is, the radius of the cylinder) (in meters).
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). 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.
- 178 -
FME Readers and Writers 2013 SP1
Directives and Reader/Writer Keywords Directives are processed by the reader or writer. Directives are prefixed by the current or 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. WriterDirectives The suffixes shown are prefixed by the current in a mapping file. By default, the for the ASTM E57 writer is E57. DATASET The path of the output directory where the data will be written. Required/Optional Required Mapping File Syntax E57_DATASET C:\data\ Workbench Parameter Destination ASTM E57 Directory COMPONENT_MAP This directive maps each E57 element names to FME point cloud components. Values + Required/Optional Required Workbench Parameter Component Mapping DEFAULT_RASTER_FORMAT This directive sets the underlying format to which rasters will be written. This may be overridden at the geometry level by setting the e57_raster_format trait. Values PNGRASTER , JPEG Required/Optional Optional
- 179 -
ASTM E57 Reader Writer
Workbench Parameter Default Raster Format WRITE_INTEGER_COORDINATES This directive specifies whether coordinates should be written as integers instead of floating point values. Writing integer coordinates will produce smaller files, but values may be less accurate. Note that this affects all E57 elements that are mapped from fmepc_x, fmepc_y, or fmepc_z. It will not affect any elements mapped from other FME components. For example, if this option was set to Yes and fmepc_intensity was mapped to cartesianX, cartesianX would still be written as floating point. Values YES | NO Required/Optional Optional Workbench Parameter Write Integer Coordinates
- 180 -
FME Readers and Writers 2013 SP1
Australian Asset Design & As Constructed (ADAC) XML Reader/Writer Format Note: This format is not supported by FME Base Edition. The ADAC XML format is developed by the Asset Design & As Constructed (ADAC) consortium. This reader/writer supports the ADAC XML version 3.0.1 and 4.0.0. Further information on ADAC can be found at http://www.adac.com.au. Overview An ADAC XML document consists of a root ADAC element containing various data structures from civil engineering assets. ADAC v3 defines the following asset themes: l
Sewerage
l
Roads
l
Water
l
Stormwater
l
Cadastre
For backwards compatibility, the interpretation/mapping of the ADAC v3 assets remains unchanged. ADAC v4 defines the following asset themes: l
Sewerage
l
Transport
l
WaterSupply
l
StormWater
l
OpenSpace
l
Cadastre
l
Surface
l
Enhancements
l
Supplementary
ADAC Quick Facts About Quick Facts Tables Format Type Identifier
ADAC
- 181 -
Australian Asset Design & As Constructed (ADAC) XML Reader/Writer
Reader/Writer
Both
Licensing Level
Professional
Dependencies
None
Dataset Type
File
Feature Type
The ADAC asset structures
Typical File Extensions
.xml
Automated Translation Support
Yes
User-Defined Attributes
No
Coordinate System Support
Yes
Generic Color Support
No
Spatial Index
Never
Schema Required
No
Transaction Support
No
Geometry Type
xml_type Geometry Support
Geometry
Supported?
Geometry
Supported?
aggregate
yes
point
yes
circles
yes
polygon
yes
circular arc
yes
raster
no
donut polygon
yes
solid
no
elliptical arc
yes
surface
no
ellipses
yes
text
yes
line
yes
z values
yes
none
yes
Reader Overview The ADAC reader creates FME features from the various ADAC asset structures. The reader now supports ADAC v4. The asset structures in v4 are mapped differently from the ADAC v3. See the Feature Representation section for details. Coordinate Systems FME ADAC features are tagged with a coordinate system when the reader finds a mapping between the name specified in the ADAC element and an FME coordinate system name. The ADAC
- 182 -
FME Readers and Writers 2013 SP1
is a child of the element which is a child of the ADAC element. Australian Asset Design and As-Constructed (ADAC) Reader Parameters Schema Attributes Additional Attributes to Expose This parameter exposes Format Attributes in Workbench when you create a workspace: l
l
In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime. In a non-dynamic scenario where you have multiple feature types, it is convenient to expose additional attributes from one parameter. For example, if you have ten feature types and want to expose the same attribute in each one, it is easier to define it once than it is to set each feature type individually in the workspace.
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. Writer Overview The ADAC writer generates ADAC v4 XML files. The writer has fixed feature types, which are the same as the schema used by the ADAC v4 reader. See the Feature Representation section for details on the writer feature types. Feature Representation ADAC v3 The ADAC XML reader recognizes the following ADAC v 3.0.1 asset structures: l
l
Sewerage asset: Manhole, PipeNonPressure, PipePressure, Valve, Fitting, House_Connection. Roads asset: Pavement, Parking, RoadEdge, RoadIsland, RoadPathway, PramRamp, RoadSubsoilDrain.
- 183 -
Australian Asset Design & As Constructed (ADAC) XML Reader/Writer
l
Water asset: Pipe, Valve, Hydrant, Meter, Fittings, Maintenance_Hole.
l
Stormwater asset: ManholePit, EndStructure, Pipe, SurfaceDrainage.
l
Cadastre asset: LandParcel.
l
OtherData asset: Object.
The feature type names for ADAC FME features closely resemble the naming for the ADAC v3 XML document. Feature type names are whitespace separated combinations of theme and asset structure names. For example, “Sewerage Valve”, “Water Valve”, “Stormwater Pipe”, and “Cadastre LandParcel”. Attribute names also closely resemble their XML counterpart. The non-geometrical, non-repeating, and non-nested child elements, i.e., the simple type elements whose maxOccurs is 1, of an asset structure are mapped with their names unchanged. For example, the simple type child element of the element is mapped as the “OutletType” attribute of the “Stormwater ManholePit” feature. Non-geometrical nested child elements, i.e., the complex type elements, of an asset are mapped as whitespace separated combinations of child and descendant elements. For example, the complex type child element of the element creates the following FME attributes in a “Stormwater ManholePit” feature: “ChamberSize Blankend”, “ChamberSize PS”, “ChamberSize Rectangular” and “ChamberSize Circular”. Most non-geometrical child elements in an asset structure are non-repeating, these are mapped as simple, atomic FME attribute values. Repeating non-geometrical child elements, i.e., those with maxOccurs greater than 1 or unbounded, such as the element, are mapped as CSV values. The geometry for a feature is mapped from the various ADAC geometry elements. Some ADAC asset structures, such as the “RoadSubsoilDrain”, may have more than one geometry, these are mapped as aggregates. Two special FME geometry traits are assigned to the geometries to help identify their original ADAC role. The “adac_ geometry” trait identifies the original ADAC XML geometry element, while the “adac_ geometry_parent” trait identifies the geometry’s parent. Data not explicitly defined in the ADAC schema is supported in the ADAC XML via the “OtherData” asset model. This asset model element can contain one or more child elements, and each can contain one or more