void tsmSet ( TsmConnection connect, TsmSetting setting, ... ) Set a connection variable
Set a connection variable.The tsmSet function lets you change various characteristics of a connection. These can be use to control things such as the format of data to write tiles to, the JPEG compression quality, etc.
This function uses varargs for the actual parameter value so that you can pass in values of any time. This does mean however that you should be careful to supply a value of the correct type for the parameter code that you specify, e.g. tsmSet( c, TSM_JPEG_QUALITY, 50 ) because TSM_JPEG_QUALITY is expecting an int.
The following settings can be modified for a connection. The type of the third parameter specifying the value is given in square parentheses.
- TSM_DONT_READ_TILES: A value of TRUE means that the tsmReadTile and tsmReadNextTile functions will not make any disk/network access (and hence not read the tile data). This allows programs to test all overhead and computation without doing any I/O. (default = FALSE) [int]
- TSM_JPEG_QUALITY: A value between 5 and 100 (inclusive) that specifies the JPEG quality percentage used when compressing tiles to JPEG, i.e. 100% means highest quality but largest file size. (default = 75) [int]
- TSM_PROGRESS_METER: TRUE means that you want to have tsmApi display a progress meter for operations that take a potentially long time, e.g. tsmCopyLevelTiles, tsmCopyAllTiles, tsmCreateLevelTiles, tsmCreateAllTiles, etc. Use a value of FALSE to keep these routines silent. (default = TRUE) [int]
- TSM_METADATA_URL: This token requires a string that contains a URL for a tspec file to be used for a DPSS dataset. Doing a tsmSet(c,TSM_METADATA_URL,"...") call *adds* the specifed URL to a list of URLs associate with the dataset. So you can make multiple calls to provide multiple URLs. Note that this setting is only used when writing a new DPSS dataset. (default = <empty list>) [char *]
- TSM_FINISH_LOAD_ON_DISCONNECT: If this value is set to TRUE then whenever you create a new DPSS dataset, that set will be marked as loaded when you do a tsmDisconnect. If you set this value to FALSE, then the set is left open and you can continue loading tiles during another session if you connect to the set specifying its set-id. (default = TRUE) [int]
- TSM_REQUEST_TIMEOUT: This will set the current timeout (secs) that is used between sending a request list to a DPSS. That is, a value of 2.0 means that a request list will be sent to the DPSS only once every 2 seconds, no matter how often you call tsmTileReqEnd. If you specify a timeout < 0, then the value will be clamped to 0.0. This setting applies only to DPSS connections.