GeoJSON not rendering properly

1. A concise explanation of the problem you're experiencing.

Hello everyone,

I am trying to display a geojson file on my 3DTiles and everything works fine, except for some areas where the json seems to be "leaking" when moving and rotating the camera. See photos attached: json3 represents what my json is supposed to look like, and the other two illustrates the problem when moving the camera.

I checked the json and everything looks fine. Also I tried to shift all my entities from 1 meter to the left and everything rendered perfectly.
Do you think it might be a problem with my 3D tileset ? Have you encountered something similar before ?

Many thanks for your help!

4. The Cesium version you're using, your operating system and browser.

Cesium 1.56
Windows 8 Chrome/Firefox

tvb.json (515 KB)

Thanks for providing these example screenshots! Is this tileset hosted on ion? If so, are you able to provide a Sandcastle code example (https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/) of the tileset that I can take a look at? (You can also email me at omar@cesium.com if you prefer not to share a link publicly).

I think my best guess off the top of my head is that the tileset itself, or part of it, may be underground, and it’s showing because depth testing may be turned off. To confirm this, try setting:

viewer.scene.globe.depthTestAgainstTerrain = true;

``

And see if it makes it any better. You can also try lifting the tileset up as shown in this code example to see if that helps:

https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=3D%20Tiles%20Adjust%20Height.html

This is less likely to be the issue, but worth double checking, it might be a logarithmic depth buffer issue. Try turning it off as suggested by Gary here:

https://github.com/AnalyticalGraphicsInc/cesium/issues/7852#issuecomment-494804333

Let me know if that helps!

Hi Omar and thanks for your quick response!
Unfortunately the tileset isn't hosted in ion but in our local server, and I can't provide you with any link as it's really heavy (approx. 200Go).

I tried setting viewer.scene.globe.depthTestAgainstTerrain = true; and viewer.scene.logarithmicDepthBuffer = false; but it doesn't seem to make any difference. I will try to lift my tileset as shown in the sandcastle and give you feedback.

Thanks again!

Hi all,

If anyone is experiencing the same problem, Omar found the solution : it is coming from the arcType set by default for the GeoJson in Cesium. It is possible to change it when the polygon is created to fix the bug.

Here is a sandcastle Omar made that fixes the problem.

https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/#c=fVRRb9owEP4rES9QCRmHGCdOabWVdWxTpVaD7YXw4CaGRnNs5Dh0tOK/z4kDIRTtKc7d931357vzlipnm7JXppwbR7BXZ8LytMjA78rW68bV70QKTVPBVPfqOhJbw0mopjNZqJg9KZmlOTP0mjpl8kcuxZcjAnBJk14k3iPhOFFH7zYs6oTm9JVRXSg2kZyzWKdSRJ2+xQia1ZjnYn20xiovje8tEQutECVmo+SGKZ0yC7XmtmShRCjXcZiwVWgkw8fpJHSBF05+zgIUdSxlX372deCVTbSSXFj/+6VKjnmUpDWTGdNq18qjfQFPku/Wx7IP/lhKlaSC6ipg41ksTs6OD/yR72IXYg8S3yPDvoMCMMIB9rFPCPYw9pCz7J9zPIKDIYHDIXERthzf9QlG2IeEQN+/wBl5CEITA+JR4B84BAXBCEETDAUXOHiIPY94yEWjgDQcn4xcbBKGFzkBQQhh5A7dwKvrISZhH3oQeYQMnWVDWR7P+5OWGeO+f7jvmNNsM5dTJQuRhM6K8pwZfznEkfgwwkC/MNFbFaKaxV7jvzro2U0BjScHNElOkdct4JuU2Vye+S1iRkUS01xzVkrMpeTPVN0VWpvIXTNqTFci3b5zTOjqdIz+F6G6jCZUua8bO2lmSxsoYEKn5aaALeUFyxdwCWpcLVL/AfZXqyJhyTeWrl+0EXEhBPAMlJmBVSnlzUtgFlsqcPfw6/4MSlU8N0vQID9bA5jeP365n32fXJddAtI0RL2azjRNaXoRS5FLXj4u615VdV1xp98Z53rH2a3FfUqzjVTaKRTvATDQLNvwcrUGz0X8h2kQ53lJHA8OpHGSbp00uTGL2H78ok45UHluPKuC81n6Ztb4djww+BatfO5SsX7cMsXproS8uLcP1ggAGA/M70eWtiNwovgP

When the line polygon.arcType = Cesium.ArcType.GEODESIC; is removed, we can see my polygon is missing a face, and that’s where the leaking was coming from.

Thanks again Omar!