void tsmSetParam ( TsmConnectionParams params, TsmParamCode param_code, ... ) Set a connection param field
Set a connection param field.The connection params structure is an extensible means to provide optional hints to tsmConnect. These are used to specify a continuum from the specific dataset you want to open to general properties about a dataset that you are looking for.
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. tsmSetParam( p, TSM_PARAM_SETID, 69 ) because TSM_PARAM_SETID is expecting an int.
You must call tsmInitParams before calling this function.
Currently you can set the following optional hints. The type of the third parameter specifying the value is given in square parentheses.
- TSM_PARAM_SETID: the set ID of a dataset on a DPSS. This fully qualifies the dataset so no other hints are required if you supply this hint. [int]
- TSM_PARAM_SERVERS: you can specify a list of server names that are used by the dataset on a DPSS. You supply server names one at a time, i.e. multiple tsmSetParam calls are required to define multiple server names. [char *]
- TSM_PARAM_FORMAT: you can specify the image format that you want the dataset to be in. This can be: TSM_LRBT_FORMAT or TSM_JPEG_FORMAT. [int]
- TSM_PARAM_TIFF: if you are opening a localdisk dataset, then you can use this hint to specify whether you want to read (or write, if opening a write connection) raw .tile format tiles (FALSE), or the blocked .tiff format tiles (TRUE). [int]
- TSM_PARAM_VALIDATE_TSPEC: if this is TRUE, then whenever the tspec file is loaded for the connection, the tsmApi will validate it (with tsmValidateTspec) to see if it contains any potential errors. If you set this value to FALSE, then the validate routine is by-passed (TRUE). [int]
- TSM_PARAM_FALLBACK: this hint lets you specify what should be done if your specified dataset does not exist. If this value is TRUE, then tsmApi will attempt to find another version of the same dataset for you to use. If this value is FALSE, then tsmApi will immediately fail if the requested dataset is not available. [int]
- TSM_PARAM_NEW_TSPEC: this hint controls the reading of tspec data from localdisk. If this value is set to TRUE, then tsmConnect will try to load the tiles.tspec single-file tspec. If this value is FALSE, then the old multi-file tspec format will be used. [int]
- TSM_PARAM_DPSS_TSPEC: controls the reading of tspec data from a DPSS. If this value is set to TRUE, then tsmConnect will try to load the tspec file from the DPSS dataset itself. If this value is FALSE, then the various metadata URLs associated with that set are tried to see if they lead to a valid tspec file. [int]
- TSM_PARAM_BLOCKING_READ : if set to TRUE, tsmReadTile will block if there are no tiles to read. It will unblock once you have requested new tiles, i.e. in a different thread. If you use blocking reads, then make sure that you have a separate reader thread for each connection. The default is FALSE. [int]
- TSM_PARAM_REQUEST_CHECK : if set to TRUE, tsmReqTileAdd will insert a tile request only once per request list no matter how many times it is requested.
- TSM_PARAM_VRML_DIR: directory where this dataset will be written to. If you supply a trailing '/', then it will be stripped. [char *]
- TSM_PARAM_TEX_URNS: URN of terrain texture map (multiple instances allowed) [char *]
- TSM_PARAM_LCS: start of local coordinate system in meters (multiple instances allowed) [double]
- TSM_PARAM_NUM_POLYS: per side on a vtile [int]
- TSM_PARAM_NUM_LODS: number of lods in one tree file [int]
- TSM_PARAM_TREE_SKIP: levels to skip between tree files [int]
- TSM_PARAM_GAUSSIAN: use gaussian elevation interpolation instead of linear (TRUE or FALSE) [int]
- TSM_PARAM_COLLISION: turn on collision detection for VRML geometry (TRUE or FALSE) [int]
- TSM_PARAM_TEST_VTILES: create flat, randomly-colored vtiles (TRUE or FALSE) [int]
- TSM_PARAM_START_LEVEL: TV start pyramid level (def=lowest-res) [int]
- TSM_PARAM_END_LEVEL: TV end pyramid level (def=highest-res) [int]
- TSM_PARAM_TEXEL_SCALE: scale for LOD range calc (def=1.0) [double]
- TSM_PARAM_ELEV_SCALE: scale for elevation vs. lat/long (def=1.0) [double]
- TSM_PARAM_WORLD_SCALE: scaling factor for the entire world (def=1.0) [double]
- TSM_PARAM_TREE_TYPE: there are a number of ways to generate the VRML tree files. Currently you can choose between TSM_TREE_TYPE_ANCHOR (default), TSM_TREE_TYPE_LOD, or TSM_TREE_TYPE_QUADLOD. [int]
- TSM_PARAM_FLAT: creates a flat world model (in lat-long coordinates), flat UTM coordinates, or a globe (in geocentric coordinates) (TSM_FLAT_VTILES, TSM_UTM_VTILES, or TSM_GEOCNTRC_VTILES) [int]
- TSM_PARAM_GEOTILES: generates geotiles files for the tree hierarchy if this value is set to TRUE (default), otherwise the tree files link directly to the vtile files. (TRUE or FALSE) [int]
- TSM_PARAM_NORMALS: generates per vertex normals for the vtiles if this value is set to TRUE (default), otherwise the vtiles will look flat shaded (not gouraud). (TRUE or FALSE) [int]
- TSM_PARAM_FAST_BBOXES: when set to TRUE we use a faster bounding box calculation routine for tree files that is approximate but conservative. By default, we do a much slower check of every single vertex in a tile to compute the bounding box. (TRUE or FALSE) [int]
- TSM_PARAM_VRML_URL: defines the absolute root URL for VRML files. If you supply a trailing '/', then it will be stripped. [char *]
- TSM_PARAM_INCLUDE_VTILES: includes the vtiles directly in the tree file.
- TSM_PARAM_ROOT_LEVEL: specifies the root level number for a tree hierarchy. The p0p0.wrl tree file at that level is defined as the entry point for viewing the hierarchy. The default value is 2, i.e. trees/2/p0p0.wrl is the default entry point. [int]
- TSM_PARAM_FULL_DPSS_READ: this parameter is currently only used by the tsmUpdateDatabaseFromServer call. When set to TRUE, it will perform a full re-read of any DPSS server. Otherwise, we only update information for datasets that have a loaded date that is later than the last time the server was read.