Skip to content

Bound compact display of wrapped geometries - #228

Open
Sinkleberg wants to merge 1 commit into
JuliaGeo:mainfrom
Sinkleberg:codex/bound-wrapped-geometry-display
Open

Sinkleberg wants to merge 1 commit into
JuliaGeo:mainfrom
Sinkleberg:codex/bound-wrapped-geometry-display

Conversation

@Sinkleberg

Copy link
Copy Markdown

Showing a wrapper around a foreign polygon could format every coordinate before the REPL shortened the output. Compact and limited displays now fetch just the children they show and stop expanding nested geometries when space runs out.

On a synthetic 10,000-point polygon with a 32-column limited display, child reads fell from 10,001 to one. The full package suite passed on Julia 1.10.13, including plotting tests and doctests.

Closes #204.

@evetion
evetion requested a review from asinghvi17 November 9, 2026 19:40
asinghvi17-bot added a commit to asinghvi17-bot/GeoInterface.jl that referenced this pull request Nov 17, 2026
…t check

- Negative widths (PrettyTables, displaysize (-1, -1)) use the bounded form
  as at JuliaGeo#228 again; drop the unconstrained-width native display and the
  foreign-child detection, so hidden children are not read or cloned.
- Guard the optional coordinate formatting so a backend without indexed
  getcoord keeps the display it already produced.
- Merge _may_fit_safely into _own_str; drop the nested try/catch in render
  and the unused isreadable method.
- Tests: XYPoint without getcoord, width -1 reads only visible children.

Harness: Claude Code
Model: claude-sonnet-5-5
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
asinghvi17-bot added a commit to asinghvi17-bot/GeoInterface.jl that referenced this pull request Nov 17, 2026
- Count children as Int, so backends that count and index with other
  integer types (UInt) are shown as at JuliaGeo#228.
- Drop the budgeted IO: what fits is already bounded by the fit check, so
  a display that does not fit is rejected by its width, not by an exception.
  Check for an own display only for what fits, as that lookup is the
  slowest part of a rejection.
- Drop the coordinates special case for foreign points: they are shown by
  their own compact display as at JuliaGeo#228, formatted once.
- Test an unsigned-integer line.

Harness: Claude Code
Model: claude-sonnet-5-5
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Print of large nested geometries is slow

1 participant