question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update approximateTerrainHeights.json

See original GitHub issue

approximateTerrainHeights.json was generated from the STK World Terrain as of #3903, with all of the improvements made to Cesium World Terrain, we should regenerate this file.

Long term plan is still for this data to be accurately provided by each terrain provider, but approximateTerrainHeights.json will always be a good fallback for servers that don’t have the information.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
hpinkoscommented, May 29, 2018

@thw0rted thanks for pointing that out, it doesn’t look like we have an otherwise for loading the approximateTerrainHeights.json file https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Core/ApproximateTerrainHeights.js#L58-L60

0reactions
thw0rtedcommented, Nov 4, 2020

This was actually easier than what I suggested before, because if you have a JSON file you can turn it into a valid ES6 module by just adding export default at the beginning. That let me throw together this build real quick. It builds and runs without apparent issue, with two caveats:

  • The tests for StaticGroundGeometryColorBatch and StaticGeometryPerMaterialBatch fail but only if run in the whole suite – running just those two specs works fine. This suggests that some earlier test is manipulating the ApproximateTerrainHeights module (it’s the only one I changed), but I haven’t been able to figure out how
    • ETA: I realized that I had been grepping through Source/ without looking at Specs/, and it turns out that tons of tests poke around in the guts of ApproximateTerrainHeights. Even ignoring my suggestion from this fork, maybe those interactions should be replaced with a mock?
  • It looks like the non-ES6 version of the createGroundPolylineGeometry worker inlines all its dependencies (recursively), including ApproximateTerrainHeights, which means that it gets its own (bundled) copy of the data. In a non-ES6 environment, I don’t have a good solution for this. (I had made a snide remark here but it looks like Firefox still hasn’t gotten onboard with ES6 modules in a web worker, so, oops?)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Update approximateTerrainHeights.json · Issue #6557 - GitHub
I had a configuration error that was causing the request to bomb and I burned a little too much time trying to figure...
Read more >
Assets resources are not loaded in application - Stack Overflow
I am using Ionic(Angular) 5 with Electron to build my Linux OS Application. Everything is running fine but whenever I load my Cesium ......
Read more >
Are approximateTerrainHeights.json and the files under the ...
I find that approximateTerrainHeights.json takes more than 1 second to load. Is it necessary for running Cesium program?
Read more >
core-frontend Change Log - iTwin.js
Dynamically import approximate terrain heights instead of fetching as JSON. Expose iTwin.js Core Version for extensions; Fixed interaction between linear ...
Read more >
terriajs-cesium/CHANGES.md - UNPKG
89, * Reduced size of approximateTerrainHeights.json ... 234, * Updated terrain and imagery rendering, resulting in terrain/imagery loading ~33% faster and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found