:: Chapter 03 - AsterDTM batch job operation

 

 

AsterDTM allows you extract DTM's in a non-interactive way, thus permitting the processing of a large number of ASTER image in batch. The command structure is very similar to ENVI's programming routines, with one command and a couple of keywords to define the processing parameters.

ASTERDTM_DOIT

Calling sequence:

ASTERDTM_DOIT

Keywords:

CORR_FID (optional)

Use this keyword to specify a named variable that will contain the file ID for the resulting output cross correlation file. This file ID can be used to access the processed data programmatically for subsequent processing.

 

DIMS

Use this keyword to specify the spatial subset to be used for the DTM extraction and orthocorrection. DIMS is a five-element array of long integers with the following definitions (identical to the ones used in ENVI programming routines:

o DIMS(0): Unused for this function, set to -1.
o DIMS(1): The starting X pixel. (The first pixel is number zero.)
o DIMS(2): The ending X pixel.
o DIMS(3): The starting Y pixel. (The first pixel is number zero.)
o DIMS(4): The ending Y pixel.

In case the dimensions defined by DIMS exceed the dimensions of the input ASTER image, then the ASTER input image dimensions are used instead. If the ASTER image is a level 1A image, then DIMS is being applied to the 1A->1B corrected file, not to the raw 1A file.

 

DIRECTORY

Use this keyword to specify a directory path, to process all ASTER 1A and/or 1B HDF files contained in this directory, or recursively in this directory and all subdirectories.

AsterDTM will automatically identify all valid ASTER 1A and 1B in this directory, and derive the output filenames from the input ASTER file name:

OUT_DEMNAME = input file name + "_DEM"
OUT_DEMNAME = input file name + "_DEM"
OUT_CORRNAME = input file name + "_CORR"
OUT_1Ato1BNAME = input file name + "_1Ato1B"
OUT_ORTHONAME = input file name + "_ORTHO"

If you use the keyword DIRECTORY then the keywords FNAME, OUT_DEMNAME, OUT_CORRNAME, OUT_1BNAME, and OUT_ORTHONAME will be ignored. If the DIMS, DTM_PIXSIZE or DTM_NODATA keywords are set, then these settings will be applied to all ASTER input files.

Specify the complete directory path to search for ASTER 1A and 1B files in this directory only; add the "*" symbol to extend search to the whole subdirectory tree, starting from DIRECTORY (see examples below).

 

DTM_FID (optional)

Use this keyword to specify a named variable that will contain the file ID for the resulting output DTM file. This file ID can be used to access the processed data programmatically for subsequent processing

 

DTM_PIXSIZE_TYPE (optional)

Use this keyword to define the output pixel size for the extracted DTM. Valid values are 0 , 1 and 2 resulting in pixels sizes of 60 m, 30 m and 15 m respectively. The output correlation matrix will have the same pixel size as the DTM.
Default pixel size type is 1 ( 30 meters ).

 

DTM_NODATA_VALUE (optional)

Use this keyword to define the data value assigned to pixels where no elevation value could be extracted. Valid values are integer.
Default nodata value is -9999 .

 

EXTENDED (optional)

Use this keyword to select the extended correlation analysis mode. In this mode, the number of internal tie points for the first three steps in the correlation analysis is doubled, and in the final step low correlation results are reprocessed with a larger elevation range in order to account for steep slopes in the terrain. The extended mode can take significantly more time to process, especially in the presence of large areas of low correlation (f.i. water, snow fields, sand dunes etc.).

 

EXT_DTMNAME (optional)

Use this keyword to define the input file name for an external digital elevation file to be used in the extraction process (f.i. GTOPO30, SRTM data etc.). For any input ASTER file specified either through the FNAME keyword or through the DIRECTORY keyword, AsterDTM will check for any overlapping areas and apply the external DTM when possible, according to the rules and conditions described in "Options Menu -> select external DEM".

 

FNAME

Use this keyword to define the input ASTER 1A or 1B file name. The file has to be in the HDF format (HDF 4.0).

This keyword is being ignored when the DIRECTORY keyword is present.

 

NORTH_ORIENTED (optional)

Use this keyword to have all output images (DTM, correlation image, orthocorrected bands) be rotated to north orientation prior to being output to disk. This allows f.i. for automatic mosaicing of DTM output results from several ASTER images, which is not possible with the default orbit oriented output files. The default value for this keyword is NORTH_ORIENTED=0 (output files orbit oriented).

 

O1Ato1B_FID (optional)

Use this keyword to specify a named variable that will contain the file ID for the resulting output corrected 1A->1B file. This file ID can be used to access the processed data programmatically for subsequent processing.

The keyword is being ignored if the input ASTER file is not level 1A .

 

ORTHO_FID (optional)

Use this keyword to specify a named variable that will contain the file ID for the resulting output orthocorrected file. This file ID can be used to access the processed data programmatically for subsequent processing.

The keyword is being ignored if the keyword OUT_ORTHONAME is undefined .

 

OUT_DTMNAME

Use this keyword to define the output file name for the resulting digital elevation model.

This keyword is being ignored when the DIRECTORY keyword is present.

 

OUT_CORRNAME (optional)

Use this keyword to define the output file name for the resulting cross correlations array.

This keyword is being ignored when the DIRECTORY keyword is present.

 

OUT_1Ato1BNAME (optional)

Use this keyword to define the output file name for the resulting 1A->1B corrected image. If this keyword is undefined and the input ASTER image is level 1A then a temporary 1A->1B file is created, and deleted after processing is completed.

This keyword is being ignored when the DIRECTORY keyword is present.

 

OUT_ORTHONAME (optional)

Use this keyword to define the output file name for the resulting orthocorrected VNIR file. The orthocorrection is applied to the VNIR bands 1,2 and 3N in the case of a level 1B image, and to the 1A->1B corrected image in the case of a level 1A input image. If this keyword is undefined then orthocorrection is not executed.

This keyword is being ignored when the DIRECTORY keyword is present.

 

OUT_ORTHO_SWIRNAME (optional)

Use this keyword to define the output file name for the resulting orthocorrected SWIR file. The orthocorrection is applied to the original SWIR bands in the case of a level 1B image, and to the 1A->1B corrected SWIR bands in the case of a level 1A input image (please mind the RADIANCE keyword to define whether the output pixel values are converted to radiance, or not). If this keyword is undefined then orthocorrection is not executed.

This keyword is being ignored when the DIRECTORY keyword is present.

 

OUT_ORTHO_TIRNAME (optional)

Use this keyword to define the output file name for the resulting orthocorrected TIR file. The orthocorrection is applied to the original TIR bands in the case of a level 1B image, and to the 1A->1B corrected TIR bands in the case of a level 1A input image (please mind the RADIANCE keyword to define whether the output pixel values are converted to radiance, or not). If this keyword is undefined then orthocorrection is not executed.

This keyword is being ignored when the DIRECTORY keyword is present.

 

RADIANCE (optional)

Use this keyword to have the orthocorrected output pixel values be converted to radiance, by means of the calibration parameters provided in the ASTER HDF file. When set (RADIANCE=1), this keyword applies to all orthocorrected output results. The default value is RADIANCE=0 .

 

WATER_FLAG (optional)

Use this keyword to define the automatic processing of water bodies. When set, (WATER_FLAG = 1) then the resulting correlation image is segmented, and low correlation areas which fulfill the criteria imposed by the WATER_MINPOPULATION, WATER_MAXCORRVAL and WATER_MAXIMGVAL keywords are set to the border elevation in the resulting DTM output image. Please mind that other than in the interactive module, the default value for the WATER_FLAG is zero (automatic processing disabled).

 

WATER_MINPOPULATION (optional)

Use this keyword to define the minimum area necessary in the segmented correlation image to constitute a water body. The WATER_FLAG keyword has to be set, in order for this keyword to take effect. The default value for WATER_MINPOPULATION is 1000 [pixels in the VNIR 3N band], corresponding to 15,000.00 m2.

 

WATER_MAXCORRVAL (optional)

Use this keyword to define the maximum threshold in the correlation image to constitute a water body. Only correlation values less then or equal to this threshold are used in the subsequent segmentation process (water, due to it's uniformity, gives in general a very low correlation signal). The WATER_FLAG keyword has to be set, in order for this keyword to take effect. The default value for WATER_MAXCORRVAL is 50 (possible values range from 1 to 100).

 

WATER_MAXIMGVAL (optional)

Use this keyword to define the maximum threshold in band 3N (VNIR) of the input ASTER image to constitute a water body. Only pixels with DN's less then or equal to this threshold are used in the subsequent water body detection process. The WATER_FLAG keyword has to be set, in order for this keyword to take effect. The default value for WATER_MAXIMGVAL is 40 (possible values range from 0 to 255).

 

EXAMPLE:

This examples defines several calls to AsterDTM_doit (please change
Directory separator to '/' for unix systems) :

pro example_asterdtm_doit

; process all aster 1a and/or 1B images in directory d:\data
; set nodata value to -999, and output pixels size to 60 m

asterdtm_doit,directory = "d:\data",dtm_pixelsize_type = 0,$
dtm_nodata_value = -999

; process all aster 1a and/or 1B images in directory
; e:\asterdata and recursively in all subdirectories

asterdtm_doit,directory = "e:\asterdata\*"

; extract DTM for ASTER file MyAsterFile for a 700*800 spatial
; subset, and provide the file id's for the extrated DTM and the
; correlation matrix for further processing

dims = long([-1,1300,1999,2000,2799])

asterdtm_doit,fname = AsterName, dims = dims,$
out_dtmname = "dtm_output",out_corrname = "corr_output",$
dtm_fid = dtm_fid, corr_fid = corr_fid


end

.........................................................................