TD files

td files
each represents an area of 512 tiles by 512 tiles

-00026+00027.td
+00002+00021.td

67108864 = 8192 * 8192

512 tiles * 16 patches/tile = 8192 patches
each patch is 128m by 128m

depth 0 entire globe
divide in half by 6 times to get to depth 6
which is a 512 tiles square

-00022+00026.td
tdx tdz “.td”
x 11264 to 11775 from 512tdx to 512(tdx+1)-1
y 13312 to 13823 from 512 tdz to 512*(tdz+1)-1

world composed of 64 by 64 large TD tiles,
-32 to -1 and 0 to 31

depth tiles
0 32768
1 16384
2 8192
3 4096
4 2048
5 1024
6 512
7 256
8 128
9 64
10 32
11 16
12 8
13 4
14 2
15 1

td files start path in quad tree at depth 6 based on td_idx.dat

SIMISA@@@@@@@@@@JINX0D0t______

terrain_desc (
terrain_desc_size ( 67108864 )
Depth ( 6 )
terrain_desc_tiles (
TdFile ( -19 22 )
TdFile ( -1 21 )
TdFile ( 2 21 )
)
)

n number of decimal characters in tile name
if tile name starts with “-” then
depth = 2n-1 if tile name starts with “_” then depth = 2n

when converting tile name to tile numbers
if depth is odd then right shift two bits and discard

tile name to tile numbers
input: tile name
output: tile x, tile z, depth

tile numbers to tile name
input: tile x, tile z, depth
output: tile name

limit of tile numbers
minimum: -2^(depth-1)
maximum: 2^(depth-1)-1
example:
depth 5
minimum: -32
maximum: 31

Leave a Reply