You are here: Other topics > Plotting > Format of Drawing Area definition file
GEOVIA Surpac

Format of Drawing Area definition file

The plotting drawing areas are defined in the SSI_PLOTTING:drwareas.ssi file. A sample of the file is shown below.

# "ssi.plotting.drawing_areas" :Version 1
(border "DRAW"
  (purpose "Converted from user.chr")
  (viewport 
    (left 0.40)
    (right 0.40)
    (bottom 0.40)
    (top 0.40)
  )
  (rplot
    (line_type 1)
    (pen 1)
    (priority 124)
    (rel_position ll 0.00 0.00)
    (rel_position ul 0.00 0.00)
  )
  (rplot
    (line_type 1)
    (pen 1)
    (priority 124)
    (rel_position ul 0.00 0.00)
    (rel_position ur 0.00 0.00)
  )
  (rplot
    (line_type 1)
    (pen 1)
    (priority 124)
    (rel_position ur 0.00 0.00)
    (rel_position lr 0.00 0.00)
  )
  (rplot
    (line_type 1)
    (pen 1)
    (priority 124)
    (rel_position lr 0.00 0.00)
    (rel_position ll 0.00 0.00)
  )
)

The first line of the file is a unique file header to distinguish this file to prevent errors when working with the file. This line also identifies the version for the format of the file so that future compatibility issues can be resolved easily.

The file uses a number of keywords each with appropriate arguments to define the structure of a drawing area definition. The most notable characteristic of drawing area definitions is that they are defined in terms that are relative to the plotting sheet on which the map is to be drawn.

Therefore, a simple drawing area definition that defines the drawing area as one centimetre inside each sheet boundary can be easily used for all different sheet sizes.

All keywords and their arguments are contained in enclosing perentheses as shown in the example above. A drawing area definition begins with the (draw_area keyword and contains the following keywords:

keyword description
draw_area Describes the name of the drawing area enclosed in " characters
purpose Permits a verbose description, enclosed in " characters, for the drawing area to be defined
viewport

Describes the dimensions in from each edge of the plotting sheet to the extent of the drawing area region. Since the viewport is relative to the sheet extents a drawing area definition can generally be used for any size sheet unless it is specifically suited to a special sub-area of a particular sheet size.

There must only be one viewport definition in a drawing area. If multiple viewport definitions are present the last one found will supersede all others.

  • left. Defines the distance, in centimetre units, in from the left edge of the sheet to the left side of the drawing area
  • right. Defines the distance, in centimetre units, in from the right edge of the sheet to the right side of the drawing area
  • bottom. Defines the distance, in centimetre units, in from the bottom edge of the sheet to the bottom of the drawing area
  • top. Defines the distance, in centimetre units, in from the top edge of the sheet to the top of the drawing area
rplot

Describes a relative plot command to define a position relative to a corner of the previously defined viewport. The relative plot commands ensure that the lines are drawn relative to the drawing area extents and so the lines will allways be placed in suitable positions relative to the sheet boundary.

There may be any number of rplot commands in a drawing area definition.

  • line_type. Defines the type of line that will be drawn. The type of line is described using an integer, at this time the only valid value is 1, which represents a solid line, that is, no dashes or dots.
  • pen. Defines the pen number that will be used to draw the line. The pen number is a positive integer. Valid values are 1 and 999 inclusive.
  • priority. Defines the priority of the line so that symbol/line clashing is performed correctly when processing a map. The priority is an integer that must be between 0 and 125 inclusive.
  • rel_position. Describes a point, relative to a corner, in the line that is to be drawn. The line is drawn by connecting all the points in the order in which they are present in the file. There may be any number of points in a relative line but the first four relative lines only have two points each and represent the border extents.
  • The relative point has three items to describe the location of the point. These items, in order, are:

    • A code to describe the corner of the border to which the point is related. Corner codes used are:
      • ll. The lower left corner.
      • lr. The lower right corner.
      • ur The upper right corner.
      • ul. The upper left corner.
    • The X offset from the corner to the point being defined, in centimetre units
    • The Y offset from the corner to the point being defined, in centimetre units
    • The offset values use the cartesian coordinate system convention of right and up being positive and left and down being negative regardless of which corner the point is related to