You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: A GeoTIFF read in place across a 0–360° seam is drawn as two parts that don't see each other #3345
Since #1109, a global grid stored from 0 to 360° and seen across its seam is read in two strips when it is read in place and zoomed in past its overview: draw_in_place in crates/render/src/raster.rs reads want.cols and want.cols2. Each strip is then drawn as a raster of its own. A part has no whole turn (full_turn_width is None for it), so a cell at a strip's edge sees nothing past the seam.
Anything that reads a cell's neighbours shows a line there that the same view of the file read whole doesn't have:
a Shaded Relief's light (its 3 × 3) and bilinear sampling lose the column across the seam: a one-cell line;
The line follows the seam, so it moves with the map when it is dragged.
Found in the review of #3342, which reads the view with flat ground's neighbourhood around it but leaves the seam as it was.
Steps
Add a global DEM stored 0–360° as a cloud-optimised GeoTIFF by its address (read in place).
Style it as a Shaded Relief, with "flats": {"amount": 1, "size": 6} to see it best.
Zoom in past its overview on 0° longitude, so the seam is in view.
Expected
The view across the seam is drawn as the file read whole draws it: each strip reads the other's columns as its neighbours.
Actual
A line along the seam: one cell wide in the light, up to size cells with flat-area detail.
Proposed fix
Read each strip with the other strip's first columns as its margin (a strip ending at the last column reads the first pad columns past it, and the reverse), or join the two strips into one part before drawing it. A test needs a global option in rustgis_data::raster::cog::example (a grid from 0 to 360°). It would compare a view across the seam, read in place, with the middle of a wider view, as flat_ground_detail_read_in_place_has_no_step_at_the_views_edges does for the view's edges (#3342).
Activity