Closed bertt closed 7 years ago
Hi this seems a very similar error to ; https://github.com/loicgasser/quantized-mesh-tile/issues/15
yes looks very similar :-) but in this case got the same error on other OS (Ubuntu) so I suspect its something else.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/quantized_mesh_tile/terrain.py", line 433, in fromFile
self.fromStringIO(f, hasLighting=hasLighting, hasWatermask=hasWatermask)
File "/usr/local/lib/python2.7/dist-packages/quantized_mesh_tile/terrain.py", line 334, in fromStringIO
unpackEntry(f, TerrainTile.vertexData['uVertexCount'])
File "/usr/local/lib/python2.7/dist-packages/quantized_mesh_tile/utils.py", line 19, in unpackEntry
return unpack('<%s' % entry, f.read(calcsize(entry)))[0]
struct.error: unpack requires a string argument of length 2
in the attached file the tile coordinates are not the same as in the code sample. 739397 seems to be the value for x.
Are you sure about z,x,y tile coordinates?
yes should be 11,2107,1608. Where did you get the value x=739397 from? I don't see it in the header.
I got it from the filename, are those Cesium tile? Where did you get it from? I'll try it out on my machine.
Tiles are produced by running ctb-tile on a tif file, for example http://www.rijkswaterstaat.nl/apps/geoservices/geodata/dmc/ahn2_05_int/geogegevens/raster/01_09/i09bz1.tif
That's a heightmap terrain format not quantized mesh (regular triangles)
See: https://github.com/AnalyticalGraphicsInc/cesium/wiki/heightmap-1.0-terrain-format and https://cesiumjs.org/data-and-assets/terrain/formats/quantized-mesh-1.0.html
I'm trying to parse a terrain tile with the following code but got an error about uVertexCount. Tile 1608.zip I've checked the Gzip compression. Tile is rendered well in the Cesium viewer.
Code:
Stacktrace:
Any idea whats going on?