GEOSET

Set georeferencing bounds


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

Back to top

Description


GEOSET specifies the bounding rectangle (in UTM or other georeferencing coordinates) for an image database file. The bounds are stored in the georeferencing segment, the first segment on the database file.
Note: GEOSET has 6- or 7-digit accuracy (because this is the maximum accuracy of the numeric parameters UPLEFT and LORIGHT). If you need greater accuracy (for example, for UTM, sub-meter accuracy rather the closest meter), use another program such as SETPRO to specify the georeference information and bounds.
Back to top

Parameters


Name Type Caption Length Value range
FILE * String Input file name 1 - 192  
UPLEFT Float Upper-left position for image database 0 - 2 Default: 0,0
LORIGHT Float Lower-right position for image database 0 - 2  
MAPUNITS * String Map units 1 - 16 Default: none

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the PCIDSK file for which to specify the bounding rectangle in the georeferencing segment.

UPLEFT

Specifies the coordinate position of the upper-left corner of the upper-left pixel (position 1,1) for the database, in units specified by MAPUNITS. UPLEFT defaults to 0,0 (used to reset the georeferencing segment to identity transform).

Note: If MAPUNITS is specified as "LONG/LAT", the longitude and latitude would be in decimal degrees. If UPLEFT or LORIGHT are not decimal degrees, use PROLON instead of GEOSET to set the bounds.

LORIGHT

Specifies the coordinate position of the lower-right corner of the lower-right pixel for the database, in units specified by MAPUNITS. LORIGHT defaults to the number of pixels and lines in the database (used to reset the georeferencing segment to identity transform).

Note: If MAPUNITS is specified as "LONG/LAT", the longitude and latitude would be in decimal degrees. If UPLEFT or LORIGHT are not decimal degrees, use PROLON instead of GEOSET to set the bounds.

MAPUNITS

Specifies the projection definition for the reprojected output image.

Valid projections include:

For information about all the projections available, see "Projections and earth models" in the Technical Reference section of the CATALYST Professional help.

MAPUNITS can specify the UTM grid zone number and row, and earth model, as follows:

UTM [mm] [r] [Ennn]
where:

MAPUNITS can specify the UPS grid zone and earth model as follows:

UPS [r] [Ennn]
where:

MAPUNITS can specify the SPCS zone number and earth model as follows:

SPCS [mmmm] [Ennn]
where:
Back to top

Details

GEOSET defines the bounding rectangle (UPLEFT, LORIGHT) for the input image (FILE), using units for a given map frame of reference (MAPUNITS). The defined bounds and output map units are stored in the georeferencing segment (the first segment on the file).

Note: GEOSET has 6- or 7-digit accuracy (because this is the maximum accuracy of the numeric parameters UPLEFT and LORIGHT). If you need greater accuracy (for example, for UTM, sub-meter accuracy rather the closest meter), use another algorithm such as SETPRO to specify the georeference information and bounds.

If MAPUNITS is not "PIXEL", UPLEFT and LORIGHT must be specified.

If MAPUNITS is not "PIXEL" or "LONG/LAT", the horizontal and vertical pixel dimensions are calculated (in meters) and stored in the database header. This overwrites the pixel size specified by the PXSZ parameter when CIM created the database. The pixel size is used by some algorithms, such as MLC and MLR (classification), to calculate statistics.

If MAPUNITS is specified as "PIXEL", UPLEFT and LORIGHT are optional. If omitted, UPLEFT and LORIGHT will be set to the default values and the georeferencing segment reset to the identity transform. (This is the transform placed in the georeferencing segment when it is first created).

If MAPUNITS is "PIXEL" or "LONG/LAT", the pixel size stored in the database header is NOT changed.

Note: If the first segment on the database file is not a georeferencing segment, GEOSET will create and insert a georeferencing segment as the first segment. This means that the numbers of existing segments in the database, if any, are incremented by one.

Typically, GEOSET is run on the output database for geometric correction. Then, the Geometric Correction Component can be used to register (warp) an input image database to a given output map frame of reference (for example, a 30 x 30 meter UTM grid). This defines the area that the output image database represents, and by inference, where the input image will be placed and/or clipped when it is registered to the output image.


                     UPLEFT +---------------------------+
 +-------..+                |             ..            |
 |     ....|                |            ....           |
 |   ......|   Geometric    |           ......          |
 | ........|   Correction   |          ......           |
 |.......  |     ---->      |           ....            |
 |.....    |                |            ..             |
 |...      |                |                           |
 |.        |                |                           |
 +---------+                |                           |
                            +---------------------------+ LORIGHT
 Input Image Database       Output Image Database

The following formulas can be used for deciding the dimensions of the image before creating it, or for setting the bounds of an existing database. These formulas are applicable for MAPUNITS="LONG/LAT", if longitudes in the Western hemisphere and latitudes in the Southern Hemisphere are given a negative sign.

Determine the lower-right bounds given the upper-left bounds, the database size and pixel size:

 All cases             : LORIGHT(1) = UPLEFT(1) + (DBSZ(1) * PXSZ(1))

 LORIGHT(2) < UPLEFT(2): LORIGHT(2) = UPLEFT(2) - (DBSZ(2) * PXSZ(2))
 or
 LORIGHT(2) > UPLEFT(2): LORIGHT(2) = UPLEFT(2) + (DBSZ(2) * PXSZ(2))

