Support Services Corporate Home EarthVision Events
 
FAQs


User-Defined Symbols

June 1999

EarthVision provides 72 symbols for posting on 2D maps (see Appendix B of the EarthVision User's Guide for a chart of these symbols). It is sometimes desirable, however, to extend this symbol set and to facilitate this, EarthVision contains tools to build user-defined symbols.

The definitions of user-defined symbols can be simple or complex but they are all written into a text file named symbols.def. This file is then placed in the following directory:

$DGIHOME/ev5/etc/
Once this file is created, the newly defined symbols are available to be plotted on a 2D map both in the Graphic Editor and the Base and Contour Map program.

User-defined symbols are composed of small graphic elements, called components. Appendix A of the EarthVision User's Guide (starting page A-87) outlines these components and how they are put together to form user-defined symbols. This feature of the month offers some suggestions of how to create a useful set of symbols using these components.

There are two ways of obtaining the components used to create user-defined symbols:

a. Use the pre-defined Special and Vector components shown in Appendix A in combination to create new symbols.

b. Create entirely new elements using coordinates in the range of -0.5 to +0.5.

Three examples follow:

Using Pre-Defined Components
Using Pre-Defined and User-Created Components
A Complete Set of New Symbols

 

NOTE: In all scripts and command lines that follow, a backslash ( \ ) at the end of a line indicates that the current line is continued on the line that follows. When creating the script or typing the command line, these lines should be entered as one continuous line without the backslash.

Using Pre-Defined Components

With the included pre-defined Special and Vector components outlined in Appendix A (pages A-88 to A-91), it is possible to create a large number of custom symbols. Here is one example:


 

 
User-defined symbol using two special components.

To create this symbol, it is necessary to combine the following two special components:

      Index     Description
        -1      small circle
        -7      2 filled quadrants of X-inscribed circle

This symbol also requires an X symbol found among the vector components:

      Index     Description
        2       X symbol

The general format of a symbol definition is:

        symbol_number number_of_components \
         number_of_XY_pairs
        component1 component2 ... componentN
        X1 Y1
        X2 Y2
        ...
        XN YN

To create the definition of this symbol then, create a text file named symbols.def and insert the following lines:

                888 3 0
                -1 -7 2

In this example, we have selected a new symbol number of "888" (numbers of 1 to 1000 are valid, but 1-72 are usually defined with the default symbols). The number of components is "3" (a small circle, the two filled quadrants, and the X symbol). There are no X,Y pairs (see next section for an example of this) so that number is "0." The second line contains a list of the special and vector component indices. Since there are no X,Y pairs, there are no subsequent lines.

The symbols.def file is then placed in:

$DGIHOME/ev5/etc/
When entering symbols into an annotation file, it is now possible to specify a symbol number of "888". Entering this number will cause the user-defined symbol to be displayed or plotted.

NOTE: The Symbols table (available from any Symbols push button) is not modified to include the new user-defined symbols, even though the user-defined symbols are available.
 

Using Pre-Defined and User-Created Components

Some symbols cannot be created using just the pre-defined special and vector components. In most cases, these symbols will be composed of a combination of the pre-defined components and other components specified by X,Y coordinate pairs in a range of -0.5 and +0.5 (approx.).  Here is an example of three such symbols:

Symbols created using both pre-defined components and components specified using X,Y pairs.

 

Symbol 555, which is not included in the default set of symbols, is a symbol for an injector well. To create this symbol, we can use the special component circle (-1), however, the three small lines are not available as vector components. Each of these three lines must be generated by specifying two X,Y pairs.  Using a bit of trigonometry, we come up with the following lines:

        X1,Y1 = -0.45274991753  -.376794885932
        X2,Y2 = -.184887796282  -.168305541245

        X3,Y3 = -0.00056735847  .2506011351396
        X4,Y4 = 5.31846552e-05  .5900382247067

        X5,Y5 = .4509243552076  -.377335338516
        X6,Y6 = .1838263229518  -.167868004517

In order to draw three separate lines, it is necessary to insert the END_OF_LINE marker, -999.0 0,  between the X,Y pairs in the file.

        -0.45274991753  -.376794885932
        -.184887796282  -.168305541245
        -999.0 0
        -0.00056735847  .2506011351396
        5.31846552e-05  .5900382247067
        -999.0 0
        .4509243552076  -.377335338516
        .1838263229518  -.167868004517

NOTE: The END_OF_LINE record is missing after the final line because it is prohibited to end a symbol definition with the END_OF_LINE record.

Then one must count the number of X,Y pairs in the user-created components. It is important to note that in the count, the END_OF_LINE records are also counted. In this example, the number of pairs is "8."

Now we are ready to put together the entire symbol definition:

        555 1 8
        -1
        -0.45274991753  -.376794885932
        -.184887796282  -.168305541245
        -999.0 0
        -0.00056735847  .2506011351396
        5.31846552e-05  .5900382247067
        -999.0 0
        .4509243552076  -.377335338516
        .1838263229518  -.167868004517

When this definition is added to the $DGIHOME/ev5/etc/symbols.def file, entering a value of  "555" will produce this new symbol.

Here is an example of the symbols.def file that was used to create symbols 555, 777, and 670. Each is a combination of pre-defined components and user-created components. The file is also commented with the # sign:

        #
        ############## Injector Symbol #555
        555 1 8
        -1
        #
        # three lines
        # 8 coordinates
        #
        -0.45274991753  -.376794885932
        -.184887796282  -.168305541245
        -999.0 0
        -0.00056735847  .2506011351396
        5.31846552e-05  .5900382247067
        -999.0 0
        .4509243552076  -.377335338516
        .1838263229518  -.167868004517
        #
        #
        ############## Injector Symbol #777
        777 1 4
        -1
        #
        # triangle
        # 4 coordinates
        #
        -0.4330127      -0.25
        0.4330127       -0.25
        0               0.5
        -0.4330127      -0.25
        #
        #
        ############## Symbol #670
        670 1 26
        -1
        # W
        # 6 coordinates
        #
        -0.12918956044  0.135989010989
        -6.3461538e-02  -.138255494505
        0       .1382554945055
        6.34615385e-02  -.140521978022
        0.131456043956  .1382554945055
        -999.0 0
        #
        # Inward pointing arrows and lines
        # 20 coordinates
        #
        -0.45274991753  -.376794885932
        -.184887796282  -.168305541245
        -999.0 0
        -.333872483089  -.221254224864
        -.184887796282  -.168305541245
        -.272306335557  -.300055300224
        -999.0 0
        -0.00056735847  .2506011351396
        5.31846552e-05  .5900382247067
        -999.0 0
        .0494509844638  .3997223565709
        -0.00054901554  .2497223565709
        -0.050549016    .3997223565709
        -999.0 0
        .2712448622265  -.299617763496
        .1838263229518  -.167868004517
        .3328110097591  -.220816688136
        -999.0 0
        .4509243552076  -.377335338516
        .1838263229518  -.167868004517
        #
 
 

A Complete Set of New Symbols

Here is a plot of 30 symbols that have been created by using the techniques described above.
 
 

Set of 30 new user-defined symbols created with a combination of pre-defined and user-defined components.

 

The symbols.def file used to generate these symbols may be downloaded here:

symbols.def
This file should be given read permission for user, group, and world (chmod +r symbols.def). Then it can be placed in:
$DGIHOME/ev5/etc
These symbols can be displayed then in the Graphic Editor or on a 2D map by using the three-digit number printed just below each symbol in the diagram above.
 

 

 

 
[Home] [Corporate] [Events & News]
[EarthVision] [Support] [Services] [Contact Us]


© 1999-2007 Dynamic Graphics, Inc. All Rights Reserved. Legal Notices.
See Legal Notices for appropriate copyright trademark legend.
Feedback: webmaster@dgi.com

Last updated: March 22, 2007