plotly / plotly/plotly.js

[Feature Request / Bug]: Limitations in scattergeo and natural earth projection when handling antimeridian crossing and programmatic centering

オープン
#8,046 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug P2 size: 3
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
28

説明

Description
When working with long-haul transpacific flight tracks that cross the 180° meridian (antimeridian) on a 2D map view (natural earth projection), scattergeo exhibits severe limitations regarding automatic centering, zooming, and boundary rendering.

Specifically, attempting to programmatically center the map on routes crossing the dateline results in projection clipping or shifts the view incorrectly (e.g., to the Atlantic/African perspective). While injecting null values into coordinate arrays successfully prevents straight lines from stretching awkwardly across the entire globe, it breaks standard spherical centroid and midpoint calculations. Furthermore, because bounded 2D projections like natural earth lack infinite horizontal wrapping, smooth centering across the antimeridian is virtually unsupported.

Steps to reproduce
Set up a scattergeo plot using the natural earth projection (geo.projection.type: 'natural earth').

Plot a flight path with coordinates crossing the 180° meridian (e.g., from Vancouver [-123.18, 49.19] across the Pacific to Seoul [126.44, 37.46]).

Attempt to programmatically update geo.center or geo.projection.rotation.lon to focus/zoom into the midpoint of the route.

Note the issue: The flat 2D projection either clips/shifts the viewport entirely away from the Pacific or forces lines to span across the map, as there is no native antimeridian-aware centering support for bounded 2D geo projections.

Notes
This issue impacts custom flight dash applications using scattergeo where users want to select specific routes to zoom into. Having native support for antimeridian-aware bounding/centering or seamless horizontal wrapping in flat 2D projections would eliminate the need for complex workaround scripts.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

natural earth 投影を使用する scattergeo 設定から始め、特に geo.center と geo.projection.rotation.lon を確認し、日付変更線をまたぐ Vancouver–Seoul ルートを再現します。このケースで、中央揃え、ズーム、境界の描画、座標配列がどのように動作するかを調査します。2D の natural earth マップで、このようなルートをクリッピング、誤ったシフト、または地球全体にまたがる線なしにフォーカスできれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
data-visualization
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。