question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GeoJSON renders incorrectly with default Rhumb arc type

See original GitHub issue

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 (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

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

1

Cesium doesn’t display GeoJSON properly

2

QGIS displays GeoJSON as expected

3

geojson.io displays GeoJSON as expected

4

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

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
likangning93commented, Aug 14, 2019

For anyone who wants to do some close reading, here’s the relevant section of the spec linked at the PR referenced above: https://tools.ietf.org/html/rfc7946#section-3.1.1

   A line between two positions is a straight Cartesian line, the
   shortest line between those two points in the coordinate reference
   system (see Section 4).

   In other words, every point on a line that does not cross the
   antimeridian between a point (lon0, lat0) and (lon1, lat1) can be
   calculated as

   F(lon, lat) = (lon0 + (lon1 - lon0) * t, lat0 + (lat1 - lat0) * t)

   with t being a real number greater than or equal to 0 and smaller
   than or equal to 1.  Note that this line may markedly differ from the
   geodesic path along the curved surface of the reference ellipsoid.

   The same applies to the optional height element with the proviso that
   the direction of the height is as specified in the coordinate
   reference system.

   Note that, again, this does not mean that a surface with equal height
   follows, for example, the curvature of a body of water.  Nor is a
   surface of equal height perpendicular to a plumb line.
2reactions
OmarShehatacommented, Aug 8, 2019

This may due to the same issue as https://github.com/AnalyticalGraphicsInc/cesium/issues/7864. Try this Sandcastle which sets the arc type back to what it used to be. Let me know if this looks correct.

Read more comments on GitHub >

github_iconTop Results From Across the Web

geojsonio - Geojson fails to render correctly - Stack Overflow
I created this geojson file by hand and it loads correctly in QGIS but doesn't work on geojson.io. Could anyone spot what I...
Read more >
FactoryTalk View Site Edition User's Guide
ARC FLASH HAZARD: Labels may be on or inside the equipment, for example, a motor control center ... Showing undefined text strings in...
Read more >
Troubleshooting migration tasks in AWS Database Migration ...
Troubleshoot issues when migrating data using AWS Database Migration Service (AWS DMS).
Read more >
Learning the Basics - Gradle User Manual
Check out the full reference on all types of repositories for more information. ... By default the dependency report renders dependencies for all ......
Read more >
Jmol/JSmol Interactive Script Documentation
There are two basic Jmol command types -- "RasMol-like" commands (shown in bold ... case default echo for if message reset set switch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found