PDS_VERSION_ID = PDS3 RECORD_TYPE = STREAM OBJECT = TEXT INTERCHANGE_FORMAT = ASCII PUBLICATION_DATE = 1994-05-13 NOTE = "Description of the tiling scheme used in the GVDR images." END_OBJECT = TEXT END GVDR Tiling =========== The GVDR data set is composed of four multi-dimensional images, one image for each of four map projections. In each projection, the GVDR image is a rectangular array of pixels, like a simple one-dimensional image. The relationship between the pixel addresses and the geographic location is given by the map projection. When one stores an array of pixels in a file, one must choose the order in which the pixels are written. This document describes the order in which GVDR pixels are stored in the GVDR files. The simplest storage schemes are row-major and column-major order, which store all of the pixels in the first row or column first, then all the pixels in the next row or column, and so on. This method is usually preferred when the entire image will be manipulated as a whole. However, when the image is too large to store conveniently, or when only a portion of it is needed at a given time, a more localized scheme is required. One possibility is to divide the image into smaller rectangular regions, and then store each region using one of the simple methods mentioned above. All the pixels in a given region, or tile, will be stored near one another in the data file, making the access of a given region quite efficient. Naturally, it makes sense to store neighboring tiles sequentially as well. This is the tiling scheme used to store the GVDR pixels. Both pixels within a tile and tiles within the entire image are stored in row-major order. The details of the image and tiling geometry are given in the GVHDR file for each set of GVDR data files. The overall image size is given by the quantities PROJECTION_LINES and PROJECTION_SAMPLES, which define the height and width of the image. The relationship between the edges of the image and the cartesian coordinates of the map projection are given by LEFTMOST_MAP_COORD, RIGHTMOST_MAP_COORD, TOPMOST_MAP_COORD and BOTTOMMOST_MAP_COORD (the same information may be obtained from the values of LINE_PROJECTION_OFFSET and SAMPLE_PROJECTION_OFFSET; see the PDS Data Dictionary for definition of these two quantities [1]). The entire image is divided into HORIZONTAL_TILE_COUNT tiles horizontally and VERTICAL_TILE_COUNT tiles vertically, with the upper left corner of the upper left tile coinciding with the upper left corner of the image. Each tile is the same size, having dimensions HORIZONTAL_TILE_SIZE by VERTICAL_TILE_SIZE measured in pixels. Note that if HORIZONTAL_TILE_COUNT * HORIZONTAL_TILE_SIZE is greater than PROJECTION_SAMPLES, then the rightmost tiles will extend beyond the right edge of the GVDR image. These out-of-range pixels will contain no data. The same is true for tiles that extend beyond the bottom of the image. Two index files simplify accessing an arbitrary tile or pixel from the GVDR files. The first is the tile index file GVTIDX. This file contains a row for each tile in the image. The tiles are stored in the GVTIDX file in row-major order, meaning that the top row of tiles is stored first, then the next row, and so on. Each row gives information about where observations from this tile are stored in the other data files. The starting row and number of rows that are associated with this tile are given for each of the data files. (See the description in the GVTIDX.LBL and GVTIDX.FMT files for more details; examples may be found in GVDRSIS.TXT in the DOCUMENT directory of this volume.) The other index is the pixel index file GVPIDX. This file contains a row for each pixel in the image (with the exception of pixels that lie in completely empty tiles, which are omitted entirely). The pixels are arranged first by tile, then in row-major order within each tile. Thus, the first row from the first tile is stored first, then the second row from the first tile, and so on. Each of the rows contains pointers in the the data files to the observations associated with the corresponding pixel. If a pixel had no observations of a given type, none are reported in the index and no space is wasted in the actual data file. In order to access a given pixel, use the following procedure (which has been reproduced from the GVTIDX label file): 1. Determine which tile the pixel belongs to using the tiling information in the GVHDR file. 2. Look up the tile in the GVTIDX file (the two-dimensional array of tiles is stored in row-major, or scanline, order). Obtain the starting rows of this tile in the other five files: GVPIDX, GVXIF, GVRDF, GVADF, and GVANF. 3. Look up the pixel in the GVPIDX file, using the row number just found in the GVTIDX file as the address of the first pixel within the tile. Within each tile, the pixels are also stored in row-major, or scanline, order. 4. The entries in the row of the GVPIDX table are the starting rows and number of rows in the four data files: GVXIF, GVRDF, GVADF and GVANF. The starting rows in the GVPIDX file are relative to the tile starting rows obtained from the GVTIDX file, so add these two numbers together. 5. Look up the rows within the data files themselves. Note that all of this is done automatically by the software provided in the SOFTWARE directory on this volume. [1] Planetary Science Data Dictionary Document, JPL D-7116, Rev. C, Pasadena, CA: Jet Propulsion Laboratory, 1992.