You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Q: How do you calculate terrain height relative to the position units in three.js, which are also dependant on the zoom factor?
For example, if I want to position an object 1m above sea level (which according to https://docs.mapbox.com/data/tilesets/guides/access-elevation-data/#mapbox-terrain-rgb sea level is 0) how do I translate that into a relative mesh position,z value that will translate it a unit of 1m (or 10m or whatever) relative to the scale of the mesh terrain elevation?
Also. how does that position calculation change based on the zoom factor, which can be from 11 to 17?
how does that position calculation change based on the zoom factor, which can be from 11 to 17?
The zoom parameter in the API is used to specify the "resolution" of the terrain object, and it has nothing to do with the position/rotation/scale of the object rendered by Three.js.
To illustrate this more clearly, I have updated the heightmap example so it can accept some of varying zoom values.
How accurate is that elevation calculation? Within some rough % range?
I gather there will be some variance based on the quality of the dem and other factors?
Q: How do you calculate terrain height relative to the position units in three.js, which are also dependant on the zoom factor?
For example, if I want to position an object 1m above sea level (which according to https://docs.mapbox.com/data/tilesets/guides/access-elevation-data/#mapbox-terrain-rgb sea level is 0) how do I translate that into a relative mesh position,z value that will translate it a unit of 1m (or 10m or whatever) relative to the scale of the mesh terrain elevation?
Also. how does that position calculation change based on the zoom factor, which can be from 11 to 17?
https://docs.mapbox.com/help/glossary/zoom-level/ doesn't give me much of a solution either.
Thanks!
The text was updated successfully, but these errors were encountered: