List of Routines By Functionality |  MISR Toolkit: Main Page

-Abstract

   MTK_SOMXY_TO_LS returns a map line and sample, given Space Oblique Mercator (SOM) X and Y.

-Copyright

   Copyright (2005), California Institute of Technology.
   U.S. Government sponsorship acknowledged.

-I/O
   
   Given:
   
      mapinfo      MTK map info structure
      somx         SOM X in meters
      somy         SOM Y in meters
   
   the call:
   
      status = MTK_SOMXY_TO_LS( mapinfo, somx, somy, line, sample )
   
   returns:
   
      status         0 on success; otherwise failure
      line           map fractional line (x.0 represents pixel center)
      sample         map fractional sample (x.0 represents pixel center)

-Examples

      ;;
      ;; Set up input parameters
      ;;
      filename    = '../Mtk_testdata/in/MISR_AM1_GRP_ELLIPSOID_GM_P037_O029058_AA_F03_0024.hdf'
      gridname    = 'GreenBand'
      fieldname   = 'Green Radiance/RDQI'
      somx        = 8783500.0
      somy        = 608300.0
      start_block = 10
      end_block   = 15
      status = MTK_FILE_TO_PATH( filename, path )
      status = MTK_SETREGION_BY_PATH_BLOCKRANGE( path, start_block, end_block, region)
      status = MTK_READDATA( filename, gridname, fieldname, region, databuf, mapinfo )
      status = MTK_SOMXY_TO_LS( mapinfo, somx, somy, line, sample )
      
      ;;
      ;; Output...
      ;;
      print, 'file name             : ', filename
      print, 'grid                  : ', gridname
      print, 'field                 : ', fieldname
      print, 'start block           : ', start_block
      print, 'end block             : ', end_block
      print, 'som x                 : ', somx
      print, 'som y                 : ', somy
      print, '================================================='
      print, 'LINE                  : ',line
      print, 'SAMPLE                : ',sample

   IDL outputs:
   
      file name             : ../Mtk_testdata/in/MISR_AM1_GRP_ELLIPSOID_GM_P037_O029058_AA_F03_0024.hdf
      grid                  : GreenBand
      field                 : Green Radiance/RDQI
      start block           : 10
      end block             : 15
      som x                 : 8783500.0
      som y                 : 608300.0
     =================================================
      LINE                  : 50.000
      SAMPLE                : 25.000

-Particulars
   None.

-Required Reading
   For important details concerning this module's function, please refer to
   the MTK routine MtkSomXYToLS.c.

-Version
   -IDL-MTK Version 1.2.0