project crism

From DavinciWiki
Jump to: navigation, search

Description

Project a CRISM product using gdal from control points in the DDR image.

NOTE: requires gdalwarp and gdal_translate >1.5.1, specified by $DV_GDAL_PATH

e.g. add putenv("DV_GDAL_PATH","/usr/bin/" to ~/.dvrc or library*.dvrc

Arguments and Return Values

Inputs: a processed stretched CRISM image and associated DDR data

Outputs: a projected CRISM image

Usage

Syntax: project_crism(ddr, data [,proj=STRING][,ddr_array=BOOL])

ddr - either the lat/lon backplanes or the full ddr array (with ddr_array=1)

data - 1 or 3 band byte fully processed CRISM data

proj - projection type, "simp" or "sinu", default is "simp"

planet - 1 for Mars, 2 for Earth, 3 for the Moon, default is Mars

sampling - user specified sampling in meters per pixel, default is native sampling

manual - provide a manual list of ground control points rather than lat/lon backplanes, default is 0

ignore - data values treated as null by GDAL, default is 0

outstruct - run gdalinfo and return geometry info with projected image, default is 1

clat - center latitude of the projection (use with "simp" for equirectangular projections), default is 0

clon - center longitude of the projection (use with "sinu") default is center latitude of the input image

ddr_array - use the full ddr_array, default is 0

Examples

dv>out=process_crism("000035B5_07")
struct, 1 elements
   long: struct, 7 elements
       anc: struct, 5 elements...
       wl_array: 1x1x438 array of double, bil format [3,504 bytes]
       at_array: 320x1x438 array of float, bil format [560,640 bytes]
       id: ""HRS000035B5_07_IF174L_TRR2.IMG""
       data: 320x225x438 array of float, bsq format [126,144,000 bytes]
       index: 320x225x16 array of double, bsq format [9,216,000 bytes]
       index_key: Text Buffer with 16 lines of text
           1: Olivine Index
           2: LCP Index
           3: HCP Index
           4: Ferric Coating
           5: BD2290 MG, Fe-OH Minerals
           6: D2300 Hydrates Minerals - Particularily Phyllosilicates
           7: BD2210 AL-OH Minerals
           8: BD1900 H20 - Alternate from CAT code
           9: SINDEX Water Containing Minerals
           10: BD2100 Monohydrated Sulfates

dv> LCP=sstretch(out.long.index[,,2],ignore=0)
320x225x1 array of byte, bip format [72,000 bytes]

dv> LCP_proj=project_crism(out,LCP,ddr=1)
Input file size is 320, 225
0...10...20...30...40...50...60...70...80...90...100 - done.
.11340x269x1 array of byte, bsq format [91,460 bytes]

Images

crism LCP index.png crism LCP index proj.png

Right, LCP original, projected LCP image

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Major Sub-Functions

Recent Library Changes

Created On: 03-30-2009
Modified On: 09-30-2011

Personal tools