int tsmTileReqAdd ( TsmConnection connect, int tx, int ty, int level, int priority )

Add a tile to the request list

Documentation

Add a tile to the request list.

In order to support the asynchronous receipt of terrain tile data over a network, we use a model whereby we built a request list of tile data, send that list, and then use the new tile data as it is received from the server. This model can of course be easily applied to local disk access also.

We build the request list by making a call to tsmTileReqStart, then making multiple calls to tsmTileReqAdd to specify all of the tiles that we want to receive, then we call tsmTileReqEnd.

Once we have called tsmTileReqEnd then we can start reading in the tiles as they are received (trivial from local disk!) by calling a function such as tsmReadNextTile.

N.B. if you request a tile that does not exist in the dataset, then the function will not add it to the request list, but it will still return a value of TRUE (so that we don't trip a complete failure).

There is a maximum number of requests that can be added to the request list. This is imposed by the DPSS implementation which can only handle request lists up to a compiled-in fixed size. This maximum request list size is defined by TSM_MAX_NUMREQS. If you request more tiles than this value in one list, then this function will fail with a FALSE return code. If this happens, you should investigate breaking up your tile requests into small chunks.

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

Returns:
TRUE if operation successful, FALSE if an error occurred
Parameters:
connect - a dataset connection structure
tx - the x-coordinate of the tile to request
ty - the y-coordinate of the tile to request
level - the level of the pyramid to request the tile from
priority - one of: TSM_NOW, TSM_NEVER, or TSM_LATER
Author:
Martin Reddy
See Also:
tsmTileReqBegin, tsmTileReqEnd, tsmReadNextTile.


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

Back to tsmApi Home Page