int tsmReadNextTile ( TsmConnection connect, TsmTileHeader *tileHeader, uchar *tileBuffer )

Read the next tile from server

Documentation

Read the next tile from server.

Once you have built a tile request list and sent it to the server, you can then use this function to read in each tile as it is served to you. Note that these may not be received in the same order that you requested them so you should always check the tile header to find out which tile you have received.

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.

If you have started logging using the tsmBeginLogging call, then this function will automatically generate a TV_TILE_READ event to the log file for the requested tile.

If the specified connection is an http dataset, then there must be a /cgi-bin/get_http_tile CGI program available on that server. tsmApi will send a request to this CGI script for the specified tile.

By default, this function will return a value of TSM_NODATA if there are no more tiles to be read. However, if you specified the TSM_PARAMS_BLOCKING_READ connection parameter to tsmConnect, then this function will block until a new tile has been requested in another thread. That is, if you have requested blocking reads, then you should never get a TSM_NODATA return code.

This function will set the tile_id field of the passed tile header so that it is unique for the specified (x,y,level) tuplet. This will be unique for 0 <= levels < 64, 0 <= x < 4095, 0 <= y < 4095.

Returns:
TRUE if all went well, FALSE if something nasty happened, or TSM_NODATA if we have read all tiles that were requested and we are not doing read blocking.
Parameters:
connect - the dataset connection structure
tileHeader - the allocated header to write the tile data into
tileBuffer - the allocated buffer to write the tile data into
Author:
Martin Reddy
Version:
13 January 1998
See Also:
tsmTileReqBegin, tsmSet, tsmAllocTileHeader, tsmAllocTileBuffer


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

Back to tsmApi Home Page