Home
About Isis
Support
Download

Isis 3

Documentation
Tutorials
Technical Documents

Isis 2

Documentation
Tutorials
Technical Documents

Search

USGS

Isis 3 Application Documentation


maptrim

Printer Friendly View | TOC | Home

Trim edges of a map projected image

Overview Parameters Example 1

Description

Trims the edges of a map projected image (Level2) to the exact latitude and longitude boundaries specified in the user parameters, or by default, the lat/lon range found in the Mapping group in the cube labels. Any pixels outside this lat/lon range will be set to the NULL value by default, unless a different mode is specified by the user. The latitudes and longitudes are the same type, domain, and direction as those found in the Mapping group in the cube labels. For example, if the input cube's Mapping group has a longitude direction of positive east and the user specifies the lat/lon range, those longitudes will be interpreted as positive east longitudes.

Note: This application will not handle non-projected images (i.e. images that are not Level2). To trim a Level1 image, please refer to camtrim.

Categories


Related Applications in Previous Versions of Isis

This application replaces the following application existing in previous versions of Isis, which has been deprecated from the current version of Isis:
  • trimsinu

History

Tracie Sucharski2003-02-28 Original version
Tracie Sucharski2003-04-03 Changed brief description, added error check for no values entered for slat,elat,slon,elon.
Stuart Sides2003-05-16 Modified schema location from astogeology... to isis.astrogeology..."
Stuart Sides2003-07-29 Modified filename parameters to be cube parameters where necessary
Brendan George2005-11-21 Added application test
Sean Crosby2007-03-16 Added cropping and crop+trim ability; modified apptest
Christopher Austin2009-01-27 Fixed parameter names
Travis Addair2009-08-10 Mapping group parameters are now placed into the print file.
Mackenzie Boyd2009-08-12 Modified call to crop to handle from and to parameters with spaces in directories.
Jai Rideout2011-01-11 Updated documentation and testing with Ella Lee in preparation for the 3.4.0 release. Fixed various inconsistencies in the documentation and rewrote some parts to make it clearer. Added an example. Added two new tests to test getting the lat/lon range from the cube labels and the processing of level 1 images.

Parameter Groups

Files

Name Description
FROM Input cube to trim
TO Output cube

Trim options

Name Description
MODEMaptrim options

Trim Parameters

Name Description
MINLATStarting latitude
MAXLATEnding latitude
MINLONStarting longitude
MAXLONEnding longitude
X

Files: FROM


Description

Use this parameter to select the filename. All bands within the file will be trimmed.

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: TO


Description

This file will contain the results of the trimmed cube.

Type cube
File Mode output
Filter *.cub
Close Window
X

Trim options: MODE


Description

This allows the user to decide which trimming options to use. Normally, all pixels outside the lat/lon ranges are set to NULL. There is now a choice to crop out a part of a map with or without nulled pixels outside the lat/lon range.

Type string
Default TRIM
Option List:
Option Brief Description
TRIMNull all pixels outside lat/lon range The original dimensions of the map are preserved while all pixels outside the lat/lon range are nulled.
CROPCrop the area defined by the lat/lon range The dimensions of the output file will be just large enough to fit the cropped area. No pixels are nulled here.
BOTHCrop map and null all pixels outside lat/lon range The dimensions of the output file will be just large enough to fit the cropped area and all pixels outside the lat/lon range are nulled.
Close Window
X

Trim Parameters: MINLAT


Description

Starting latitude of range to exclude from trim. Any pixels whose latitude is less than this value will be set to NULL.

Type double
Internal Default Minimum latitude in labels
Minimum -90 (inclusive)
Maximum 90 (inclusive)
Less Than MAXLAT
Close Window
X

Trim Parameters: MAXLAT


Description

Ending latitude of range to exclude from trim. Any pixel whose latitude is greater than this value will be set to NULL.

Type double
Internal Default Maximum latitude in labels
Minimum -90 (inclusive)
Maximum 90 (inclusive)
Greater Than MINLAT
Close Window
X

Trim Parameters: MINLON


Description

Starting longitude of range to exclude from trim. Any pixel whose longitude is less than this value will be set to NULL.

Type double
Internal Default Minimum longitude in labels
Minimum -360 (inclusive)
Maximum 360 (inclusive)
Less Than MAXLON
Close Window
X

Trim Parameters: MAXLON


Description

Ending longitude of range to exclude from trim. Any pixels whose longitude is greater than this value will be set to NULL.

Type double
Internal Default Maximum longitude in labels
Minimum -360 (inclusive)
Maximum 360 (inclusive)
Greater Than MINLON
Close Window

Example 1

Trimming a Projected Image

Description

This example illustrates how to trim a cube that has been projected with a sinusoidal projection. All pixels with latitudes less than 15 or greater than 20 are set to NULL, and all pixels with longitudes less than 222 or greater than 230 are also set to NULL.

Command Line

maptrim FROM=input.cub TO=trimmed.cub MINLAT=15 MAXLAT=20 MINLON=222 MAXLON=230
The command to use for this example.

Input Image

input.cub

Input cube

Parameter Name: FROM

This is the input cube to trim.

Output Image

trimmed.cub

Trimmed cube

Parameter Name: TO

This is the trimmed cube. Notice that all pixels that fell outside the user-specified range were set to NULL.