Home

User Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Contributor Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Quick Links

Software Manual
AstroDiscuss
GitHub
API Reference

Documentation Versions

Public Release
8.1.0
8.0.0
7.2.0
7.1.0
7.0.0
6.0.0
3.9.0
3.5.0

ISIS 2

Documentation
Tutorials
Technical Documents
USGS

ISIS Application Documentation


mosrange

Standard View | TOC | Home

Compute the lat/lon range of a set of camera images for mosaicking

Description
Categories
Groups
History


Description

mosrange computes and outputs the latitude and longitude ranges of a set of Level1 images (i.e. non-projected), as well as the pixel resolution and the oblique pixel resolution. It creates a cam2map ready map file with the extents of the latitude/longitude ranges of the image set.

The user can select the type of map projection preferred by two different ways. The PROJECTION parameter allows direct specification of an ISIS supported projection. Or, the user can select a map file from the ISIS map template system that contains the projection name. If none of these options are used, then Equirectangular is the default.

mosrange provides better control over the values of the latitude/longitude ranges by providing a PRECISION parameter. This parameter specifies the maximum number of digits of precision for many of the Mapping group parameters used to project images.

ONERROR, ERRORLOG, and ERRORLIST parameters offer better error handling and diagnostics when problems are encountered processing the input file list. ONERROR dictates whether mosrange will abort or continue when an error occurs. If ONERROR=FAIL (default behavior), mosrange aborts upon error without generating a map file. If ONERROR=CONTINUE, mosrange produces an output map file with data collected from all successfully processed images. A detailed list of files that fail and their associated errors are written to the ERRORLOG file if provided. A simple list of failed files is written to the ERRORLIST file if provided.

The primary use of mosrange is to provide a quick, simple and batchable means of creating map files for projections.

An example of the output generated is:

Group = Mapping
  ProjectionName          = Equirectangular
  TargetName              = Mercury
  EquatorialRadius        = 2440000.0  <meters>   
  PolarRadius             = 2440000.0 <meters>
  LatitudeType            = Planetocentric
  LongitudeDirection      = PositiveEast
  LongitudeDomain         = 360
  PixelResolution         = 505.3668 <meters/pixel> 
  ObliquePixelResolution = 791.251 <meters/pixel>
  Scale                   = 84.2676 <pixels/degree>
  MinPixelResolution      = 483.45317995544 <meters>
  MaxPixelResolution      = 527.28051834369 <meters>
  CenterLongitude         = 165.9728
  CenterLatitude          = -13.6612
  MinimumLatitude         = -21.5164
  MaximumLatitude         = -5.806
  MinimumLongitude        = 133.7863
  MaximumLongitude        = 198.1593

  # Actual Parameters without precision applied
  PreciseCenterLongitude  = 165.97281458717
  PreciseCenterLatitude   = -13.661167089917
  PreciseMinimumLatitude  = -21.516314016725
  PreciseMaximumLatitude  = -5.806020163109
  PreciseMinimumLongitude = 133.78639979231
  PreciseMaximumLongitude = 198.15922938202
End_Group
End
 

Categories


Parameter Groups

Files

Name Description
FROMLIST Input cube file list to compute range for
MAP An existing MAP file that will be used to determine the name of the projection
TO Output map projection file generated from the list
LOG Writes the specifics for each file to this file

Mapping

Name Description
PROJECTION Name of projection you want to create
LATTYPE Latitude type
LONDIR Longitude Direction
LONDOM Longitude Domain
PRECISION Digits of precision to use for latitude/longitude specifications

Errorhandling

Name Description
ONERROR Define behavior when a file error occurs
ERRORLOG Writes detailed information for each failed file to a PVL file
ERRORLIST Record filename of each cube that failed to this file

Files: FROMLIST

Description

Use this parameter to select the filename of a cube with camera labels.

Type filename
File Mode input
Filter *.lis

Files: MAP

Description

If this file is given, only the ProjectionName keyword is used to determine the type of projection desired. If you know the type already as well as the proper spelling required by ISIS, then you may use PROJECTION as an alternative to this file.

Type filename
File Mode input
Default Path $ISISROOT/appdata/templates/maps
Internal Default None
Filter *.map *.cub

Files: TO

Description

This file will contain a map projection file suitable for projecting the given set of images. This file will contain all the parameters suitable for using directly in cam2map.

Type filename
File Mode output
Internal Default None
Filter *.map

Files: LOG

Description

Each input file will have its geometry computed and the results can be written to this file.

Type filename
File Mode output
Internal Default None

Mapping: PROJECTION

Description

Use this named projection as the type of projection you wish to create. It should be the complete valid name as required by the cam2map application. This name can also be provided in the MAP parameter if you do not know the proper spelling/format required for ISIS projections.

Type string
Default None
Internal Default None

Mapping: LATTYPE

Description

The latitude type for the projection. It can either be Planetocentric or Planetographic. PLANETOCENTRIC is the default.

