iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.1k stars 298 forks source link

I need to modify the coordinate system #1101

Closed dytmh closed 4 years ago

dytmh commented 5 years ago

I need to use the same coordinate system as threejs, Y axis up, what do I need to change?

zarov commented 5 years ago

You can use geocentric coordinates, that you can obtain from any coordinate using Coordinates#xyz(). See the related documentation http://www.itowns-project.org/itowns/docs/#api/Geographic/Coordinates

gchoqueux commented 5 years ago

the geomatics convention imposes the z axis up. If you have objects 3D with the Y axis up, you could to rotate yours objects 3D.

group.rotateX(Math.PI * 0.5);
group.rotateZ(Math.PI * 0.5);

That's why you need to have the y-axis up?