Skip to content

[Bug]: an extent indicator joins its outline across gaps on a custom projection, and stops short of a globe's rim #2369

Open

Description

@jgregoriorincon

Before you start

  • I searched the existing issues and did not find a duplicate.
  • This is a bug report, not a usage question.

What happened?

A layout's extent indicator (the outline of one map frame drawn on another, as a Publication Layout's locator shows it) has two remaining flaws in how it follows the outlined frame's edges. Both are in frame_outline_lonlat (crates/render/src/layout.rs); found in review of #2355.

  1. A flat frame on a custom projection can be outlined with a chord. Each edge is sampled 16 times and read back to longitude/latitude. On a custom projection, a sample outside the projection's domain gives no position, and it is dropped without leaving a gap, so the samples on either side are joined by a straight line across the frame it is drawn on. Frames on the globe already leave a gap there (fix(layout): size and centre a globe locator so it fits its circle near a pole (#2348) #2355); the flat path still doesn't. This already happens on main.
  2. On a frame on the globe seen in part, the outline stops short of the disc's rim. Where an edge runs off the disc, the outline breaks at the last of its 16 samples still on the disc, so it can end up to a sixteenth of the edge short of the rim (about 2.5 mm on a 40 mm frame).

Steps to reproduce

  1. For the first: a map on a custom projection whose domain doesn't cover the whole world (for example one limited to a hemisphere), and a layout with a map frame on it whose edge runs past that domain, outlined by an extent indicator on another frame.
  2. For the second: a map on the Globe projection, a map frame zoomed so that the disc is taller than the frame but narrower than its diagonal (its sides off the disc), outlined by an extent indicator on a globe locator.
  3. Export the layout and look at the outline.

Expected behavior

  1. The outline breaks where the frame's edge leaves the projection's domain, as it does on the globe, with no line across the map.
  2. The outline reaches the disc's rim where the edge leaves it, for example by bisecting each transition between a sample on the disc and one off it.

Each fix needs a test: a custom projection whose domain cuts a frame edge (no line between the two sides of the cut), and a globe frame seen in part (the outline's ends on the rim).

How are you running RustGIS?

Desktop app (built from source)

Version

f03d9c5 (branch of #2355)

Activity

  1. jgregoriorincon commented on Nov 17, 2026

    @jgregoriorincon
    ContributorAuthor

    I'm taking this one; it follows #2355.

  2. jgregoriorincon commented on Nov 18, 2026

    @jgregoriorincon
    ContributorAuthor

    A third case for this issue, from the review of #2355: a frame on the globe around a pole, outlined on a flat frame. Its ring spans a whole turn of longitude, and outline_lonlat moves a globe frame's ring as a whole to the flat frame's side of ±180°, so a stretch of it stays off the world and isn't drawn (before #2355 the same ring drew a line across the map). Expected: the ring split at ±180° in the flat branch, each piece drawn where it lies, with a test of a pole-containing globe frame on a flat locator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions