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.
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 Sucharski
2003-02-28
Original version
Tracie Sucharski
2003-04-03
Changed brief description, added error check for no values
entered for slat,elat,slon,elon.
Stuart Sides
2003-05-16
Modified schema location from astogeology... to isis.astrogeology..."
Stuart Sides
2003-07-29
Modified filename parameters to be cube parameters where necessary
Brendan George
2005-11-21
Added application test
Sean Crosby
2007-03-16
Added cropping and crop+trim ability; modified apptest
Christopher Austin
2009-01-27
Fixed parameter names
Travis Addair
2009-08-10
Mapping group parameters are now placed into the print file.
Mackenzie Boyd
2009-08-12
Modified call to crop to handle from and to parameters with spaces in
directories.
Jai Rideout
2011-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.
Kimberly Oyama
2013-1-14
Changed the temporary file name to be unique between executions so there
are no conflicts when multiple instances of the program are running. Added
an app test to exercise this change. Fixes #1216.
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
TRIM
Null all pixels outside lat/lon range
The original dimensions of the map are preserved while all pixels
outside the lat/lon range are nulled.
CROP
Crop 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.
BOTH
Crop 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.
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.