Determine the upper-left bounds given the lower-right bounds, the database size, and pixel size:

 All cases             : UPLEFT(1) = LORIGHT(1) - (DBSZ(1) * PXSZ(1))

 LORIGHT(2) < UPLEFT(2): UPLEFT(2) = LORIGHT(2) + (DBSZ(2) * PXSZ(2))
 or
 LORIGHT(2) > UPLEFT(2): UPLEFT(2) = LORIGHT(2) - (DBSZ(2) * PXSZ(2))

Determine the database size given the upper-left bounds, the lower-right bounds, and the pixel size:

 DBSZ(1) = ABS(LORIGHT(1) - UPLEFT(1))/PXSZ(1)
 DBSZ(2) = ABS(LORIGHT(2) - UPLEFT(2))/PXSZ(2)
where:

For detailed information about earth models, see "Projections and earth models" in the Technical Reference section of the CATALYST Professional help.

Back to top

Examples

In the following Examples 1 and 2, the user is interested in an output rectangular UTM map area bounded by UPLEFT (Easting:428720, Northing:3734400) and LORIGHT (Easting:444060, Northing:3719060). Assuming a desired pixel size of 30 by 30 meters, an output database file would be created with the following dimensions:

DBSZ(1) = ABS( 444060 -  428720)/30 = 511.33 --> 512
DBSZ(2) = ABS(3719060 - 3734400)/30 = 511.33 --> 512

Note that both the number of pixels and number of lines would be rounded up to the nearest integer, 512. If we leave UPLEFT as is, then LORIGHT would be adjusted as follows:

LORIGHT(1) =  428720 + (512 * 30) =  444080
LORIGHT(2) = 3734400 - (512 * 30) = 3719040

The following creates an empty, cleared output database file, which can be used to store imagery registered to the specified UTM coordinate grid. Note that GEOSET overwrites the database pixel size, based on values specified by UPLEFT and LORIGHT. Therefore, setting PXSZ when running CIM is redundant in this case.

EASI>FILE	=	"irvine.pix"
EASI>TEX1	=
EASI>TEX2	=
EASI>DBSZ	=	512,512
EASI>PXSZ	=	30,30
EASI>DBNC	=	3

EASI>RUN CIM                     ! Create database

EASI>FILE	=	"irvine.pix"
EASI>DBOC	=	1,2,3
EASI>VALU	=	0,0,0
EASI>DBOW	=

EASI>RUN CLR                     ! Clear database

Set UTM bounds with no UTM zone.

EASI>FILE		=	"irvine.pix"
EASI>UPLEFT		=	428720,3734400
EASI>LORIGHT		=	444080,3719040
EASI>MAPUNITS	=	"utm 11"		! Set to "UTM 11 D000"

EASI>RUN GEOSET

Set UTM bounds with a UTM zone and an ellipsoid.

EASI>FILE		=	"irvine.pix"
EASI>UPLEFT		=	428720,3734400
EASI>LORIGHT		=	444080,3719040
EASI>MAPUNITS	=	"utm11 e0"		! Set to "UTM 11 E000"

EASI>RUN GEOSET

Set the database georeferencing segment back to the default identity transform.

EASI>FILE		=	"irvine.pix"
EASI>UPLEFT		=
EASI>LORIGHT		=
EASI>MAPUNITS	=	"PIX"		! Set to PIXEL

EASI>RUN GEOSET

Set LONG/LAT bounds.

When MAPUNITS="LONG/LAT", using PROLON rather than GEOSET has the following advantages:
  • PROLON allows decimal degrees, decimal minutes, and/or decimal seconds with or without a hemisphere, whereas GEOSET expects UPLEFT and LORIGHT to be in decimal degrees.
  • PROLON can define the bounds more accurately than GEOSET, if UPLEFT and LORIGHT are not exact within 7 digits (the accuracy that can be expected from REAL numeric parameters).
The following example works with a 1-degree digital elevation model (DEM) file which:
  • is 1201 pixels by 1201 scanlines
  • has each pixel as 3 seconds of longitude in width
  • has each scanline as 3 seconds of latitude in height
  • has the following bounds

                           (1)-------------+
                            |(2)           |
                            |              |
                            |              |
                            |           (3)|
                            +-------------(4)
    
               Pixel  Scanline     Longitude         Latitude
        (1)       .0       .0   117d00'01.500"W   34d00'01.500"N
        (2)       .5       .5   117d00'00.000"W   34d00'00.000"N
        (3)   1200.5   1200.5   116d00'00.000"W   33d00'00.000"N
        (4)   1201.0   1201.0   115d59'58.500"W   32d59'58.500"N
    

GEOSET expects UPLEFT and LORIGHT to be in decimal degrees when MAPUNITS="LONG/LAT". This can be done with GEOSET as follows:

EASI>FILE		=	"dem.pix"
EASI>UPLEFT		=	-(117 + (0/60 + 1.5/3600)), (34 + (0/60 + 1.5/3600))
EASI>LORIGHT		=	-(116 - (1.5/3600)), (33 - (1.5/3600)) 
EASI>MAPUNITS	=	"lon"				! Set to "LONG/LAT D000"

EASI>RUN GEOSET

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