4 Corner Rectangle for a Tiling Scheme

Hello,
Do you have any recommendations on how to specify a 4-corner rectangle when instantiating a tiling scheme for an Imagery Provider?

I would like to be able to do something like this in the Imagery Provider:

const tilingScheme = new Cesium.GeographicTilingScheme({

        numberOfLevelZeroTilesX: 1,

        numberOfLevelZeroTilesY: 1,

        rectangle: < An Array.<[Cartographic](http://cesiumjs.org/releases/1.5/Build/Documentation/Cartographic.html)> points for the rectangle>

    });

This way I could have an Imagery Provider that tiles to a rotated rectangle.

Or could I somehow have the ImageryLayer also be a RectanglePrimitive and use the textureRotationAngle?

I would appreciate any insight or expertise on how to handle this case.

Regards,

Sunny

Hello Sunny,

Check out the function Rectangle.fromCartographicArray. That will find the smallest rectangle that contains all points in the array.

However, if your rectangles span more than half of the earth, that function may find the inverse of the rectangle you want.

If you anticipate large rectangles, you may want to do your own calculation, especially if you know which cartographic corresponds to each corner of the rectangle.

Best,

Hannah

Sorry, I may have misread your question. There isn’t any way to have a rotated imagery layer. Is there a reason you can’t use the rectangle primitive?

Best,

Hannah

Hi Hannah,
Yes, I am concerned about the ‘rotated tiled imagery’ case.

I’m not sure if there isn’t a reason why I can’t use the rectangle primitive but I’m unclear on how I could.
I assume I would have to add my image as the Material for the primitive but my image is a tiled image that uses an ImageryProvider.

Am I able to do that?

/Sunny

Ah, okay. Sorry, I’m not sure there’s currently a way to do this. The rectangle can use an image material with a png or jpg, but cannot use tiled imagery.

-Hannah

Yeah, sorry I realized after I proposed it that you couldn’t have tiling in the rectangle primitive.
So there is no way to have the rectangle for a tilingScheme be specified by 4 distinct corners?