We are now working on using CesiumJS to support a research project planning to send a rover to a polar region of the moon. We have a bunch of data, map tiles, that we have been rendering in OpenLayers, and I am porting that over to render in CesiumJS.
Per the newsgroups and my research, there is not currently a polar projection, but since I already have the code written for OpenLayers I have ported that over to CesiumJS.
Unfortunately it is not behaving as expected. The image renders as a curved swath, instead of filling the bounds of the rectangle.
What I have done is created a MapProjection which implements the conversions I need to go to/from either north or south polar stereographic projection. I have then created a TilingScheme which extends the WebMercatorTilingScheme, but sets the projection to be the polar projection I am interested in. In the constructor of my TilingScheme, I do this:
// the base class used the web mercator projection to figure out the rectangle. Redo that work.
this._projection = options.projection;
let southwest = this._projection.unproject(options.rectangleSouthwestInMeters);
let northeast = this._projection.unproject(options.rectangleNortheastInMeters);
this._rectangle = new Cesium.Rectangle(southwest.longitude, southwest.latitude,
northeast.longitude, northeast.latitude);
console.log('projection rectangle in radians');
console.log(this._rectangle);
I have a hunch that the problem lies in determining what is a 'hit' in the imagery provider, that is when going from geodetic coordinates to the native rectangle it is not correct. I can correctly render a bounding rectangle defined in lat/long coordinates via kml.
Any nudges in the right direction will be greatly appreciated. Once I get this working I can also contribute it back to Cesium codebase.
thanks
Tamar
OSX, Chrome, Cesium 1.40.0