int tsmExtractTsmAndPyramidName ( const char *path, char *base, char *pyramid )

Extract the DSM and Pyramid name from a URL

Documentation

Extract the DSM and Pyramid name from a URL.

Takes a filename (or URL) for a pyramid directory and splits this into two components: the base DSM pathname (i.e. the bit up to the "Pyramid" part of the filename), and the pyramid name (i.e. the bit after the "[Geo]Pyramid" part). e.g. "/home/magic/TileSet/Pyramids/yosemite" will copy the string "/home/magic/TileSet" to base, and "yosemite" to pyramid. N.B. trailing '/'s are always stripped from the base and pyramid strings.

You can pass in a NULL base or a pyramid pointer and that string will simply not be generated, i.e. if you only want the base name then you can call with pyramid == NULL.

If you specify an x-iss URL, then the base string (used to pass to tsmOpen) will have this changed to x-dsm.

Returns:
TRUE if non-empty-string base and pyramid names extracted
Parameters:
path - the original URL to be parsed
base - the extracted DSM name buffer to write into (or NULL)
pyramid - the pyramid name buffer to write into (or NULL)
Author:
Martin Reddy
Version:
21 July 1997
See Also:


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

Back to tsmApi Home Page