Do you mean you have a set of points and you’re trying to create and visualize surface geometry approximated by kriging?
There’s nothing built-in to CesiumJS to do this, but could do your computations in JavaScript in your app and then have Cesium visualize the results, as geometry or lines in 3D etc.
However, for the time being I am working with kriging datasets as sampled data with easting and northing and then finally implementing the kriging on the points collected from sampleTerrainMostDetailed.
But the conversion of points from cartesian to cartographic in cesium, I am always getting the latitudes as 0,
var cartesianCoordinate = new Cesium.Cartesian3(8600/*Easting*/,12600/*Northing*/);
var cartograhicCoordinate = Cesium.Cartographic.fromCartesian(cartesianCoordinate );
Cesium’s Cartesian3 coordinates are not a 2 dimensional grid on the surface of the Earth. It’s a 3D coordinate system with the point (0, 0, 0) being in the center of the earth.
I think what you’ll need to do is convert your easting and northing values to longitude/latitude, and then create a new Cesium.Cartographic() from that.
I have created a krigging layer on 2D canvas, and bringing it over the cesium in the form of a rectangle, but however when it lays over the cesium globe, the canvas positions do not exact position on the cesium map.
What factors do I need to take care for proper alignment?
I am using aspect ratio as 1:1 and pixel size as 1 to create krigged map on separate 2d canvas.
How are you currently adjusting the position of the rectangle on the 3D globe? Do you have the latitude/longitude of where the corners of the rectangle are supposed to be?
You can use this SceneTransforms function to convert from a 3D world position to a 2D position on the screen:
and I calculated the cartesian2 of minBounds and maxBounds using SceneTransforms.
I have created a rectangle using these minBounds and maxBounds
Now I want to set the canvas image in this rectangle and lay that rectangle on an elevated surface. The positions in the image should collide with the positions on cesium globe.
Problem is that when I lay canvas image on this rectangle, only a proportion of image is laid on rectangle, not the complete generated image. I want to frame the complete canvas image in the rectangle.
Primitive appearance material is not accepting the canvas image.