-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to use rhumb lines for geometry #4000
Comments
The next version of the GeoJSON spec is in its final draft stages (and actually has been approved already I believe). I haven't read the whole thing yet, but it now explicitly defines hows to connect points to form geometry (and as suspected, Cesium is currently doing the wrong thing). |
Maybe I missed a conversation somewhere, but it would be nice if this happened long before the mythical 2.0 release we want to do. We need to make sure we conform to the latest GeoJSON spec. |
I expect it will happen sooner since we likely need it for 3D Tiles. Not sure why this is labeled 2.0. |
Sorry, I just labeled it 2.0 because we have a bunch of other geometry issues labeled 2.0 |
+1 |
While users may expect lat/lon boxes to be interpolated as rhumb lines, that is probably not true of other shapes. An option in the API would be nice, but the shortest distance between two points is always the geodesic. The 2D map library used by geojson.io is simply rendering a straight line in cartesian space between the 5 points in each box, which is taking advantage of the fact that a Mercator projection is being used (rhumb lines are straight lines in Mercator projections). If an addition to the API is made, I would highly suggest taking a look at Karney's algorithms as implemented in GeographicLib. His algorithm for geodesics is faster than Vincenty's method and does not have the same issues with antipodal points. There is an ellipsoidal rhumb line algorithm as well. Our application does its own GeoJSON parsing via another library and detects lat/lon rectangles. We then use |
Came up on the forum again: https://groups.google.com/forum/#!topic/cesium-dev/_T3vRx1D858 |
+1 |
1 similar comment
+1 |
Added in #7492 |
Congratulations on closing the issue! I found these Cesium forum links in the comments above: https://groups.google.com/forum/#!topic/cesium-dev/_T3vRx1D858 If this issue affects any of these threads, please post a comment like the following:
|
Once #3998 gets merged, example.geojson.txt loads nicely in Cesium but exposes an existing bug we never noticed. Check out these two screenshots, one from geojson.io and one from Cesium:
geojson.io
Cesium
As you can see, Polygons (and other surface geometry) are currently connected with geodesics. While GeoJSON doesn't specify what the correct behavior is, most users seem to expect rhumb. We should add an option to all surface geometry to allow for either behavior and then hook up
GeoJsonDataSource
to use it.The text was updated successfully, but these errors were encountered: