TransWikia.com

Artifacts when rendering TopoJSON geometries on Cesium

Geographic Information Systems Asked on June 10, 2021

I am rendering a TopoJSON document, created via mapshaper.org from a shapefile, on Cesium. That works fine for all geometries except one.
I have tried re-creating the TopoJSON document and re-editing arcs manually but I always end up with different geometry artifacts.

To me, it looks like some of the arcs have an incorrect coordinate in between, which leads to the self-intersections. But I am not able to debug the coordinate in question.

Also, when I remove arcs from the polygon manually, I end up with similar artifacts at different locations, which seem to be completly random.

Using "Check validity" in QGIS does not give me errors or self-intersections for the initial geometry, neither in the shapefile nor in the TopoJSON.

EDIT:
I have displayed the outline of the polygon and it seems that the artifacts do not have an outline, which leeds me to the conclusion that this might be a Cesium rendering issue rather than an issue with the coordinates in the TopoJSON document.

Does anyone have an idea, how to debug or correct the polygon geometry?

Cesium rendered TopoJSON:

enter image description here

TopoJSON with some removed arcs:
enter image description here

TopoJSON with outline in black:
enter image description here

QGIS rendered TopoJSON:
enter image description here

2 Answers

The problem was finally solved by setting the ArcType in Cesium:

entity.polygon.arcType = Cesium.ArcType.GEODESIC;

Correct answer by ulrich on June 10, 2021

Based on the assumption, that this is a Cesium rendering bug, I was going to check, which kind of geometries would be distorted.

It seemed, that the artifacts were appearing preferably along latitudinal boundaries in west-east direction.

I made a few tests:

A "simple" geometry along west-east looks good: enter image description here

A geometry with a few more vertices already shows artifacts: enter image description here

A geometry in north-south direction does not show artifacts: enter image description here

A geometry in west-east direction also shows artifacts on the southern hemisphere: enter image description here

Then I was going to split the geometry into multiple polygons to decrease the extent of a single geometry in west-east direction. After splitting it into sufficient small geometries, that seems to reduce the artifacts: enter image description here enter image description here

When removing the boundaries, it is visually not very obvious, that there are multiple geometries displayed.

enter image description here

This might not be an acceptable solution in some cases where a complete single-part geometry is neccessary but at least it enhances the rendering.

Answered by ulrich on June 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP