USGS

Isis 2 Documentation


lev2grid Documentation

lev2grid - Create file for plotting graticules(PostScript).
Programmer : K T Thompson
"lev2grid" generates a PostScript file for drawing latitude/longitude
graticules, latitude and longitude ticks and/or an extra grid.  This
file is generated in PostScript format.  "lev2grid" will draw the
latitude and longitude (LATRANGE,LONRANGE) boundaries and internal lines
as defined by each "lev2grid" parameter. The x,y origin (0,0), internal
to this plot file, is established at exactly the minimum x and minimum y
position of the grid, therefore the grid is drawn within the 1st
quadrant of the Cartesian coordinate system. When a PostScript format
file is created, the file is centered on the page according to the main
grid dimensions and the input PAPER(width & height) or the input SCALE.
This plot file can be displayed on the screen using ghostview or printed
to a PostScript device.  Use your usual print command lines when sending
your file to any PostScript translating plotter or printer, else you
will have to get into the plotter/printer machine documentation.  For
'ghostview':

bug{927}>  ghostview grid.ps

  or

bug{927}>  ghostview 




 _
           -----------
 H         |         |
 E         |         |
 I         | y       | PRINTER
 G         | |       |
 H         | |       |
 T         | ---> x  |
 _         -----------

           <--WIDTH-->

Thousands of maps have been produced by many different agencies for var-
ious purposes. A common problem may occur when matching a new map to an
older map or matching to maps from other agencies. In this situation
there are many variables which affect the size and/or geometric shape of
a grid. If the mismatch is strictly a size difference, then the problem
is possibly the scale, planet radius or the old map is on an unstable
material. If the mismatch seems to be a geometric difference, then the
problem may be eccentricity, standard parallels or a central latitude or
longitude.

ParmDescriptionDefault
TO
Data file to create.  Will
contain drawing instructions
for this grid.
NONE
LINESZ
Width of the grid line
Width of the ticks
[SMALL,MEDIUM,LARGE]
NONE
PAPER
Paper width & height
in inches.
   (or)
NONE
SCALE
fractional map scale, (i.e.
for 1:1,000,000 scale=1.0)
NONE
TARGDEF
Target or target
definition file
NONE
MAPPARS
Map projection parameters
(e.g., sinu,0)
NONE
LONSYS
Longitude system
(default 0 to 360)
360
LATSYS
Latitude system
(default OGRAPHIC)
"OGRAPHIC"
LATRANGE
Grid/tick latitude range
NONE
LONRANGE
Grid/tick longitude range
NONE
BASE
Grid/tick latitude base line
Grid/tick longitude base line
NONE
GINC
Grid increments: latitude
longitude.
null, --, means no grid

NONE
VERTTIC
latinc
loninc
bigspace 0 = no big ticks
null, --, means no ticks
NONE
HORIZTIC
latinc
loninc
bigspace 0 = no big ticks
null, --, means no ticks
NONE
TICKLEN
Vary ticklength with latitude
NONE
TBWNOI
Tick Bounds When Not On Inc
NONE
XLAT
Extra Grid Latitude Range
NONE
XLON
Extra Grid Longitude Range
NONE
XGINC
Extra Grid Increment: Latitude
Longitude
null, --, means no grid
NONE
XBOUND
Plot XLAT and XLON Boundaries
NONE
XBASE
Base for Extra Grid: Latitude
Longitude
NONE

ADDITIONAL NOTES:

ParmDescription
TO
File name to be created by "lev2grid". This file contains
the drawing instructions in PostScript format.  The Post-
Script version must be downloaded to a PostScript device.
LINESZ
First element is width of the line for gridding.  Second
element is width of the ticks.
SMALL = 0  thinnest line possible
MEDIUM= 1
LARGE = 2
PAPER
Paper width and height in inches.  If scale is input, the
paper width necessary to print the plot will be reported.
Else if paper height and width are input, the resulting
scale will be reported.

Notice what might appear to be contradictory outputs:
For a sinusoidal projection & for LATRANGE = -90 to 90 and
LONRANGE = -180 to 180
  WIDTH  = 4
  HEIGHT = 6
program calculates:
  WIDTH scale (divided by million)  = 210
  HEIGHT scale (divided by million) = 70
chooses larger scale to make projection smaller to fit in
both directions:
  SCALE (divided by million) = 210
user inputs SCALE = 210 back into program and gets:
  Paper size calculated from input scale:
  (in Inches): 4.000293 x 2.000147
