Utility to convert an ASCII DDR file to binary format.
Converts an ASCII DDR file to binary format.
- INFILE
- Name of the input ASCII file to convert to a DDR. If the file does not exist (or ascii2ddr does not have permission to read this file), it will append a ".prt" extension to the given filename and attempt to access that file. This is done because .prt is the default extension dspddr puts on its output ASCII files (and the files converted by ascii2ddr must be created by running dspddr on a normal DDR file).
- OUT
- Output DDR file. This is the name to give the binary DDR file being created.
ASCII2DDR will parse the contents of the test.txt file, retrieving the information that is needed to create a binary DDR file. The values are validated and modified, if needed, to conform to the format of the binary DDR file. The ddr1.ddr file will then be created.
ASCII2DDR will first check if the file test, in the working directory, has read access. If it does not, it will next check if the file test.prt, in the working directory, has read access. If one of those is found to exist and allow itself to be read, ASCII2DDR will parse the contents of the test[.prt] file, retrieving the information that is needed to create a binary DDR file. The values are validated and modified, if needed, to conform to the format of the binary DDR file. The ddr2.ddr file will then be created.
ASCII2DDR parses an ASCII DDR file, retrieving the values from each DDR and Band DDR field. The values are checked for validity. If any critical fields are found to contain an invalid value, the application will terminate with a fatal error message. Noncritical fields found to contain an invalid value will be dealt with appropriately with warning messages issued to notify the user of the changes made. The DDR values from the ASCII file are placed into a DDR structure and the Band DDR values are placed into BDDR struture(s). When the ASCII DDR file has been parsed completely, the DDR structure and BDDR structure(s) will be used to create the binary DDR file.
The indicated band number (<xx>) is not valid. This will cause the band record <yy> to be skipped and not included in the output DDR file.
The number of bands as indicated by the "NB" field at the beginning of the DDR file does not match the actual number of band records found in the file.
A fatal error has already occurred and an error occurred when closing the ASCII DDR file.
The cleanup routine was executed and all files created by ascii2ddr are being deleted. This occurs either due to a fatal error during processing or due to the user manually halting the application.
The acquisition date retrieved from band record <xx> is not in the LAS DDR date format (dd-mmm-yy).
The acquisition time retrieved from band record <xx> is not in the LAS DDR time format (hhmm:ss).
Either the line or sample increment value was invalid. To indicate this, their validity flag has been changed to INVALID and the increment value that was invalid was reset to 1.0.
The specified ascii ddr file was not found to exist on disk or it was not readable. ascii2ddr appended the ".prt" extension to the file name and was able to access that file; this is the file that will be converted.
The indicated DDR field (<xxxxxxx>) value was invalid. To indicate this, its validity flag has being changed to INVALID. This message will apply to those 8 DDR fields that have validity flags as well as to the BDDR min/max intensity values. The band indication will only be listed when indicating a min/max intensity value was found invalid. In that case, the <yy> represents which band contained the invalid value.
The last modified date and time could not be updated properly. The attempt made to update these values using c_lused failed. Check the preceding error message for the specific error that occured.
The indicated string field (<xxxxxxx>) was longer than the maximum string length allowed by the DDR or BDDR structure. The string has been truncated to the indicated number of characters (<yyy>). The band indication will only be listed when indicating a string value in a band record was too long. In that case, the <zz> represents which band contained the string.
The master line value was invalid. Its value has been reset to 1.
The master sample value was invalid. Its value has been reset to 1.
The minimum intensity value was found to be invalid. Therefore, the validity flag is already going to be INVALID, so there is no point in validating the maximum intensity value. The <xx> represents which band record contained the invalid value.
The intensity values have been validated and the maximum value was determined to be less than the minimum value. To indicate this, their validity flag has been changed to INVALID. The <xx> represents which band record contained the invalid values.
The indicated Band DDR field's (<xxxxxxx>) validity flag was not valid and is therefore being set to UNKNOWN (rather than INVALID because that is not a recognized validity flag value for the Band DDR flags).
The indicated DDR field's (<xxxxxxx>) validity flag was not valid and is therefore being set to INVALID.
The projection code was invalid, hence it is impossible to validate the
projection parameters. The projection parameters and their validity flag
will be copied to the output DDR unmodified.
An error occurred while parsing band record #<zz> for the value of field <xxxxx>. The field value has been set to the value indicated by <yyyyy>.
An error occurred while parsing the ASCII DDR file for the value of field <xxxxx>. The field value has been set to the value indicated by <yyyyy>.
The indicated DDR field's (<xxxxxxx>) validity flag was not valid. This message will apply to those 8 DDR fields that have validity flags as well as to the BDDR min/max intensity values' validity flags. The band indication will only be listed when indicating a min/max validity flag is invalid. In that case, the <yy> represents which band contained the invalid flag.
There was an error allocating memory for the band ddr structures. If the error persists, contact the system administrator.
The appropriate band ddr structure was not found for placing the indicated band number's band record into. Possible memory corruption could have occurred. Contact LAS support.
Unable to close the ASCII DDR file.
An EOF was reached before all the band records could be retrieved. The same number of band records is expected to be in the file as is indicated by the "NB" field at the beginning of the DDR file.
The file specified for the output DDR already exists. Either remove the file and re-run the application or specify a different output file name.
A fatal error occured durring processing. Check the preceding error message for the specific error that occured.
An error occurred while attempting to create the full host path name for the file specified in parameter OUT. Verify any path specification is correct and check directory permissions.
An error occurred while attempting to retrieve the parameter INFILE. Verify that the file exists on disk and check the file permissions.
This indicated critical field value is invalid. The DDR will be useless without this value, so processing has been aborted.
An error occurred opening the input ASCII DDR file for reading. Check the file name and file permissions.
An error occurred while retrieving the critical DDR field values (those that must be valid or else the application exists with a fatal error). Check the preceding error message for the specific error that occurred.
An error occurred while retrieving the non-critical DDR field values. Check the preceding error message for the specific error that occurred.
An error occurred while retrieving the Band DDR field values. Check the preceding error message for the specific error that occurred.
A general read error occurred while trying to read the next line from the DDR file. Verify the file is in the proper format (that format used by dspddr). This error could be a result of EOF being reached prematurely.
The signal handler routine could not be setup properly. The attempt made to set these using c_install_cleanup_handler failed. Check the preceding error message for the specific error that occured.
An error occurred while writing to the output DDR file. Check disk space. If the error persists, contact the system administrator.