developmentseed / developmentseed/deck.gl-raster

Globe view: screen-space-error LOD (fix limb-foreshortening over-fetch)

Open
#567 0 comments 0 reactions 1 assignee Claimed by @kylebarron View on GitHub
Dominant language
TypeScript
Stars
228
Forks
29
Avg merge
12h 27m
Merged PRs (30d)
4

Description

> Written by Claude on behalf of @kylebarron

## Context

In the globe-view prototype (#563, part of #82), tile LOD uses the Web Mercator `getMetersPerPixel(lat, zoom)` model evaluated at the tile's center latitude (`packages/deck.gl-raster/src/raster-tileset/raster-tile-traversal.ts`).

## Problem

That model is exact at the view center but ignores globe **limb foreshortening**: tiles near the globe's edge appear compressed on screen yet are assigned the same LOD as if they were at the view center, so they **over-fetch** (more detail than needed — never under-fetch). Functionally fine, but wasteful.

## Fix

Use a camera-aware **screen-space-error** metric: project the tile's bounding volume to screen, measure its pixel span vs. the tile's source pixel dimensions, and drive LOD off that. This handles foreshortening directly and would also subsume the mercator-latitude approximation.

This overlaps the spherical-reprojection accuracy work (#563 follow-up) and could be tackled together.

## Links

- Follow-up to #563; part of #82.
- See `dev-docs/coordinate-systems.md` → "Globe view" → "LOD gotcha" for the current approximation and why the latitude is read from the mercator-world bounds.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.