This is because WIDTH  = 4 determined scale; then user
inputs scale, which with LONRANGE = -180 to 180 gives 4
inches for WIDTH.  LATRANGE = -90 to 90 will obviously be
about half as big in the sinusoidal giving 2 inches for
HEIGHT.

Also for a sinusoidal projection & for LATRANGE = -90 to 90
and LONRANGE = -180 to 180
  WIDTH  = 4
  HEIGHT = 1
program calculates:
  WIDTH scale (divided by million)  = 210
  HEIGHT scale (divided by million) = 420
chooses larger scale to make projection smaller to fit in
both directions:
  SCALE (divided by million) = 420
user inputs SCALE = 420 back into program and gets:
  Paper size calculated from input scale:
  (in Inches): 2.000147 x 1.000073
This is because HEIGHT = 1 determined scale; then user
inputs scale, which with LATRANGE = -90 to 90 gives 1 inch
for HEIGHT.  LONRANGE = -180 to 180 will be about twice as
big in the sinusoidal and using the same scale results in 2
inches for WIDTH.

SCALE
The map scale is defined by the user or more commonly
defined by a specific map series. Most map series have
specific scales which vary throughout the series depending
on the projection.

For all projections except CYLI, SIMP and SINU, the map
scale is expressed as the ratio or proportion between
comparable measurements on the map to the surface
represented by the map. This ratio is often called the
Representative Fraction (RF). The RF is usually expressed
as 1:5,000,000 or 1/5,000,000. At this scale, 1 cm on the
map represents 5,000,000cm (50km) on the planet surface.
Enter the second number of the RF divided by 1,000,000
for the SCALE.
( i.e. for 1:10,000,000 RF , SCALE = 10
       for 1:18,261,561 RF , SCALE = 18.261561
       for 1:502,000 RF    , SCALE = .502
       for 1:24,000 RF     , SCALE = .024)

For CYLI, SIMP, and SINU projections, the scale is related
to kilometers per degree on the planet. To match a CYLI,
SIMP or SINU to another projection (will match only at the
equator), divide the desired RF scale by the number of
kilometers in one degree of longitude on the equator of
the planet. For example, to match a SINU to an existing
1:25,000,000 (SCALE=25) Mars map of another projection:

  Mars' equatorial radius is 3393.4 km. The circumference
  of Mars is 21,321.36 km (2 * PI * 3393.4). One degree of
  longitude is 59.226km (circumference/360). So the scale
  to use for the SINU is 25/59.226 or SCALE = .422112.

See HELP PAPER for more info.
See HELP * for more info.
TARGET
Either enter a target string that is a body that can be used
to form a system target definition file,  example:

  TARGDEF=mars

The software will try to find files:

  $ISISDATA/targets/mars.def.1
  $ISISDATA/targets/mars.def.2
  $ISISDATA/targets/mars.def.3

etc.

Or enter a user written target definition file path and
name:

  TARGDEF=/work1/elee/mars.def.3

If you want radii different from the defaults in the system,
you cannot enter the radii numbers here.  Copy the system
target definition file to your area and edit, putting the
radii you want into the definition file.  Then TARGDEF=your_
file.  Note also that the target definition file name will
be written to the cube labels, and you will help yourself
if you use a version system as is being done in ISIS.  Each
time you make edits to your target definition file, rename
it and keep the old versions lying around somewhere where
you can find them.
MAPPARS
tutor mappars in TAE.
LONSYS
This parameter is used to define the longitude
system computed by "lev1" programs.  Valid values are
either 180 or 360.  The default is 360 which implies
longitudes will be output in the range of 0 to 360.
The value 180 implies longitudes will be output in
the range of -180 to 180.  Your selection is written
to the labels of the cube or table file.  This
effects programs which output or use the latitude,
for example, "qview", "lev1stats",
"lev1tolev2".
LATSYS
This parameter is used to define the latitude system
computed by "lev1" programs.  Valid values are either
OGRAPHIC or OCENTRIC.  The default is OGRAPHIC.  Your
selection is written to the labels of the cube or
table file.  This effects programs which output or
use the latitude, for example, "qview", "lev1stats",
"lev1tolev2".
LATRANGE
The latitude boundaries (range) of the main grid and ticks.
The valid range is from -90. degrees to 90. degrees.
LONRANGE
The longitude boundaries (range) of the main grid and the
ticks.  When creating a grid which includes the prime meri-
dian (zero longitude line), be sure the longitude range is
defined correctly: i.e. if your desired longitude range
starts at 340° and crosses the prime meridian and ends at
10°, the longitude range should be defined as:
       LON = 340,370   or as   LON = -20,10
