CesiumGS / CesiumGS/cesium

GeoJSON renders incorrectly with default Rhumb arc type

Open
#8,042 12 comments 0 reactions 0 assignees View on GitHub
category - data sources category - polygons/geometry type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

I'm using Cesium 1.60.0 and trying to load GeoJSON describing borders of Russia. I extracted this GeoJSON from shape files found on [NaturalEarth](http://www.naturalearthdata.com/downloads/) (1:50m resolution, cultural). Unfortunately, Cesium does something wrong while rendering the GeoJSON. Seems like it draws polygon lines between points that should not be connected with each other.

I report this issue because this GeoJSON is displayed as expected with another software such as QGIS.

[Sandcastle example](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/#c=ZZBLa8MwEIT/ivHFDhTJr8R264RCCoVS6CHQky9raZ2ola2gR0Ly6ysnbeljb7vzzTLMAXRwEHhEHSyDEY/BGo1wA3m93OKIXda1Gi2IEXU0u2vHK084WNgopz1CgPP40/mI6smo8eFbJVIBj6OdtXtzS+lWGEu2wu5c5wxq5l/jaAlTA8XzGWldQVn2i4RBV/GsWKR5XxTJvK47ZJjDnGo40hpYUXgy7ROe9zmrkrLOoPRytiizPmVVUfZFzql2xgggbz5RNJvChzdhY+xJ4qodAz/3YtgrbQOnZUwItTjsJVg0tHPsHX0uYyZbQ79MDReHQPBlG/7ppg0DJsEYr/ROyo04YxuuGur5X7apDjFuXw6oJZwmZJeunq9HQkhD/frfZZWSHegfHz8A)

```javascript
var viewer = new Cesium.Viewer('cesiumContainer');
viewer.dataSources.add(Cesium.GeoJsonDataSource.load('https://gist.githubusercontent.com/ezze/98a77f60cab8d24613f440599bece3a5/raw/9ac4498a1f0d3f3c80792a73a52672f1c847f43d/russia.json'));
```

![1](https://user-images.githubusercontent.com/665479/62494084-4aabba80-b7db-11e9-8bc9-5a798f3089c9.png)

*Cesium doesn't display GeoJSON properly*

![2](https://user-images.githubusercontent.com/665479/62494206-92cadd00-b7db-11e9-805f-d966936905cd.png)

*QGIS displays GeoJSON as expected*

![3](https://user-images.githubusercontent.com/665479/62494216-9b231800-b7db-11e9-9a4c-c14a6113800e.png)

*[geojson.io](http://geojson.io) displays GeoJSON as expected*

![4](https://user-images.githubusercontent.com/665479/62494211-965e6400-b7db-11e9-906e-569611bbbbc7.png)

*[mapshaper.org](https://mapshaper.org) displays GeoJSON as expected*

Browser: Chromium Version 75.0.3770.142 (Official Build) Built on Ubuntu , running on Ubuntu 18.04 (64-bit)

Operating System: Kubuntu 18.04

Contributor guide

Open the contributing guide

Research direction

Start with the linked Sandcastle example and reproduce the issue using GeoJsonDataSource.load with the provided Russia GeoJSON. Trace the default Rhumb arc rendering and compare it with QGIS, geojson.io, and mapshaper; done means the borders render without spurious polygon connections.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.