[Bug] GlobeView far plane clips data far above the surface, such as geostationary orbits
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- data-visualization
Research direction
The far plane is computed in modules/core/src/viewports/globe-viewport.ts from altitude, GLOBE_RADIUS and farZMultiplier. Start by reproducing the report with a ScatterplotLayer at [135, 0, 35786000] and checking GlobeViewport.project depth at 800x600. Done means that point is drawn and pickable at the default view, or that the GlobeView docs state the far plane limit and when to set farZ. The issue leaves the fix open between the two, so confirm the direction with maintainers first.
Written by the indexing model from the issue text.
Description
Description
GlobeViewport sets the far plane to reach the far side of the globe (modules/core/src/viewports/globe-viewport.ts):
const farZ = opts.farZ ??
(altitude + (GLOBE_RADIUS * 2 * scale) / height / Math.max(Math.cos(pitchRadians), 0.1)) * farZMultiplier;
Data far above the surface can be behind this plane. A geostationary orbit is 35,786 km high, so the far side of the GEO ring is about 6.6 Earth radii from the center of the globe. The far plane is 1 radius past the center. Thus, deck.gl clips the far half of the GEO ring, and picking misses those objects.
I measured this in the satellite example in deck.gl-community (visgl/deck.gl-community#1126): at the default view, 908 of 16,899 active satellites are behind the far plane. The example now sets farZMultiplier: 8.
Flavors
- Script tag
- React
- Python/Jupyter notebook
- MapboxOverlay
- GoogleMapsOverlay
- CARTO
- ArcGIS
Expected Behavior
One of these:
- The far plane includes the data, for example from the layer bounds or the largest altitude in the scene.
- Or the
GlobeViewdocs state the limit and say when to setfarZMultiplierorfarZ.
Steps to Reproduce
new Deck({
views: new GlobeView(),
initialViewState: {longitude: 0, latitude: 0, zoom: 0},
layers: [
new ScatterplotLayer({
data: [{position: [135, 0, 35786000]}], // far half of the GEO ring, not behind the globe
getPosition: d => d.position,
radiusMinPixels: 10
})
]
});
The point does not draw, and picking does not find it. GlobeViewport.project (800x600) gives this depth for [lng, 0, 35786000]:
| Longitude | farZMultiplier: 1 |
farZMultiplier: 8 |
|---|---|---|
| 90 | 0.935 | 0.440 |
| 135 | 1.173 (clipped) | 0.617 |
| 180 | 1.237 (behind the globe too) | 0.664 |
Environment
- Framework version: deck.gl master (10.0.0-alpha)
- Browser: Chromium
- OS: macOS
Logs
None.
- Dominant language
- TypeScript
- Stars
- 14.8k
- Forks
- 2.3k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 230
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from visgl/deck.gl
-
[Bug] Tile3DLayer selects no tiles until the camera moves when tileset.json loads right after a layer updatePossibly taken @lee3Q claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
[Bug] SplitterWidget calls onDragStart on drag end; Deck._getViews writes into the app's views arrayPossibly taken @04jennet-coder claimed this 20 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
[Bug] WMSLayer positions EPSG:4326 images as CARTESIANPossibly taken @athomct claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
[Bug] MapLibreOverlay under React StrictMode: 'WebGL context already attached to device' because the attach path omits _reuseDevicesPossibly taken @jsve claimed this 84 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
visgl/deck.gl#10681 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
accessibility area:ci ci-test level:low priority:high type:test
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
skytuhua-org/Gen-V1#3132 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
drmrd/vernacular#1238 ·
Maintainers usually reply within 1 day
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
enhancement migration-prioritized
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Hudson-Pufferfish/local-party-console#136 ·
Maintainers usually reply within 1 day
-
priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day