Does the possibility exists to calculate the xy of a point with a function like this:
const pos = scene.cartesianToCanvasCoordinates(position); without rendering or using webgl using the Cesium Engine in NodeJS? I’ve tried about every way basically I want to set a scene with position and HPR and get the xy of where a geolocation would be in that scene using a fixed width height and FoV. Tried every way I know possible to make this and no luck.
Hi there,
It should be possible to perform geospatial calculations without rendering in NodeJS. Though for this case, the path to get there may not be very straightforward since the camera logic is current closely coupled to Scene
. Personally, I would avoid creating a Scene
since this will typically also create a WebGL rendering context.
If I were to try to implement something like this, I would create PerspectiveFrustum
instance to handle the FoV logic, and implement a mock object to use for the scene
parameter of SceneTransforms.worldToWindowCoordinates
. For more insight on what properties that mock object needs, I’d look at the source code.