User's Guide

LLRANGE

Find minimum and maximum latitude and longitude of a LAS image.

Function:

Find minimum and maximum latitude and longitude of an AVHRR LAS image. If the input image is in the AVHRR satellite projection, it must have an associated AVHRR Data Descriptor Record (ADDR) file. If the input image is in any other GCTP-supported projection, its DDR (Data Descriptor Record) must have valid projection fields. The minimum and maximum latitude values are returned as decimal degrees in MINLAT and MAXLAT, respectively. Likewise, the minimum and maximum longitude values are returned as decimal degrees in MINLONG and MAXLONG.

Parameters:

IN
Input image. The LAS image for which the minimum and maximum latitude and longitude are to be found.

MINLAT
Minimum latitude. The minimum (southernmost) latitude contained in the image is returned in this parameter's REAL TAE variable.

MINLONG
Minimum longitude. The minimum (westernmost) longitude contained in the image is returned in this parameter's REAL TAE variable.

MAXLAT
Maximum latitude. The maximum (northernmost) latitude contained in the image is returned in this parameter's REAL TAE variable.

MAXLONG
Maximum longitude. The maximum (easternmost) longitude contained in the image is returned in this parameter's REAL TAE variable.

PROJ(OTH)
Projection code. The projection type of the input image.

  = SAT:  Satellite projection.  The input image is 
          in AVHRR satellite projection.
  = OTH:  All other projections.  The AVHRR image has
          been rectified to another projection.

Examples:

  1. LAS> llrange in=inimg minlat=lat1 minlong=lon1 maxlat=lat2 maxlong=lon2

    The minimum and maximum latitudes and longitudes will be returned in the TAE variables LAT1, LAT2, LON1, and LON2. Information about the projection and location of INIMG is taken from the DDR.

  2. LAS> llrange in="inimg(:2)" minlat=lat1 minlong=lon1 maxlat=lat2 maxlong=lon2 proj=sat

    The minimum and maximum latitudes and longitudes will be returned in the TAE variables LAT1, LAT2, LON1, and LON2. Since the image is in satellite projection, information used to calculate these values will be taken from the ADDR. The band specification has no effect.

Description/Algorithm:

The DDR of IN is retrieved. Any windowing or subbanding is ignored. If PROJ=OTH, the fields in the DDR are checked for validity. The projection information in the DDR is used in scanning the edges of the image to find the minimum and maximum latitudes and longitudes. If PROJ=SAT, information from the ADDR is used in conjunction with the AVHRR model to find the image's latitude and longitude range.

Nonfatal Error Messages:

    None.

Fatal Error Messages:

  1. [llrange-addr] Error reading ADDR file

    An error occurred reading the image's associated ADDR file. Ensure this file exists with read permission, and the image is in satellite projection.

  2. [llrange-calc] Cannot calculate <xxx>

    The specified coordinate could not be calculated. This error will occur if there is more than one minimum or maximum along the edge of a reprojected image. See User Note 1.

  3. [llrange-fatal] Fatal error encountered

    A fatal error was encountered during processing. The preceding message explains the exact error.

  4. [llrange-pcode] Projection code of image is invalid

    PROJ was specified as "OTH", but the input image's DDR had an invalid projection code. Ensure that the image is in a valid projection. If not, reproject the image or use the "SAT" satellite projection.

  5. [llrange-pcoord] Corner projection coordinates of image are invalid

    PROJ was specified as "OTH", but the input image's DDR had invalid corner projection coordinates. These are necessary for calculating the latitude and longitude at points along the edges of the image. Ensure the image is in a valid projection. If not, reproject the image or use the "SAT" satellite projection.

  6. [llrange-pdist] Projection distances per pixel of image are invalid

    PROJ was specified as "OTH", but the input image's DDR had invalid values for projection distance per pixel. These are necessary for searching the edges of the image for the minima and maxima. Verify that the image has a valid DDR. If not, reproject the image, or use the "SAT" satellite projection.

  7. [llrange-punit] Invalid projection unit

    PROJ was specified as "OTH", but the input image's DDR had an invalid projection unit. This is necessary for calculating the latitude and longitude at points along the edges of the image. Reproject the image, or use the "SAT" satellite projection.

User Notes:

  1. The algorithm of LLRANGE assumes that each edge of a reprojected image has only one minimum and one maximum. For example, if the longitude along the edge increases, then decreases, then increases again, there would be two (relative) minimum longitudes. If this occurs, LLRANGE should not be used, as it may produce a fatal error or return invalid values.

  2. If the image crosses the International Date Line, the minimum longitude will be the westernmost longitude, and the maximum longitude will be the easternmost. In this case, MINLAT will be numerically greater than MAXLAT.

        e.g.    +170   |  -170
                  +---------+
                  |    |    |	MINLAT +165
                  |    |    |	MAXLAT -165
                  +---------+
                +165   |  -165