User's Guide

Ingest an ASTER HDF image and output it in LAS format.

Function:

ASTERHDF2LAS ingests an ASTER HDF image from disk and converts it to a LAS image(s). This routine supports Level 1A, Level 1B, Level 2 and Level 3 DEM data.

Parameters:

INFILE
Input ASTER HDF file. The LAS or host (UNIX) file and pathname of the HDF file.

OUT
Output image(s). The output LAS image. The number of images specified in OUT must either be one, equal to the number of bands specified in BANDS, or equal the number of entries in NBANDS. See User Note 1 and User Note 2.

BANDS(-- VALID=(1,2,3N,3B,4,5,6,7,8,9,10,11,12,13,14)
Band number(s). The image bands to be processed. The default indicates that all bands present in the HDF file are processed. See User Note 1.

NBANDS(--)
Defines the number of bands to be placed in each output file. If NBANDS is specified, BANDS must be also specified. Also the number of entries must match the number of entries in OUT. See User Note 1.

WINDOW(--)
Window specification. If UNITS is LS, the window specifies the start line, start sample, number of lines, and number of samples for the window. If only the start line and sample are entered, the number of lines and number of samples will default to the end of the image. NOTE: If the HDF file has multiple resolutions, then the same line and sample values are applied to each resolution. Therefore the output windows for each resolution are the same size but not the same image area. If UNITS is not LS, the window specifies the upper left Y, upper left X, lower right Y, and lower right X coordinates. If the WINDOW is not specified, it defaults to the entire image. If a window is specified, it is applied to all of the bands.

UNITS(LS)
Units used for WINDOW parameter.

  = LS:  Line/Sample
  = DEG: Degrees (Lat & Long)
  = DMS: Degrees Minutes Seconds (Lat & Long)
           (+DDDMMMSSS.SS)
  = PRO: Projection coordinates (Y & X in meters)

Example:

  1. LAS> infile="[sg1.csb.las.asterhdf]pg-pr1b0000-2000070302_190_001" out="out_image"

    The input ASTER HDF image file is pg-PR1B0000-2000070302_190_001 and is located in directory [sg1.csb.las.asterhdf]. All bands that are available for this image are processed, and the entire image is processed. Since this a multi-resolution product, the Visible and Near Infrared bands appears in out_image_vnir.img, the Shortwave Infrared bands appears in out_image_swir.img, and Thermal Infrared bands in out_image_tir.img.

  2. LAS> infile="/sg1/csb/las/asterhdf/pg-pr1b0000-2000070302_190_001" out="out_image" bands=1 2 7

    The input ASTER HDF image file is pg-PR1B0000-2000070302_190_001 and is located in directory /sg1/csb/las/asterhdf/. Since this is a multi-resolution product, bands 1 and 2 are processed and output to out_image_vnir.img and band 7 is processed and output to out_image_swir.img

  3. LAS> infile="/sg1/csb/las/asterhdf/pg-pr1b0000-2000070302_190_001" out="out_image1 out_image2" bands=1 2 7 nbands=2 1

    The input ASTER HDF image file pg-PR1B0000-2000070302_190_001 located in directory /sg1/csb/las/asterhdf/ outputs bands 1 and 2 to the LAS image file out_image1.img. Band 7 is processed and output to out_image2.img.

  4. LAS> infile="/sg1/csb/las/asterhdf/pg-pr1b0000-2000070302_190_001" out="out_image" window=(6200017.604 652244.230 6179607.414 667882.103) units="pro"

    The input ASTER HDF image file pg-PR1B0000-2000070302_190_001 located in directory /sg1/csb/las/asterhdf/ is output to the LAS image file out_image.img. All bands in the input image are processed and all bands are windowed in projection units of upper left corner (line/sample) = 6200017.604/652244.230 and lower right corner (line/sample) = 6179607.414/667882.103

  5. LAS> infile="/sg1/csb/las/asterhdf/pg-pr1b0000-2000070302_190_001" out="out_image" window=(100 200 1000 2000) units="ls"

    The input ASTER HDF image file pg-PR1B0000-2000070302_190_001 located in directory /sg1/csb/las/asterhdf/ is output to the LAS image file out_image.img. All bands that are available for this image are processed according to the lines and samples for each bands resolution. The Visible and Near Infrared bands appears in out_image_vnir.img, the Shortwave Infrared bands appear in out_image_swir.img, and the Thermal Infrared bands in out_image_tir.img. Each output image has a 1000 x 2000 window starting at its starting line of 100 and starting sample of 200.

Description/algorithm

ASTERHDF2LAS ingests an ASTER HDF image and output this image in the LAS format. This system supports Level 1A, Level 1B, Level 2 and the DEM Level 3 ASTER HDF formats.

Nonfatal Error Messages:

  1. [asterhdf2las-file] Error deleting <xxxxx> file

    File <xxxxx> is not deleted. The user needs to delete that file manually.

  2. [asterhdf2las-warn] Error creating history record <xxxxx>

    History file <xxxxx> was not created. Check the preceding error message for the specific error that occurred.

  3. [asterhdf2las-dms] Error converting <xxxxx> from degrees to DMS

    An error occurred while converting <xxxxx> (either standard parallel 1, longitude or latitude), from degrees to DMS. Check the preceding error message for the specific error that occurred.

  4. [asterhdf2las-sys] DATASYS environment variable not set

    The DATASYS environment variable is set to "UNKNOWN".

  5. [asterhdf2las-wind] Starting line < 1, reset to 1

    The starting line from the input WINDOW parameter is invalid. It is reset to 1 and processing continues.

  6. [asterhdf2las-wind] Starting sample < 1, reset to 1

    The starting sample from the input WINDOW parameter is invalid. It is reset to 1 and processing continues.

  7. [asterhdf2las-wind] Window extends past image bounds so the number of lines is reset to stop at the LR corner of the image

    The number of lines is invalid so the lower right corner is reset and processing continues.

  8. [asterhdf2las-wind] Window extends past image bounds so the number of samples is reset to stop at the LR corner of the image

    The number of samples is invalid so the lower right corner is reset and processing continues.

  9. [asterhdf2las-meta] Error retrieving the tag <xxxxx>. The corner coordinates are invalid.

    The tag <xxxxx> (values are either UPPERLEFT, LOWERLEFT, UPPERRIGHT or LOWERRIGHT) was not retrieved. The corner coordinates are set to invalid. Check the metadata and verify that these tags are listed.

  10. [asterhdf2las-warn] Error converting corner coordinates

    The corner coordinates are set to invalid. Check the preceding error message for the specific error that occurred.

  11. [asterhdf2las-meta] Error retrieving the tag INSTRUMENTSHORTNAME. Unable to retrieve the sensor type.

    The SENSOR TYPE field is not updated with the sensor name in the DDR.

  12. [asterhdf2las-meta] Error retrieving the tag <xxxxx>

    The tag <xxxxx> (values are either projectionparameters, product_metadata or mpmethod) could not be retrieved. Check the metadata information and verify that these tags are listed.

  13. [asterhdf2las-file] An error occurred while checking disk for existing output LAS file name

    Existing output file names were not checked. Check the preceding error message for the specific error that occurred.

  14. [asterhdf2las-warn] Error retrieving TIMEOFDAY, capture time will not be added to the DDR

    The acquisition date is not updated in the DDR. Check the metadata information and verify if this tag is listed.

  15. [asterhdf2las-warn] Error retrieving CALENDARDATE, capture date will not be added to the DDR

    The capture date is not updated in the DDR. Check the metadata information and verify if this tag is listed.

  16. [asterhdf2las-meta] Projection name <xxxxx> is unsupported, set projection code to geographic and invalid

    An unsupported projection was retrieved from the metadata. The LAS projection is set to geographic.

  17. [asterhdf2las-warn] Band <xx> is not available for processing

    The user requested to process a band that does not exist in the HDF file.

  18. [asterhdf2las-warn] Error terminating access to Scientific Data Set in <xxxxx>

    There was a problem terminating access to the HDF Scientific Data Set (SD) interface in file <xxxxx>.

  19. [asterhdf2las-warn] Error closing file <xxxxx>

    Unable to close <xxxxx>.

  20. [asterhdf2las-ddr] An error occurred while updating the DDR

    The DDR was not updated and does not contain the metadata information. Check the preceding error message for the specific error that occurred.

  21. [asterhdf2las-name] Error assigning a sensor name

    The SENSOR TYPE field is not updated with the sensor name in the DDR.

  22. [asterhdf2las-warn] Unable to retrieve month from acquisition date

    The acquisition month is not added to the DDR.

  23. [asterhdf2las-warn] Error removing the subdirectory <xxxxx>

    The subdirectory <xxxxx> created by this application was not deleted. The user needs to delete that subdirectory manually.

Fatal Error Messages:

  1. [asterhdf2las-meta] Fatal error encountered

    The error message that is displayed immediately preceding this message is the specific error that occurred. Processing is terminated.

  2. [asterhdf2las-bddr] Error writing to BDDR for file <xxxxx> outfile

    An error occurred while writing the BDDR to disk. Check disk space. If the error persists, contact the system administrator.

  3. [asterhdf2las-wind] Error converting window coordinates

    An error occurred while converting the window coordinates to line/sample. Check the preceding error message for the specific error that occurred.

  4. [asterhdf2las-wind] The starting line <SL> cannot be larger than the number of lines <NL>

    The user specified invalid window values in the WINDOW parameter. Re-specify the WINDOW values and re-run.

  5. [asterhdf2las-file] Error opening filetable.temp

    Check to see if the output file exists and its file permissions.

  6. [asterhdf2las-outs] Error getting output image extension

    The band numbers are used to assign the output extension. Check the metadata for the PROCESSEDBANDS tag and verify the band numbers.

  7. [asterhdf2las-file] Error creating filetable.temp file

    The intermediate filetable.temp file was not created. Check the preceding error message for the specific error that occurred.

  8. [asterhdf2las-meta] Error assigning HDF logical id

    Check the filetable.temp file and verify that the HDF logical id's 10100, 10252, 10308 are listed.

  9. [asterhdf2las-meta] Error retrieving file id

    Check the filetable.temp file and verify if the file id 10308 is listed.

  10. [asterhdf2las-meta] Error retrieving the HDF tag SHORTNAME

    Check the metadata information and verify that the tag SHORTNAME is correct and exists.

  11. [asterhdf2las-meta] Error retrieving the HDF tag PROCESSEDBANDS, band numbers do not exist in the HDF metadata

    Check the metadata information and verify that the tag PROCESSEDBANDS is valid and exists.

  12. [asterhdf2las-band] Error from nonexisting_bands

    An error occurred from the routine nonexisting_bands. Check the preceding error message for the specific error that occurred

  13. [asterhdf2las-name] Error generating data set name

    The tag SHORTNAME is used to generate the data set name. Check the metadata information and verify if this tag is correct and exists.

  14. [asterhdf2las-meta] Error setting projection distance

    The projection distance is set by the band numbers. Check the metadata information for the tag PROCESSEDBANDS and verify that it exists and is valid.

  15. [asterhdf2las-name] Error retrieving output file name

    An error occurred in the routine final_output_names. Check the preceding message for a specific error that occurred.

  16. [asterhdf2las-meta] Error reading image information from file <xxxxx>

    Check the file permissions for the HDF file <xxxxx>.

  17. [asterhdf2las-file] File <xxxxx> already exists

    The output file <xxxxx> already exists. Either delete the file or re-specify the OUT parameter name.

  18. [asterhdf2las-type] HDF image contains the HDF data type <xxxxx> which is not supported by this routine

    This data type is not supported.

  19. [asterhdf2las-meta] Error retrieving <xxxxx> metadata

    An error occurred while retrieving the <xxxxx> metadata. Check the preceding for a specific error that occurred. The values of <xxxxx> are either Level 1, Level 3 DEM or Level 2.

  20. [asterhdf2las-par] Band <xx> can only be specified once

    The user entered the same band more than once. Re-specify the BANDS parameter.

  21. [asterhdf2las-par] The sum of NBANDS must equal the total count of BANDS

    Double check the NBANDS and BANDS. Since NBANDS groups the specified BANDS into groups, the sum of all the groupings in NBANDS must equal the total number of BANDS.

  22. [asterhdf2las-par] The count of OUT must equal the count of NBANDS

    Double check the OUT and NBANDS parameters. There must be an output file specified for each of the values in NBANDS.

  23. [asterhdf2las-par] WINDOW specification must have 4 values

    If the UNITS field is either DEG, DMS or PRO then the WINDOW parameter must have 4 values.

  24. [asterhdf2las-par] WINDOW specification must have 2 or 4 values

    If the UNITS field is LS then the WINDOW parameter must have either 2 or 4 values.

  25. [asterhdf2las-wind] Error encountered while verifying window parameters

    An error occurred while converting the window parameters. Check the preceding message for a specific error.

  26. [asterhdf2las-alloc] Error allocating dynamic memory

    There was an error allocating memory for the data buffers. If the error persists contact the system administrator.

  27. [asterhdf2las-open] Error opening output image <xxxxx>

    An error occurred while opening the output file <xxxxx>. Check the output file name and the file permissions.

  28. [asterhdf2las-wind] Error writing to <xxxxx>

    An error occurred while writing the DDR to disk. Check disk space. If the error persists, contact the system administrator.

  29. [asterhdf2las-ddr] DDR for <xxxxx> does not exist

    An error occurred while retrieving the DDR file. Check if the DDR file exists on disk and check the file permissions.

  30. [asterhdf2las-parm] Error parsing the TAE parameter block

  31. [asterhdf2las-file] Error opening file <xxxxx>

    An error occurred while opening the HDF file <xxxxx>. Check the input HDF file name and the file permissions.

  32. [asterhdf2las-del] Error deleting the file <xxxxx>

    An error occurred while deleting the output file <xxxxx> which was created by this application. Check the output file permissions.

  33. [asterhdf2las-proj] Projection code is invalid

    Check the projection code in the HDF metadata The supported projections are either GEO, UTM, LAMCC, PS, EQRECT or SOM.

  34. [asterhdf2las-del] Error removing the .img file <xxxxx>

    The DELFLG was set to "YES" and this application was unable to delete the output .img file. The file need to be deleted manually. Check the permissions of the .img file.

  35. [asterhdf2las-meta] Error retrieving file attribute productmetadata

    An error occurred while trying to retrieve the file attribute name which is used to retrieve projection information. Contact the LAS administrator.

  36. [asterhdf2las-dir] Error creating subdirectory <xxxxx>

    An error occurred while trying to create the subdirectory <xxxxx> which is used to store the temporary files created by this application. Check disk space and permissions.

User Notes:

  1. The parameters BANDS, NBANDS, and OUT are related to each other. OUT specifies the output file names to use, BANDS indicates which bands should be taken from the input image, and NBANDS indicates the number of entries in BANDS that should be grouped into each OUT file specified. For example, if BANDS=(1,3,2,4) and NBANDS=(2,1,1), OUT must contain three file names (to match the number of entries in NBANDS) and the first output file will contain bands 1 and 3, the second band 2, and the third will contain band 4. If NBANDS is specified, BANDS must be specified and the number of bands in BANDS must equal the sum of the bands in NBANDS. If NBANDS isn't specifed, OUT must contain a single file name.

  2. During the process of ingesting data, unique file names are generated to accommodate multiple resolutions. If multi-resolution bands are being processed in the output product, the bands must be separated into the different resolutions. The file names are generated by attaching "_vnir" for Visible and Near Infrared bands 1, 2, 3N and 3B. Attach "_swir" for Shortwave Infrared bands 4, 5, 6, 7, 8, 9. And "_tir" for Thermal Infrared bands 10, 11, 12, 13, and 14, to the output LAS image file name.