REFP (Set user reference point)

The REFP command to define or re-define the user's reference point (refp 11). The units used with the user's reference point will be the same as the reference points from which it is defined.

Command Syntax:

REFP refp,xoff,yoff,scale

Command Parameters:

refp

Reference point from which to refer the following offsets. The default is reference point 0.

 

If reference point 0 is used, SRS units are required for subsequent references to refp 11, otherwise map units are used.

xoff,yoff

Location relative to refp above. The default is 0,0 in which case the user's reference point is simply placed at refp.

scale

Objects drawn using the user's reference point will be scaled by this factor (i.e. scale = 2 will double the size of objects). (Default is scale = 1.0.)

If scale is positive both text and relative positions are scaled. If negative only relative positions are scaled, text remains unscaled.

This capability is designed primarily for use with included files that draw objects relative to reference point 11. Using scale, the object may be increased or decreased in size as required without changing the included file.

Note: Included files should not re-set the scale, otherwise unexpected results will be produced.

Example

The following control file (named BOX.CON) draws a unit square box centered on the user's reference point:

CMNT "Draw a unit box..."

LINA 11,-0.5,0.5, / top left

0.5,0.5 / top right 

0.5,-0.5 / bottom right 

-0.5,-0.5 / bottom left 

-0.5,0.5 / top left 

The following control file will draw a 1 cm box in the bottom left corner of the map, a 5 cm box in the bottom right corner, and a 20 cm box in the center of a map:

PLTR 100,0,0 / work in plot cm

MAPR 0,0,0,50,50 / map area 50 x 50 cm

REFP 1,0.5,0.5 / bottom left, no scaling

INCL BOX / draw box (1mm dimensions)

REFP 3,-2.5,2.5,5 / bottom right, 5 cm box

INCL BOX / draw box

REFP 5,0,0,2 / center, 2 cm box

INCL BOX / draw box

  • This command is part of the MAPPLOT GX.