int tsmAllocReadTile ( TsmConnection connect, int tx, int ty, int lev, uchar **buffer )

Gets a single tile from a dataset

Documentation

Gets a single tile from a dataset.

This function performs the same action as tsmReadTile, except that it allocates the memory for the tile buffer inside the function. You must therefore pass a pointer to the tile buffer pointer, so that the allocated memory address can be filled in for you. You free the memory that has been returned using the tsmFreeTileBuffer function as usual.

Using this function allows for future internal extensions to tsmApi that can efficiently cache a number of tile buffers for you to use in a threaded application.

You can set the TSM_DONT_READ_TILES setting to TRUE using tsmSet and this function will perform no disk or network access. This may be useful for assessing your application's computational overhead.

Returns:
TRUE if successful, FALSE if error occurred (buffer also == NULL).
Parameters:
connect - the dataset connection to read from.
tx - the x-coordinate of the tile to retrieve.
ty - the y-ccordinate of the tile to retrieve.
level - the level of the pyramid to retrieve from.
buffer - a pointer to a pointer which is filled in by the function
Author:
Martin Reddy
Version:
5 March 1998
See Also:
tsmReadTile, tsmFreeTileBuffer


TSMAPI_RELEASE 2.1 - Release Date: 2001/01/10 19:01:12

Back to tsmApi Home Page