Type string
Default PLANETOCENTRIC
Option List:
Option Brief Description
PLANETOCENTRIC Planetocentric Sets the latitude type in the mapping template to Planetocentric.
PLANETOGRAPHIC Planetographic Sets the latitude type in the mapping template to Planetographic.

Mapping: LONDIR

Description

The longitude direction for the projection. It can have a direction of Positive East or Positive West. POSITIVEEAST is the default.

Type string
Default POSITIVEEAST
Option List:
Option Brief Description
POSITIVEEAST PositiveEast Longitude Direction Sets the longitude direction in the mapping template to PositiveEast.
POSITIVEWEST PositiveWest Longitude Direction Sets the longitude direction in the mapping template to PositiveWest.

Mapping: LONDOM

Description

The longitude domain for the projection. It can either have a domain of 180 or 360. 360 is the default.

Type string
Default 360
Option List:
Option Brief Description
360 0 to 360 Degree Longitude Domain Sets the longitude domain in the mapping template to 360 degrees.
180 -180 to 180 Degree Longitude Domain Sets the longitude domain in the mapping template to 180 degrees.

Mapping: PRECISION

Description

This parameter provides some control over how the Latitude and Longitude min/max values are written to the map file. Note that this is useful for creating easy values to use in subsequent applications that may require these values. If these values are not specified, about 12 digits of precision will be used.

Note that you can use a negative number which has the effect of rounding the whole integral number. A value of 0 will produce an integral whole number, effectively removing the decimal portion of the numbers. A positive number will truncate up (maximums using the ceil function) or down (minimums using the floor function) range values such as MinimumLatitude and MaximumLatitude. The pixel resolution is rounded using same technique (with the rint fuction).

PRECISION Examples
Value PRECISION Result
118.08747089457 12 (Default) 118.08747089457
118.08747089457 5 118.0875
118.08747089457 1 118.1
118.08747089457 0 118.0
118.08747089457 -1 120.0
118.08747089457 -2 100.0
118.08747089457 -3 0.0 (Bad!)

Type integer
Default 12

Errorhandling: ONERROR

Description

This flag is provided to specify what action is to be taken should an error occur processing the input file list. A detailed list of errors for each file will be recorded to ERRORLOG if a file name is provided. A list containing the file names that failed will be written to ERRORLIST if provided. If ONERROR=FAIL, a single error will result in an abort. FAIL is the default (to preserve existing behavior).

Type string
Default FAIL
Option List:
Option Brief Description
CONTINUE Continue processing all the input file list if an error occurs Continue to produce an output map file with data collected from any number of successfully processed images when one or more errors are encountered with the input processing list. This option will cause the application to continue processing all files and generate a mapping file if at least one is successful.
FAIL Terminate the application when an error occurs If any file produces an error when determining mapping statistics, ONERROR=FAIL will cause the application to abort with an error without generating a map file. The filename and detailed error are written to ERRORLOG if provided. The filename alone is written to ERRORLIST if provided.

Errorhandling: ERRORLOG

Description

Each file that encounters an error will produce the issue that cased the error. The ERRORLOG file can be specified to get a detailed account of why each file failed to successfully complete. Data collected from this process will be written to the specified ERRORLOG in the form of a PVL object.

Type filename
File Mode output
Internal Default None

Errorhandling: ERRORLIST

Description

The filename of each cube that encountered an error will be written to this file if provided. The ERRORLIST file can be used to difference against the input list to determine all the successful files included in the mapping statistics.

Type filename
File Mode output
Internal Default None

History

Kris Becker2006-03-26 Original version
Kris Becker2008-06-27 Removed references to CubeInfo due to refactor
Kris Becker2009-08-13 Added parameters LATTYPE, LONDIR and LONDOM; Now computes pixel Scale in pixels/degree; added additional parameters to the output map file so it is more compliant with projection requirements based upon input parameters and established mapping group keywords.
Kris Becker2009-09-18 Added TargetName to output map file.
Mackenzie Boyd2010-07-19 Modified program to have output go to print.prt file in addition to other outputs.
Kris Becker2010-11-02 Added more detail to error reporting so the offending file can be more readily identified.
Kris Becker, Lynn Weller2012-01-22 Updated the documentation
Debbie A. Cook2012-07-06 Updated Spice members to be more compliant with Isis coding standards. References #972.
Debbie A. Cook2012-10-11 Updated to use new Target class. References Mantis tickets #775 and #1114.
Tyler Wilson2016-08-25 Updated to use updated Camera/CameraPointInfo classes which include improved approximations to Pixel/Detector/Line/Sample resolutions, as well as providing the ability for developers to order the fields in CSV/Pvl output. References #476.
Kris Becker2019-03-11 Added ERRORLOG, ERRORLIST and ONERROR flags to provide better control error behavior and provide diagnostics when problems are encountered processing input file list.
Ken Edmundson2023-09-07 Moved Kris Becker's 2019-03-11 changes from UofA code base to USGS. Updated documentation. Cleaned up unnecessary blank lines and commented code in mosrange.cpp. References #3606.