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

Format of Border definition file

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

# "ssi.plotting.borders" :Version 1
(border "BORD"
 (purpose "Converted from user.chr")
 (viewport 
 (left 0.30)
 (right 0.30)
 (bottom 0.30)
 (top 0.30)
 )
 (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 border definition. The most notable characteristic of border 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 border definition that defines the border that is 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 border definition begins with the (border keyword and contains the following keywords:

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

Describes the dimensions in from each edge of the plotting sheet to the extent of the border region. Since the viewport is relative to the sheet extents a border definition can generally be used for any size sheet.

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

  • left. Defines the distance, in centimetre units, in from the left edge of the sheet to the left side of the border
  • right. Defines the distance, in centimetre units, in from the right edge of the sheet to the right side of the border
  • bottom. Defines the distance, in centimetre units, in from the bottom edge of the sheet to the bottom of the border
  • top. Defines the distance, in centimetre units, in from the top edge of the sheet to the top of the border
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 border 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 border 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
    • ul. The upper left corner
    • ur. The upper right corner
    • lr. The lower right 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.