ISIS Application Documentation
cam2map | Printer Friendly View | TOC | Home |
Convert camera image to a map projection
Overview | Parameters | Example 1 | Example 2 | Example 3 | Example 4 | Example 5 | Example 6 | Example 7 | Example 8 |
Description
This program projects an ISIS level0 or level1
cube to a map (ISIS level2 cube).
The input cube requires SPICE data and therefore spiceinit should be executed prior to
running cam2map. The map projection is defined using a
PVL file which is specified in cam2map in the MAP parameter. Note: the system defaults
to the Sinusoidal projection (ISIS projection based templates are located in $ISISROOT/appdata/templates/maps).
To learn more about using map projections in ISIS, refer to the ISIS Workshop
"Learning About Map Projections".
If you only entered the input cube (FROM) and output cube (TO) and changed no other parameters, the following are the defaults for the Mapping group. Note: this is the PVL format you'll see in both the level2 ISIS cube header and the MAP file: Group = Mapping TargetName = "Obtained from the Instrument group" EquatorialRadius = "Obtained from TargetAttitudeShape kernel" PolarRadius = "Obtained from TargetAttitudeShape kernel" LatitudeType = Planetocentric LongitudeDirection = PositiveEast LongitudeDomain = 360 (Could be automatically adjusted to 180 by LONSEAM) MinimumLatitude = "Computed from the input camera cube" MaximumLatitude = "Computed from the input camera cube" MinimumLongitude = "Computed from the input camera cube" MaximumLongitude = "Computed from the input camera cube" ProjectionName = Sinusoidal CenterLongitude = "Average of MinimumLongitude and MaximumLongitude" PixelResolution = "Computed from the input camera cube" EndGroup If you need to generate your own map file you can use the maptemplate program, or alternatively, hand create a file using any text editor. The file need only specify the ProjectionName, as defaults will be computed for the remaining map file parameters. The following table indicates how the defaults are established:
Alternatively, the map file can be an existing map projected (level2) cube. A level2 cube has PVL labels and contains the Mapping group. Depending on the values of the input parameters, the output cube can use some or all of the keyword values of the map file. For instance, setting MATCHMAP=yes causes all of the mapping parameters to come from the map file, resulting in an output cube having the same number of lines and samples as the map file. If MATCHMAP=yes and the map file is missing a keyword like PixelResolution, the application will fail with a PVL error. Setting MATCHMAP=no allows for some of the mapping components to be overridden by the user or computed from the FROM cube. If you are attempting to construct a mosaic, it is essential that the PixelResolution, EquatorialRadius, PolarRadius, LatitudeType, LongitudeDirection, LongitudeDomain, ProjectionName, and projection specific parameters (e.g., CenterLongitude, CenterLatitude) are the same for all cubes. That is, you should create one map file and use it as input for all the cubes in your mosaic. Otherwise, the program will throw and error. By letting the minimum and maximum latitude and longitude values default, the application will determine the coverage of each image. However, if the mosaic Latitude and Longitude range are entered, each output image will be projected to the full size of the mosaic resulting in large file sizes and images with many NULL pixels. The following Mapping group could be used for mosaicking: Group = Mapping ProjectionName = Sinusoidal CenterLongitude = 0 PixelResolution = 100 <meters> EndGroup Finally, depending on the projection, problems can occur with cubes that fall on the projection longitude seam. For example, if you are making a mosaic with LongitudeDomain=360 and your cube crosses 0/360 seam, the program will compute the default longitude range of the cube to MinimumLongitude=0 and MaximumLongitude=360. A larger than necessary output image will be created, with size inversely proportional to pixel resolution. The LONSEAM parameter allows you to selectively handle this case. If you are making mosaics near the seam you will need to understand and alter the default for this parameter. Problems at the Longitude Seams of The ISIS Workshop "Learning About Map Projections" includes an example to help illustrate the problem. CategoriesRelated Applications to Previous Versions of ISISThis program replaces the following applications existing in previous versions of ISIS:
History
|
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 02/21/2025 19:28:09 |
Parameter GroupsFiles
Output Map Resolution
Output Map Ground Range
Longitude Seam Options
Options
|
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 02/21/2025 19:28:09 |
The specification of the input cube to be projected. The cube must have been initialized using the spiceinit program.
Type | cube |
---|---|
File Mode | input |
Filter | *.cub |
A file containing the desired output mapping parameters in PVL format. This file can be a simple label file, or can be hand produced, or created via the maptemplate program. It can also be an existing cube or cube label which contains a Mapping group. In the latter case, the FROM cube will be transformed into the same map projection, resolution, etc.
Type | filename |
---|---|
File Mode | input |
Default Path | $ISISROOT/appdata/templates/maps |
Default | $ISISROOT/appdata/templates/maps/sinusoidal.map |
Filter | *.map *.cub |
This file is the map projected (level2) image.
Type | cube |
---|---|
File Mode | output |
Filter | *.cub |
This forces all of the mapping parameters to come from the map file. Additionally, when the map file is an image the TO file will have the same number of lines and samples as the map file.
Type | boolean |
---|---|
Default | false |
Exclusions |
|
This parameter is used to specify how the pixel resolution is obtained for the output map projected cube.
Type | string | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Default | CAMERA | |||||||||||||||
Option List: |
|
Specifies the resolution in either meters per pixel or pixels per degree
Type | double |
---|---|
Minimum | 0.0 (exclusive) |
This parameter is used to specify how the default latitude/longitude ground range for the output map projected image is obtained. The ground range can be obtained from the camera or map file. Note the user can override the default using the MINLAT, MAXLAT, MINLON, MAXLON parameters. The purpose of the ground range is to define the coverage of the map projected image. Essentially, the ground range and pixel resolution are used to compute the size (samples and line) of the output image.
Type | string | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Default | MINIMIZE | ||||||||||||
Option List: |
|
The minimum latitude of the output map. If this is entered by the user it will override the default camera or map value. By default, planetocentric latitudes are assumed unless the map file specifies otherwise.
Type | double |
---|---|
Internal Default | Use default range |
Minimum | -90.0 (inclusive) |
Maximum | 90.0 (inclusive) |
The maximum latitude of the output map. If this is entered by the user it will override the default camera or map value. By default, planetocentric latitudes are assumed unless the map file specifies otherwise.
Type | double |
---|---|
Internal Default | Use default range |
Minimum | -90.0 (inclusive) |
Maximum | 90.0 (inclusive) |
Greater Than | MINLAT |
The minimum longitude of the output map. If this is entered by the user it will override the default camera or map value. By default, positive east longitudes in the range of 0 to 360 are assumed unless the map file specifies otherwise.
Type | double |
---|---|
Internal Default | Use default range |
The maximum longitude of the output map. If this is entered by the user it will override the default camera or map value. By default, positive east longitudes in the range of 0 to 360 are assumed unless the map file specifies otherwise.
Type | double |
---|---|
Internal Default | Use default range |
Greater Than | MINLON |
The image is modified. The pixel dimensions of the file are retained; therefore, the number
of pixels is the same. However, the pixels that fall outside the default or specified latitude
and longitude range are set to NULL.
If camera is selected:
Type | boolean |
---|---|
Default | FALSE |
With this option you can turn on/off the automatic longitude domain switching that occurs when a file crosses the boundary of the longitude domain (0-360 or -180 to 180). If the switching is turn off then you have the choice of making the program continue or exit when the cube does cross the boundary.
Type | string | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Default | AUTO | ||||||||||||
Option List: |
|
This is the type of interpolation to be performed on the input.
Type | string | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Default | CUBICCONVOLUTION | ||||||||||||
Option List: |
|
This parameter is used to choose the warping algorithm, either the forward patch algorithm or the reverse patch algorithm. The default is to automatically choose the algorithm based on the input camera type (e.g., framing, linescan, pushframe).
Type | string | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Default | AUTOMATIC | ||||||||||||
Option List: |
|
The forward and reverse patch algorithms try to fit an affine transform between the camera model coordinate and projection coordinate using the four corners of the patches. Patches that are too large may run faster at the risk of missing higher resolution information about the DTM. For example, a patch of 256x256 may have the same elevation at the four corners and center of the grid, but a crater may exist in one of the four quadrants of the patch. The crater, up to 128 pixels in diameter, may not be properly orthorectified. In general, small patch sizes are recommended (e.g., 4, 8).
Type | integer |
---|---|
Minimum | 1 (inclusive) |
This parameter is used to toggle the occlusion detection algorithm.
If set true, then the occlusion detection algorithm locates and nullifies
occluded pixels. A pixel is determined to be occluded if the lat/lon
value of the pixel in projected image space does not match (within a
tolerance) the lat/lon value of the pixel in unprojected image space.
Highly dependent on DEM / image pixel resolution and accuracy of
coregistration between the two.
This parameter also significantly increases projection time. It is
recommended that this option is only used on images with known areas
of occlusion.
Type | boolean |
---|---|
Default | false |
Example 1Demonstrates the AUTO LONSEAM option Description
This example is the first of two different runs of cam2map
demonstrating the LONSEAM option. In this case it is set to AUTO.
All the user input parameters in this example are identical to the
following example except for LONSEAM and TO. The default for LONSEAM
is AUTO.
Command Line
cam2map from=EN0108830655M.cub map=../IN/sinu.map
to=EN0108830655M_sinu_auto.cub
This is the command line used to create the output for the AUTO
version of the LONSEAM example.
GUI ScreenshotInput Image
Data FileLinks open in a new window.
Output Image |
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 02/21/2025 19:28:09 |
Example 2Demonstrates the LONSEAM CONTINUE option Description
This example is the second of two different runs of cam2map
demonstrating the LONSEAM option. In this case it is set to CONT.
All the user input parameters in this example are identical to the
previous example except for LONSEAM and TO.
Command Line
cam2map from=EN0108830655M.cub
map=../IN/sinu.map
to=EN0108830655M_sinu_cont.cub lonseam=cont
This is the command line used to create the output for the CONT
version of the LONSEAM example.
GUI ScreenshotInput Image
Data FileLinks open in a new window.
Output Image |
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 02/21/2025 19:28:09 |
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 02/21/2025 19:28:09 |
Example 4Demonstrates a second way to use MATCHMAP Description
This example is the second of two different runs of cam2map
demonstrating usage of MATCHMAP. In both this example and the
previous, MATCHMAP is set to YES. However, in this case MAP is an
ISIS map file. The mapping parameters of the output file will
be read from this map file.
Command Line
cam2map from=EN0108827082M.lev1.cub map=EN0108828436M.map
to=EN0108827082M.lev2.cub matchmap=yes
This is the command line used to create the output for the map file
version of the MATCHMAP example.
GUI Screenshot
Input Image
Data FileLinks open in a new window.
Output Image
|
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 02/21/2025 19:28:09 |
Example 5The following four examples illustrate the effects of the TRIM option Description
In the GUI below, cam2map is set up to project the input (level1) image to a (level2)
projected image. The latitude and longitude ranges are calculated using the CAMERA
option, but note the trim option is not selected in order to output the full extent of
the input image. In the example immediately following, the GUI is set up to trim the
image to a specific latitude and longitude boundary (TRIM=YES).
Command Line
cam2map from=P01_001489_2688_XI_88N339W.lev1eo.cub
map=./npole.map to=no_trim_P01_001489_2688_XI_88N339W.lev1eo.cubSINU18
defaultrange=camera
This is the command line used to create the output where the original dimensions are preserved.
GUI Screenshot
Output Image |
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 02/21/2025 19:28:09 |
Example 6The following example illustrates what happens to the same data set with TRIM=YES Description
This cam2map GUI is set up to trim the image to a specific latitude and longitude
boundary.
Command Line
cam2map from=P01_001489_2688_XI_88N339W.lev1eo.cub map=./npole.map
to=trim2_P01_001489_2688_XI_88N339W.lev1eo.cub trim=yes defaultrange=camera
minlat=87.3 maxlat=89.11 minlon=8 maxlon=74
This is the command line used to create the output where TRIM has been used to trim the image
to a specific region of interest.
GUI Screenshot
Output Image |
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 02/21/2025 19:28:09 |
Example 7Potential anomalies using Sinusoidal projections Description
Below is a Cassini ISS wide-angle image of Enceladus, in sinusoidal projection. It illustrates the
anomaly that can happen using certain projections when TRIM=NO. Notice the "duplicated" data.
The next example will show how to correct this problem.
Command Line
cam2map from=CISSWA_Enceladus.cub map=sinu180.map
to=CISSWA_Enceladus_notrim.cub defaultrange=camera
The command used to project the level1 image to a sinusodial projection. Notice that the default
is trim=no, and therefore, is not necessary in the command line.
GUI Screenshot
Data FileLinks open in a new window.
Output Image |
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 02/21/2025 19:28:09 |
Example 8Solution for anomalies using Sinusoidal projections Description
Below is the same Cassini ISS wide-angle image of Enceladus used in Example #7. The GUI
definitions illustrate how to use TRIM to eliminate the duplicated data created by this
particular projection.
Command Line
cam2map from=CISSWA_Enceladus.cub map=sinu180.map
to=CISSWA_Enceladus_notrim.cub defaultrange=camera trim=yes
The command used to project the level1 image to a sinusoidal projection.
GUI Screenshot
Data FileLinks open in a new window.
Output Image |
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 02/21/2025 19:28:09 |