Does ESRI terrain provider support part-world terrain data services?

This topic has been started by request from here: https://github.com/CesiumGS/cesium/pull/7940, the details of which are reproduced here.

The original question posed was:

Is this provider intended to be able to be used with part-world ESRI terrain services? I am not having much success getting it to work with a custom part-world ESRI AWS service. The service does not expose the ‘Tilemap’ capability, but when ‘bypassed’ the data returned is [0,1,0,0] (instead of [1,1,1,1] which is exposed by the public terrain service), this causes the provider to ‘lock-up’ when trying to execute ‘findRange()’. I am unsure if this is a bug in the provider or if there is an issue with the way in which the service is set up. Any advice would be appreciated.

The first response by @Tamrat-B was:

This use case is supported in the provider. During the development we verified with this use case and it did work. @tfili has confirmed nothing has changed in the provider; So most likely it might be how the service is set up; Can you pls provide an example of the service to @tfili for debugging if possible. thanks

My response to this was:

Thank you so much for responding to my query. Unfortunately I am not able to share the actual service as it is a private service set up by ESRI UK in an AWS environment. I am able to provide some details of the nature of the problem and snippets from the JSON etc. Would you prefer for me to open a thread on the community to provide the details or to paste them here? I have a whole range of diagnostic information ready to share as there appears to be several issues that cause the plugin to fail.

The service:
“currentVersion”: 10.71
“capabilities”: “Image,Tilemap,Metadata,Mensuration” (note, I previously reported that TileMap was not returned, but ESRI UK fixed this)

Summary of main issues found:

  1. The findRange() function in the provider gets stuck in an infinite loop very early on from the TileMap json data that is returned from /tilemap/1/0/0/2/2 [0,1,0,0]. The function is called with:
    findRange(origin = Cartesian2 {x: 1, y: 2}, width = 2, height = 2, data = (4) [0, 1, 0, 0])
  2. If I bypass the findRange() function no further tiles are attempted to be downloaded because the GlobeSurfaceTileProvider.prototype.computeTileVisibility returns visibility.NONE as a consequence of HeightmapTessellator.computeVertices setting the minimumHeight to -1x10^38. The reason that this happens is that it appears after LERC decoding the tile returns this extremely large negative number (presumably for areas where no data is provided). If I hack the code to return a mimiumHeight=0 when this happens then the globe will appear and the tiles are downloaded, but the terrain does not look correct and it is extremely slow whilst trying to get hold of tiles that do not exist (404 errors on console)

Any assistance you can provide would be appreciated as I am not a Cesium, ESRI or mapping expert!
Robbo

I am currently working on establishing an AWS publicly accessible service that can be used to reproduce the issue. I also note that I did not mention that the service is an ArcGIS Enterprise service, compared with the main public service which is an ArcGIS Online service. I am not sure if this matters, but thought I would draw out the distinction.

Thanks for posting this here and summarizing all your findings so far @robbo1975!

Having a public version of this asset for testing will certainly help a lot. I’m assuming you’ve already checked this, but just to confirm, you’re able to load this terrain provider successfully in an ESRI viewer?

Hi @omar, yes I have proved that this terrain service will load in a locally established ESRI JS client. I have also proved that my local instance of CESIUM is able to load the standard full-world ESRI terrain service without problem.