int tsmValidateTspec ( Pyramid *tspec ) Validate a tspec structure loaded from disk
Validate a tspec structure loaded from disk.This function will take a Pyramid structure (for example, as returned by tsmReadTspec) and will do various checks to ensure that the fields in the structure are valid. This routine may help to throw up some hints or solutions to some dataset problems.
The following checks are currently performed (with an error message and a return code of FALSE resulting if any one check fails):
- tspec != NULL
- tspec->geoName != NULL
- tspec->invResScaleFactor == 2
- tspec->maxLevel >= tspec->minLevel
- tspec->maxResolution >= tspec->minResolution
- tspec->tspecLevel.val != NULL
- tspec->tspecLevel.len == tspec->maxLevel - tspec->MinLevel + 1
- tile->totalPixels[0] == tile->numPixelsX + tile->overlap[0]
- tile->totalPixels[1] == tile->numPixelsY + tile->overlap[1]
- for each SimpleTileSet, check:
- numTile[0] == maxTile[0] - minTile[0] + 1
- numTile[1] == maxTile[1] - minTile[1] + 1
- numValidPixel[0] == maxValidPixel[0] - minValidPixel[0] + 1
- numValidPixel[1] == maxValidPixel[1] - minValidPixel[1] + 1