The valid range is -360. degrees to 540. degrees.
BASE
BASE defines the base line for the grid increment - GINC and
for the ticks increments - VERTTIC, HORIZTIC.  Latitude
lines will be drawn every GINC(1) degrees relative to
BASE(1) for all lines within the latitude range (LATRANGE).
Longitude lines will be drawn every GINC(2) degrees relative
to BASE(2) for all lines within the longitude range
(LONRANGE).

Some examples:

 If LATRANGE=0,30 LONRANGE=  0, 30 GINC=(10,10)  BASE=(0,0)
	Latitude lines 0,10,20,30 will be drawn.
	Longitude lines 0,10,20,30 will be drawn.

 If LATRANGE=0,22 LONRANGE=100,135 GINC=(10,10)  BASE=(0,0)
	Latitude lines 0,10,20,22 will be drawn.
	Longitude lines 100,110,120,130,135 will be drawn

 If LATRANGE=-22,22 LONRANGE=10,40 GINC=(10,10)  BASE=(0,5)
	Latitude lines ±22,±20,±10,0 will be drawn.
	Longitude lines 15,25,35 will be drawn

 If LATRANGE=10,20 LONRANGE=10,20 GINC=(5,5) BASE=(2.5,2.5)
	Latitude lines 10,12.5,17.5,20 will be drawn.
	Longitude lines 10,12.5,17.5,20 will be drawn.

Short vertical ticks will be drawn every VERTTIC(1) degrees
relative to BASE(1) for all latitude lines within LATRANGE,
(and then the vertical ticks will be VERTTIC(2) degrees
apart.) Short horizontal ticks will be drawn every HORIZ-
TIC(1) degrees relative to BASE(2) for all longitude lines
within LONRANGE, (and then the horizontal ticks will be HOR-
IZTIC(2) degrees apart.)

The third element of VERTTIC and HORIZTIC determines how of-
ten a vertical or horizontal tick will be big rather than
small.

GINC
GINC is latitude and longitude line increment for the grid.
These define how frequently latitude and longitude lines
will be drawn within the main grid boundaries. These in-
crements are based on BASE().  See HELP BASE for more info.
VERTTIC
VERTTIC(1)=latitude  increment for | , ticks
VERTTIC(2)=longitude increment for | , ticks
VERTTIC(3)=How often a tick should be long rather than short

HORIZTIC
HORIZTIC(1)=latitude  increment for  - , ticks
HORIZTIC(2)=longitude increment for  - , ticks
HORIZTIC(3)=How often a tick should be long

See HELP BASE for more info.
TICKLEN
Vary ticklength with latitude.  TICKLEN=NO gives all small
ticks the same short length and all big ticks the same long
length.  TICKLEN=YES gives ticklengths that vary with the
latitude, getting shorter toward the poles.  This and BIG-
SPACE increment are the only control the user has over tick
length.
TBWNOI
YES means the boundaries will be ticked if they are not on
the grid increment.  NO means they won't be ticked if they
are not on the grid increment, but if the boundaries lie
on the grid increment, they are always ticked.
XLAT
The latitude boundaries (range) of the extra latitude lines
you wish to plot. These boundaries are plotted only if
XBOUND = Y.
XLON
The longitude boundaries (range) of the extra longitude
lines you wish to plot. These boundaries are plotted only
if XBOUND = Y.
XGINC
Latitude and longitude line increment for the extra grid.
These define how frequently latitude and longitude lines
will be drawn within the extra grid boundaries. These in-
crements are based on BASE().  If bound is no, the grid
boundaries themselves will not be plotted.  See HELP BASE
or HELP BOUND for more info.
XBOUND
This determines if the XLAT and XLON boundaries are plotted.
If XBOUND=N , only internal lines within XLAT and XLON will
be plotted. For example:

  If XLAT=20,30  XGINC=(2,5)  and  XLON=100,120 and XBOUND=N
                    Latitude lines 22,24,26,28 will be drawn
                    from longitude 100 to 120 and
                    Longitude lines 105,110,115 will be
                    drawn from latitude 20 to 30.

  If XBOUND=Y in the previous example, the XLAT and XLON
  boundaries will also be plotted.
XBASE
Extra grid base latitude and longitude for XGINC.  Defines
the base line from which the extra grid increments will
be counted.  If no input then BASE, for regular grid will
also be used for extra grid.

Last updated: Jan 31 2005
File: pdfs2.html

Contact us online at the Isis Support Center: http://isisdist.wr.usgs.gov

ISIS Documentation Home Page