Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeError: "invalid array length" when viewing ctb generated tiles with quantized-mesh-viewer (heremaps). #89

Open
swiss-knight opened this issue Jan 27, 2020 · 3 comments

Comments

@swiss-knight
Copy link

I've generated some tiles from a DEM (Erdas Imagine format) using the ctb-tile tool under Ubuntu 18.04.

I want now to visualize the generated tiles.
For this purpose, I used quantized-mesh-viewer.
I placed a symlink in my local repo of the quantized-mesh-viewer to replace the default example-tile/ folder.
I made the necessary changes in the meshUrl variable in the ./src/tile/index.js file.

After what, while navigating to my tile, it doesn't show up, the box stays black.
I double checked that the tile file I used do have a few kilo bytes of data.

In the browser console, this error raises; RangeError: "invalid array length".
Details:

THREE.WebGLRenderer 92 three.js:21172:11
RangeError: "invalid array length"
    node_modules index.js:44
    node_modules index.js:246
    createQuantizedMesh create-quantized-mesh.js:326
create-quantized-mesh.js:355
RangeError: "invalid array length"
    node_modules index.js:44
    node_modules index.js:246
    createQuantizedMesh create-quantized-mesh.js:326
create-quantized-mesh.js:355
(...)

I don't know from which side does the errors come from; ctb-tile or the quantized-mesh-viewer?
Do you have any cue on how to fix this or on the source of the problem?

This issue was originally posted here: heremaps/quantized-mesh-viewer#16

@Cq5616
Copy link

Cq5616 commented Feb 25, 2020

i have met the exactly same problem when using quantized-mesh-viewer

@philippfra
Copy link

I'm facing a similar Error while trying to decode a Tile with python-library "quantized-mesh-tile". Tiles are generated with the ctb-docker and are productiv with cesium. I tried to read and mutate single tiles with python. The problem described above seems to have the same source. For me it looks like the tile generated with ctb are not compatible with other tools.
Are there any News about this Issue?
Python-Traceback:
image

@sraimund
Copy link

sraimund commented Jul 4, 2024

The terrain tiles produced by ctb-tile are gzipped. You can use 7-Zip or python's gzip module to unzip them.

However, as far as I know, this repository is only able to create terrain tiles in the heightmap format. I'm getting a RangeError: offset is outside the bounds of the DataView when trying to view them after unzipping.

Quantized mesh tiles can be generated by ahuartes47's fork, which is also available on Docker. The unzipped tiles can be inspected with the quantized-mesh-viewer:

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants