GRATIC

Generate a LONG/LAT graticule


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Examples

Back to top

Description


Generates a graticule (that is, a LONG/LAT grid) transformed to a specified projection. The output graticule is saved in a new vector segment.
Back to top

Parameters


Name Type Caption Length Value range
FILE * String Input file name 1 - 192  
BX1 String Longitude coordinate, 1st bounding point 0 - 32  
BY1 String Latitude coordinate, 1st bounding point 0 - 32  
BX2 String Longitude coordinate, 2nd bounding point 0 - 32  
BY2 String Latitude coordinate, 2nd bounding point 0 - 32  
GINC String Graticule increment 0 - 64  
MAPRES Float Map resolution 0 - 2  
VTYPE String Vector Type 0 - 5 LINE | POINT
Default: LINE
DBSN String Vector segment name 0 - 8 Default: gratic
DBSD String Vector segment description 0 - 192  
MONITOR String Monitor mode 0 - 3 ON, OFF
Default: ON

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the PCIDSK file that contains the georeferenced image and that will receive the new vector segment (type VEC:116) to hold the graticule vectors.

BX1

Specifies a horizontal coordinate longitude (X) for the first bounding point.

This value must be specified in decimal degrees or degrees, minutes, and/or seconds.

Note:

If FILE is georeferenced to a projection or LONG/LAT, the BX1, BX2, BY1, and BY2 parameters must be either all defaulted or all specified.

If FILE is not georeferenced to a projection or LONG/LAT, the BX1, BX2, BY1, and BY2 parameters must all be specified.

BY1

Specifies a vertical latitude (Y) coordinate for the first bounding point.

This value must be specified in decimal degrees or degrees, minutes, and/or seconds.

Note:

If FILE is georeferenced to a projection or LONG/LAT, the BX1, BX2, BY1, and BY2 parameters must be either all defaulted or all specified.

If FILE is not georeferenced to a projection or LONG/LAT, the BX1, BX2, BY1, and BY2 parameters must all be specified.

BX2

Specifies a horizontal longitude (X) coordinate for the second bounding point.

This value must be specified in decimal degrees or degrees, minutes, and/or seconds.

Note:

If FILE is georeferenced to a projection or LONG/LAT, the BX1, BX2, BY1, and BY2 parameters must be either all defaulted or all specified.

If FILE is not georeferenced to a projection or LONG/LAT, the BX1, BX2, BY1, and BY2 parameters must all be specified.

BY2

Specifies a vertical latitude (Y) coordinate for the second bounding point.

This value must be specified in decimal degrees or degrees, minutes, and/or seconds.

Note:

If FILE is georeferenced to a projection or LONG/LAT, the BX1, BX2, BY1, and BY2 parameters must be either all defaulted or all specified.

If FILE is not georeferenced to a projection or LONG/LAT, the BX1, BX2, BY1, and BY2 parameters must all be specified.

GINC

Specifies the increment for the graticule.

Supported options are:
Note:

If the georeferencing for the input file (FILE) is a projection or LONG/LAT, this parameter may be defaulted. The default will be the largest of the following increments that fit in 1/10 of the distance between BX1 to BX2 and BY1 to BY2:

1 second,  5 seconds,  10 seconds,  15 seconds,
1 minute,  5 minutes,  10 minutes,  15 minutes,
1 degree,  5 degrees,  10 degrees

MAPRES

Specifies the spacing distance between vertices when VTYPE (Vector Type) is specified as LINE. This value is expressed in the georeferenced units (XSize, YSize).

If this parameter is not specified, and VTYPE is specified as LINE, the spacing between the vertices in each LINE will be the largest of the following: 1000 meters, the pixel width, or the pixel height.

If VTYPE is specified as POINT, this parameter is not used; the spacing between the points is controlled by the GINC (Gratic Increment) parameter.

VTYPE

Specifies the type of vector data to generate.

Supported values are:

DBSN

Optionally specifies a name (up to 8 characters) for the output vector segment.

DBSD

Optionally describes (in up to 64 characters) the contents or origins of the output vector segment.

MONITOR

The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.

Available options are:

Back to top

Details

GRATIC is used to generate a LONG/LAT grid that has been transformed to overlay a specified projection. The output grid is saved as lines or points in a newly created vector segment.

The input file (FILE) specifies the image file in which to store the output vector segment.

The bounds for the graticule may be defined (BX1, BY1, BX2, BY2) or defaulted, if FILE is georeferenced with a supported projection or LONG/LAT. If defaulted, the bounds will be the bounds of the image rounded out to the nearest graticule increment (GINC).

The bounds must be specified in one of the following forms:

If the Vector Type (VTYPE) is specified as LINE, the MAPRES (Map Resolution) parameter defines the distance between the vertices in each line in georeference units. If VTYPE is specifies as POINT, MAPRES will have no effect.

The projection information is defined in a georeference segment 1.

The segment name (DBSN) and description (DBSD) may be specified or defaulted.

The specified or default graticule bounds are stored in the output vector segment's history.

You may need to clip the output vector segment using VECSEL to fit the image georeference bounds, depending on the end requirement for the graticule vectors.

Back to top

Examples

The following two examples should produce the same output vector segments. The output graticule would be LONG/LAT lines that have been projected to the georeference units (that is, "UTM 11 S E000"). The first example defaults all parameters where possible.

EASI>FILE	=	"irvine.pix"
EASI>BX1	= 
EASI>BY1	= 
EASI>BX2	= 
EASI>BY2	= 
EASI>GINC	= 
EASI>MAPRES	= 
EASI>VTYPE	= 
EASI>DBSN	= 
EASI>DBSD	= 

EASI>RUN GRATIC

This example shows how the parameters must be set to produce the same vectors as the above default example. The bounds are rounded outwards to the nearest graticule increments (that is, to the minute, as derived from GINC).

EASI>FILE	=	"irvine.pix"
EASI>BX1	=	"117d47'w"	! minimum longitude, rounded down
EASI>BY1	=	" 33d36'n"	! minimum latitude, rounded down
EASI>BX2	=	"117d36'w"	! maximum longitude, rounded up
EASI>BY2	=	" 33d45'n"	! maximum latitude, rounded up 
EASI>GINC	=	"     1', 1' "	! maximum increment in 1/10 bounds
EASI>MAPRES	=	1000, 1000	    ! pixel size from segment 1
EASI>VTYPE	=	"line"	! produce a "LINE" graticule
EASI>DBSN	=	"gratic"	! default name
EASI>DBSD	=	" "	! default description (blank)

EASI>RUN GRATIC

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.