TsmImportFormat tsmFindImportFormat ( char const *filename ) Works out a import format from the filename
Works out a import format from the filename.This function will try to work out the format of the specified import data file name. This is done based purely upon the extension of the filename. If no filename extension is provided, or if the extension is not recognised, then a result of TSM_IMPORT_UNSUPPORTED will be returned. The following extensions are recognised:
- .img - LAS format DEM/OI data (returns TSM_IMPORT_LAS)
- .raw - raw (lrtb) DEM/OI data (returns TSM_IMPORT_RAW)
- .lrbt - raw (lrbt) DEM/OI data (returns TSM_IMPORT_LRBT)
- .ppm - PPM format (colour) image data (returns TSM_IMPORT_PPM)
- .pgm - PGM format (grayscale) image data (returns TSM_IMPORT_PGM)
Filename extensions are matched in a case insensitive manner, i.e. foo.raw, foo.RAW, and foo.Raw all mean the same image format.