heremaps / tin-terrain

A command-line tool for converting heightmaps in GeoTIFF format into tiled optimized meshes.
MIT License
579 stars 126 forks source link

generate very small terrain tile file size when i use my own tif file #60

Closed longyangzz closed 4 years ago

longyangzz commented 5 years ago

own.tif my own tif have 200M , when run dem2tintiles, only 900K files out. why? is my file format wrong?

longyangzz commented 5 years ago

outputtile and how can I view my output tiles? thanks

longyangzz commented 5 years ago

debugonetile

when I use tile.html show one terrain file, It looks not good!

alexbeeston commented 4 years ago

I am having this issue as well. I used the tinterrain tool with a 452MB TIF file but ended up with a directory structure only 88KB, less than 0.1% of the size of the original data. I doubt the mesh format is so efficient that it can maintain the original data using less than 0.1% of the space. I also thought I would give more zoom levels, perhaps up to at least 14 or 15, but the tool only gave me 7. Perhaps it is truncating part of the higher-resolution data. Any ideas how to convert the entire dataset? The full output from the invocation of the tool is this:

`Opening raster file CacheValleyReprojected.tif with GDAL... reading raster data... Processing zoom level 7, raster size 73x97 starting greedy insertion with raster width: 73, height: 97 initialize the mesh with four corner points finished greedy insertion Creating tile: 24,80 after clipping: 2 triangles in tile writer log: { "QuantizedMeshHeader_start": 0 "VertexData_vertexCount_start": 88 "VertexData_vertexCount": 4 "VertexData_u_start": 92 "VertexData_v_start": 100 "VertexData_height_start": 108 "IndexData_bits": 16 "IndexData_triangleCount_start": 116 "IndexData_triangleCount": 2 "IndexData_indices_start": 120 }

Processing zoom level 6, raster size 36x48 starting greedy insertion with raster width: 36, height: 48 initialize the mesh with four corner points finished greedy insertion Creating tile: 12,40 after clipping: 2 triangles in tile writer log: { "QuantizedMeshHeader_start": 0 "VertexData_vertexCount_start": 88 "VertexData_vertexCount": 4 "VertexData_u_start": 92 "VertexData_v_start": 100 "VertexData_height_start": 108 "IndexData_bits": 16 "IndexData_triangleCount_start": 116 "IndexData_triangleCount": 2 "IndexData_indices_start": 120 }

Processing zoom level 5, raster size 18x24 starting greedy insertion with raster width: 18, height: 24 initialize the mesh with four corner points finished greedy insertion Creating tile: 6,20 after clipping: 2 triangles in tile writer log: { "QuantizedMeshHeader_start": 0 "VertexData_vertexCount_start": 88 "VertexData_vertexCount": 4 "VertexData_u_start": 92 "VertexData_v_start": 100 "VertexData_height_start": 108 "IndexData_bits": 16 "IndexData_triangleCount_start": 116 "IndexData_triangleCount": 2 "IndexData_indices_start": 120 }

Processing zoom level 4, raster size 9x12 starting greedy insertion with raster width: 9, height: 12 initialize the mesh with four corner points finished greedy insertion Creating tile: 3,10 after clipping: 2 triangles in tile writer log: { "QuantizedMeshHeader_start": 0 "VertexData_vertexCount_start": 88 "VertexData_vertexCount": 4 "VertexData_u_start": 92 "VertexData_v_start": 100 "VertexData_height_start": 108 "IndexData_bits": 16 "IndexData_triangleCount_start": 116 "IndexData_triangleCount": 2 "IndexData_indices_start": 120 }

Processing zoom level 3, raster size 4x6 starting greedy insertion with raster width: 4, height: 6 initialize the mesh with four corner points finished greedy insertion Creating tile: 1,5 after clipping: 2 triangles in tile writer log: { "QuantizedMeshHeader_start": 0 "VertexData_vertexCount_start": 88 "VertexData_vertexCount": 4 "VertexData_u_start": 92 "VertexData_v_start": 100 "VertexData_height_start": 108 "IndexData_bits": 16 "IndexData_triangleCount_start": 116 "IndexData_triangleCount": 2 "IndexData_indices_start": 120 }

Processing zoom level 2, raster size 2x3 starting greedy insertion with raster width: 2, height: 3 initialize the mesh with four corner points finished greedy insertion Creating tile: 0,2 after clipping: 2 triangles in tile writer log: { "QuantizedMeshHeader_start": 0 "VertexData_vertexCount_start": 88 "VertexData_vertexCount": 4 "VertexData_u_start": 92 "VertexData_v_start": 100 "VertexData_height_start": 108 "IndexData_bits": 16 "IndexData_triangleCount_start": 116 "IndexData_triangleCount": 2 "IndexData_indices_start": 120 }

Processing zoom level 1, raster size 1x1 starting greedy insertion with raster width: 1, height: 1 initialize the mesh with four corner points finished greedy insertion Creating tile: 0,1 after clipping: 0 triangles in tile WARN cmd.cpp:197 raster on zoom level 0 empty, cannot create tiles, proceeding...`