int tsmCreateTspec ( TsmConnection connect, TsmTspecParams params, TsmTileParams tile_params, int write_tspec ) Create a new tspec file from scratch
Create a new tspec file from scratch.This function will create a new tspec file for a dataset and write this out to disk. All of the information that is required to create the tspec structure is provided in the TsmTspecParams structure. This structured should first be initialised with the tsmInitTspecParams call, and then its fields should be filled out to describe the new dataset, e.g. the pixel width and height of the source image, the georeferencing information, etc.
If the parameter write_tspec is set to TRUE, then this function will create the tspec structure for the connection and then write this out to the dataset. If this parameter is FALSE, then the tspec file is not written out but it is inserted into the connection handle so that it can be retrieved with tsmGet, and manually written to disk using the tsmWriteTspec function.
This function will create an OI dataset tspec if you set the params->dataset_type field to TSM_IMAGE_DATASET, and it will create a DEM dataset tspec if you set this field to TSM_DEM_DATASET. If you don't set this field at all, then the value will be taken from the connection handle (if it has been defined).
Please refer to the documentation page on TsmTspecParams to discover all of the fields that you can set for this function.
Currently we only support the UTM coordinate system for georeferencing information. This is provided as the easting/northing/zone of the lower-left corner of the dataset.