Text
Generate files containing only text (annotation) features, consist of a series of lines that follow this syntax:
<idNumber>,<x>,<y>,<angle>,<size>,<text>
As with point files, the <idNumber> is any numeric value and need not be unique within a file. A Text generate file is terminated with the word END. A text Generate file example, containing two features, is shown below:
101,32,52,0,20,Arnet Maves 102,52,32,90,30,Barnie Maves END
The attributes used by the generate reader and writer are described in the following table.
Attribute Name |
Value |
arcgen_rotation |
Specifies the rotation of the text in degrees measured counterclockwise from horizontal. Range: -360.0 . . . 360.0 Reprojectable: Yes |
arcgen_text_size |
The size of the annotation in ground units. Range: Float > 0 Reprojectable: Yes |
arcgen_text_string |
The text string to be placed at the annotation location. Range: Any text string |
The example below shows an FME mapping file used to translate some points and linear features from the Generate format into Shape files. The mapping file defines the dataset location and gives the Generate definitions for the two files to be read. At run time, the Generate reader goes out to the folder, reads the files, and produces an FME feature for each Generate feature it finds.
Sample Generate to Shape Mapping File:
# --------------------------------------------- # Define the location of the Generate files ARCGEN_DATASET /usr/data/generate/92i080 # --------------------------------------------- # Define the type of each of the Generate files ARCGEN-_DEF nodes ARCGEN_GEOMETRY arcgen_point # --------------------------------------------- # This second file uses a space as the delimiter ARCGEN-_DEF boundaries ARCGEN_GEOMETRY arcgen_line \ ARCGEN_DELIMITER “ “ # --------------------------------------------- # Now define the location of the Shape files # which will be created SHAPE_DATASET /usr/data/shape/92i080 # --------------------------------------------- # Define each of the Shape files. SHAPE-_DEF markers SHAPE_GEOMETRY shape_point \ MARKER_ID number(6,0) SHAPE_DEF edges SHAPE_GEOMETRY shape_polyline \ EDGE_ID number(6,0) # --------------------------------------------- # Now define transfer specifications ARCGEN nodes arcgen_id %nodeNum SHAPE markers MARK_ID %nodeNum ARCGEN boundaries arcgen_id %boundNum SHAPE edges EDGE_ID %boundNum
Tip: Tip: Notice the Shape file definitions create a field to store the identifier associated with each generate feature.
If the /usr/data/generate/92i080 folder contained the following files:
nodes.gen |
boundaries.gen |
601,7,7 602,53,21 603,19,20 END |
101 32 52 1 33 56 2 36 59 6 31 70 3 END 102 52 32 3 53 56 5 56 29 1 61 73 14 END END |
...then the FME features shown below would be created by the Generate reader.
Feature Type: nodes |
|
Attribute Name |
Value |
ARCGEN_GEOMETRY |
arcgen_point |
arcgen_id |
601 |
Coordinates: 37,7 |
Feature Type: nodes |
|
Attribute Name |
Value |
ARCGEN_GEOMETRY |
arcgen_point |
arcgen_id |
602 |
Coordinates: 53,21 |
Feature Type: nodes |
|
Attribute Name |
Value |
ARCGEN_GEOMETRY |
arcgen_point |
arcgen_id |
603 |
Coordinates: 19,20 |
Feature Type: boundaries |
|
Attribute Name |
Value |
ARCGEN_GEOMETRY |
arcgen_line |
arcgen_id |
101 |
Coordinates: (32,52,1),(33,56,2),(36,59,6),(31,70,3) |
Feature Type: boundaries |
|
Attribute Name |
Value |
ARCGEN_GEOMETRY |
arcgen_line |
arcgen_id |
102 |
Coordinates: (52,32,3),(53,56,5),(56,29,1),(61,73,14) |
Feature Type: boundaries |
|
Attribute Name |
Value |
ARCGEN_GEOMETRY |
arcgen_line |
arcgen_id |
101 |
Coordinates: (32,52,1),(33,56,2),(36,59,6),(31,70,3) |
Feature Type: boundaries |
|
Attribute Name |
Value |
ARCGEN_GEOMETRY |
arcgen_line |
arcgen_id |
102 |
Coordinates: (52,32,3),(53,56,5),(56,29,1),(61,73,14) |
These features would then be transformed by the FME and output to their destination Shape files by the Shape writer.