Quantized mesh. No eastern hemisphere

I’ve made some good progress in my quantized mesh terrain generator. A lot of help has come from these forums, so much thanks!

I’ve hit what I hope is my last stumbling block. The western hemisphere renders fine, however the eastern hemisphere does not render at all.

Image: “Hello Sunshine!”

Here is the contents of the layer.json file. I’m wondering if I’m just not requesting the eastern half of the planet to be sent.

   attribution: '',
   bounds: [-180, -90, 180, 90],
   description: '',
   maxzoom: 23,
   minzoom: 0,
   projection: 'EPSG:4326',
   format: 'quantized-mesh-1.0',
   scheme: 'tms',
   tiles: ['{z}/{x}/{y}'],
   version: '1.0.0',
   available: [[{"startX":0,"startY":0,"endX":1,"endY":0}],

Switching to a projection of EPSG:3857 fixed this problem.

Actually, switching to this projection causes holes at the poles which is not what I’m wanting. I understand why they are there, but I am confused as to why the other projection, 4326 is only showing the western hemisphere? :confused:

Heh… my x, y, and level values were being converted to strings when received by the express-js server. I’d forgotten to use @NumParam and was instead using @Param which caused a type change to string. So, ‘0’ + 0 is ‘00’ which is also zero. However, ‘1’ + 1 is ‘11’ which is eleven in the lat/lon calculations, not 1 like the calculations are expecting.

    public async getElevationTile(
        @Response() res: HttpResponse,
        @NumParam('z') level: number,  // using @Param here is a bad idea...
        @NumParam('x') x: number,  // using @Param here is a bad idea...
        @NumParam('y') y: number,  // using @Param here is a bad idea...
    ) {

This number conversion to string was causing a bit of a problem when calculating the latitude and longitude. :rofl:

Fixing this problem fixed the rendering issue.