Open zxo102 opened 4 years ago
I found a solution here:
https://observablehq.com/@j-devel/hello-3d-geographic-contours
I got satellite and contours terrains from tgeo.getTerrain(origin, radius, 12, {...})
in different sizes with same parameters:
For satellite terrain:
tgeo.getTerrain(origin, radius, 12, { onRgbDem: (meshes) => { meshes.forEach((mesh) => { scene.add(mesh); }); render(); }, onSatelliteMat: (mesh) => { mesh.material.wireframe = true; mesh.material.side = THREE.DoubleSide; render(); }, });
For contours terrain:
tgeo.getTerrain(origin, radius, 12, { onVectorDem: (objs) => { objs.forEach((obj) => { scene.add(obj); }); render(); }, });
How do I get the same size of terrain boxes?
Thanks a lot.
How do I get the same size of terrain boxes?
It seems you need to crop each terrain model horizontally along the white reference boxes so they have "the same" sizes. But, currently, we don't have this functionality in three-geo (https://github.com/w3reality/three-geo/issues/8#issuecomment-558545985).
Edit: more precisely, we already have this cropping feature for vector DEMs (disabled at this moment), but not for rgb DEMs.
Thanks a lot for your reply @j-devel and see what I can do.
Follow the example of https://github.com/w3reality/three-geo/tree/master/examples/editor like:
tgeo.getTerrain(origin, radius, 12, { // onVectorDem: (mesh) => { /* just for debugging ajax */ }, onRgbDem: (meshes) => { ... } , onSatelliteMat: (mesh) => { mesh.material.wireframe = true; mesh.material.side = THREE.DoubleSide; render(); }, });
I can get satellite terrain. How can I get the other two types: contours terrain and wireframe terrain?