TsmConnectionParams tsmParseReadArgs ( int argc, char **argv ) Create a set of read connection hints from command line
Create a set of read connection hints from command line.This function can be used to allow your programs to support a number of standard command line arguments for specifying preferences for opening a read connection.
The function will scan the provided command line looking for any supported arguments. It will build a TsmConnectionParams structure based upon the options that it finds and return this to you the client. This TsmConnectionParams structure can then be passed directly to tsmConnect when opening a connection.
You should free the memory used by the TsmConnectionParams structure when you are finished with it by calling tsmFreeParams().
For example, if this function finds an option called "-readjpeg" on the command line, it will insert an entry into the TsmConnectionParams structure to ask for a JPEG dataset. So when you use tsmConnect with this set of hints, it will try to open a JPEG version of the dataset.
The currently supported options that this function recognises are:
- "-readlrbt" = try to read a raw lrbt-raster version of the dataset
- "-readjpeg" = try to read a jpeg-compressed version of the dataset
- "-readtiffs" = try to read local tile data in TIFF format
- "-readrawtiles" = try to read local tile data in old .tile format
- "-readsetid" = try to read the DPSS set with this Set ID.
- "-readexact" = if cannot find exact dataset, then fail. Otherwise tsmApi will try to find another version of dataset.
- "-dontvalidatetspec" = by default we check the fields of a tspec file when loaded to see if valid. This option will disable those tests.