mapbox / mapbox/geojson.io

linestrings are rendered by the flat earth society

Open
#913 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.3k
Forks
640
PR merge metrics
No merged PRs in 30d

Description

I entered the following GeoJSON in `geojson.io`:

```json
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[52.9548, 16.41254],
[-112.85016, 50.8102]
]
},
"properties": {}
}
]
}
```

This is a long arc, and on a spherical or nearly-spherical surface, one would expect the great circle route to bend towards the poles, as shown e.g. in this render from `gcmap.com`:

![Image](https://github.com/user-attachments/assets/e5eaba80-24cf-47d1-97bb-ce3477cf76fe)

However, `geojson.io` renders the path as a "straight line" in the Mercator projection, which is not a straight line on the surface of the earth:

![Image](https://github.com/user-attachments/assets/ea8d0623-7b8d-456f-8f2d-f134b8a182b3)

It would be better if `geojson.io` respected the curvature of the earth, or at a minimum had the option to do so somehow.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the supplied GeoJSON LineString in geojson.io and inspect how its map rendering currently handles LineStrings. Done means the issue’s requested behavior is addressed: the path follows the earth’s curvature, or geojson.io provides an explicit way to choose that behavior.

Written by the indexing model from the issue text.

Assessment

Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.