COPYING DATA
Copying datasets, or parts of datasets, from one place to another is quite a common task. tsmApi therefore provides a number of useful routines to make this easier for you.
Datasets are composed of two separate pieces of information: the raw data (tiles), and the information describing that data (the tspec file, or files). So tsmApi provides you with routines to copy tile data as well as the tspec data for a dataset.
In order to use these functions, you will have to open two connections. One connection is to the dataset you wish to read data from, the other connection is to the dataset you wish to copy (write) the data to. The following copying functions are provided:
input = tsmConnect( input_url, "r", NULL ); output = tsmConnect( output_url, "w", NULL ); tsmCopyTspec( input, output ); tsmCopyAllTiles( input, output ); tsmDisconnect( input ); tsmDisconnect( output );
Martin Reddy,
<reddy@ai.sri.com> /
Yvan Leclerc,
<leclerc@ai.sri.com>
Last modified: Wed Aug 23 00:45:33 PDT 2000