Cache Directory Other Hierarchy Building Bases
Layers with different resolutions obtained after the Image Pyramid is generated according to the Image Data, and the initial layering and the final layering determined by the system; meanwhile, the system specifies the layering level number of each layer according to the resolution of the Image Layer, starting from the first layer, which corresponds to the image layer with the lowest resolution; The second layer corresponds to the image layer with higher resolution than first layer; the third layer corresponds to the image layer with the highest resolution.
Depending on the storage type, the resulting cache results will vary.
- If the "raw" type is used to store the cached results, the
- According to the Global rule of the longitude and latitude coordinate system, the Image Data of each layer is blocked, the Data Save of the corresponding range of each block is a cache file (cache image), and the file name of the cache file is nRow _ nCol _ nVersion. Postfix.
Where, nRow: refers to the row number of the corresponding block of the cache file in the Global grid, which shall be at least 4 characters, and shall be filled with 0 if it is not enough;
nCol: refers to the column number of the corresponding block of the cache file in the Global grid, which shall be at least 4 characters, and shall be filled with 0 if it is not enough;
nVersion: refers to the version number of the cache file, which is 0000 by default;
Postfix: refers to the extension of the cache file, which is *.png.
Store - the layered and blocked cache files in groups, and determine which block cache files are stored together according to the rules in the "Grouping Grid" below.
- If you store the cached results in a "packed" type, the
- On the basis of the above block grouping, all cache files in the same group are compressed and encrypted to be stored as three cache files, and the filenames of the cache files are successively: Name. ~, Name. SC, name.sc00.
Where, Name: is the Cache name, that is, the name of the cache root directory, here is day.
When SuperMap carries out layering and blocking on the terrain/Image Data, a rule based on a longitude and latitude coordinate system Global is adopted, the rule establishes a global uniform grid subdivision model, and the data of the global scale and the data of the regional scale are layered and blocked by adopting the uniform rule, That is to say, a standard system for data segmentation has been established. According to this rule system, it is also easy to determine which hierarchical block range a certain range of terrain/Image Data belongs to. The Tiling Mode of the quadtree is adopted to carry out layered and blocked segmentation on the Global, the layered results respectively correspond to Raster layers with different resolutions obtained after the terrain/image Raster Data Create Image Pyramid, the first layer of the layered level is numbered as 0, In general, the maximum number of layers supported is 21.
Longitude and latitude coordinate system Global rule, using a regular square grid for data segmentation, each segmented space area is a square area, here called block, and the data corresponding to each block is finally stored as a cache file. In the Global rule of the longitude and latitude coordinate system, if the longitude and latitude range of 180 degrees * 180 degrees is adopted for the 0 layer, the Global is divided into 2 blocks; if the longitude and latitude range of 90 degrees * 90 degrees is adopted for the 1 layer, the Global is divided into 8 blocks. By analogy, the partition is always performed by 1/2 times, that is, the quadtree partition is performed on the block.
|
Figure: Longitude and Latitude Coordinate System Global Rule |
The hierarchical block uses a regular square grid. Therefore, in a hierarchy, each block or spatial region into which the Global is divided can identify the position of the block in the hierarchy by a row and column number, and the starting value of the row and column number is 0. The starting point of the block position in all layers is (-180 degrees, 90 degrees), that is, the upper left corner of the block range is (-180 degrees, 90 degrees), and its position is (row 0, column 0), as shown in the figure above. The Geographic Range of each block, that is, the spatial region represented by the block, is determined by the Global segmentation principle determined by the layer to which the block belongs. For example, for the layer 0, the Geographic Range of each block is 180 degrees * 180 degrees; In the first layer, the Geographic Range of each block is 90 degrees * 90 degrees, and so on.
As shown
below, the results of tier-1, tier-2, and tier-3 data chunking are marked, and the File Name of each chunked cache file is identified in the figure.
Tiling results - for day Image Data Layer 1: results for day Image Data Tier 1
|
Figure: Tiling |
Tiling results - for day Image Data Layer 2: results for day Image Data Layer 2
|
Figure: Tiling |
Tiling results - for day Image Data Layer 3 results for day Image Data Layer 3
|
Figure: Tiling |
When
layered and blocked data are stored in groups, the number of the blocked cache files which are stored together is determined by dividing the grouping grids according to a certain rule, the grouping grids are regular grids, and the number of rows and the number of columns of the grids are determined by the functions of a row grouping span row _ setp and a column grouping span col _ setp, On the basis of the hierarchical blocking result, the block of each row _ setp row is one row in the grouping grid, and the block of each col _ setp column is one column in the grouping grid. According to this rule, the first layer, the second layer, and the third layer block cache files are grouped, and the divided grouping grids are as follows:
According to the formula, we can get:
Determination of the number of folders in each hierarchical row The number of folders created in each hierarchical row is calculated as follows: Where X is the intermediate variable; n is the level number of the current hierarchy; floor () is the round-down function; pow () is the power Exponential; Row is the number of row folders to be created under the current hierarchical directory. The name of the row folder is the serial number of the row folder, and the serial number starts from 0000 and increases in turn, such as 0001, 0002, 0003 … ; row _ image is the number of rows after image or Terrain Data block in the current layer; The row _ setp is the grouping span of the line number after the block processing in the current layering, that is, in the subdivision grid generated after the image or Terrain Data block processing, the block cache file corresponding to each row _ setp line of the grid is determined to be stored under a line folder directory, That is, each row of the grouping grid contains the block cache file of row _ setp rows, so the sequence number of the row folder can also be understood as the grouping grid row number. Determination of the number of column folders in each row folder The col _ image of the number of column folders under each line folder directory depends on the col _ setp of the grouping span of the number of columns after block processing in the current hierarchy, and the col _ setp of the grouping span of the number of columns is twice the row _ setp of the row grouping span. The specific calculation rules are as follows: Where, n is the hierarchical level number of the current hierarchy; pow () is the power Exponential; col is the number of column folders to be created under the line folder. The name of the column folder is the serial number of the column folder, and the serial number starts from 0000 and increases in turn, such as 0001, 0002, 0003 … ; col _ image is the number of columns after image or Terrain Data block in the current layer; The col _ setp is the grouping span of the column number after the blocking processing in the current layering, the image or the subdivision grid generated after the Terrain Data blocking processing, on the basis of the row grouping, the blocking cache file corresponding to each col _ setp column in each row grouping is stored under a column folder directory, That is, after row grouping and column grouping, a grouping grid is constructed, and the cache files in the same grid of the grid will be placed in a column folder. |
Layer - 1, row _ setp = 1; col _ setp = 2;
for day Image Data Layer 1 chunked data |
Figure: Grouping grid |
Layer - 2, row _ setp = 2; col _ setp = 4;
for day Image Data of Layer 2 chunked data |
Figure: Grouping grid |
Layer - 3, row _ setp = 2; col _ setp = 4;
for day Image Data Layer 3 chunked data |
Figure: Grouping grid |