gap: a hedge that turns a corner is drawn as a straight line across the corner #262

Closed
opened 2026-09-02 00:46:57 +00:00 by viberfox-agent · 0 comments
Collaborator

Found while QA'ing #176 (issue #258). The layer this is about is already shipped;
#176 is what made me measure it, because it extends the same rule to walls.

The rule

docs/notes/surveyed-street-objects.md describes how a boundary surveyed as an
area becomes a line: "the extractor reduces each to the line down its middle —
the polygon's principal axis through its centroid, cut at its extremes."
That is a straight segment, whatever shape the polygon is. #176 accepts
scheiding_vlak (walls) on the grounds that it "takes the same centreline
reduction hedges take".

What I measured

Every current polygon over ~10x9 km of Groningen, restricted to genuinely linear
ones (mean width <= 2 m, so perimeter / 2 is a fair estimate of the run), and
compared that run against the straight principal axis the rule produces:

collection thin strips drawn more than 25% short
vegetatieobject_vlak (hedges, shipped today) 756 197 (26%)
scheiding_vlak muur (what #176 proposes) 286 37 (13%)

Worked examples from the walls, as (surveyed run -> drawn length, mean width):
44 m -> 22 m at 0.8 m wide; 146 m -> 108 m at 0.3 m wide; 14 m -> 10 m at 0.1 m
wide. A 0.1 m-wide polygon is unambiguously a line, so this is not a blob being
mis-measured — it is a boundary that bends, replaced by the chord across the
bend.

What a user would expect

A hedge round two sides of a garden to follow both sides. What the rule draws is
one diagonal from the far end of the first side to the far end of the second —
through the garden, and short at each end.

Where the seam is

The reduction itself is in cartopy's server/pipeline/bgt.ts, which this lane
cannot read; the note quoted above is the specification of it, and
crates/geo/src/furniture.rs's build_line_meshes stands one box per segment
of whatever it is handed, so it would draw a polyline correctly if it were given
one.

A polyline centreline — a straight skeleton, or simply the longer of the two
sides of the strip — costs a handful of extra points on the wire per feature.
The current cost of not having one is a quarter of the surveyed hedges.

Not new, and worth saying so

This is a property of the shipped hedge layer, not something #176 introduced.
Filed here because #176's decision to reuse the rule for scheiding_vlak
doubles the layer it affects, and because a wall drawn through a garden reads
worse than a hedge does.

Found while QA'ing #176 (issue #258). The layer this is about is already shipped; #176 is what made me measure it, because it extends the same rule to walls. ## The rule `docs/notes/surveyed-street-objects.md` describes how a boundary surveyed as an *area* becomes a line: "the extractor reduces each to the line down its middle — the polygon's principal axis through its centroid, cut at its extremes." That is a **straight** segment, whatever shape the polygon is. #176 accepts `scheiding_vlak` (walls) on the grounds that it "takes the same centreline reduction hedges take". ## What I measured Every current polygon over ~10x9 km of Groningen, restricted to genuinely linear ones (mean width <= 2 m, so `perimeter / 2` is a fair estimate of the run), and compared that run against the straight principal axis the rule produces: | collection | thin strips | drawn more than 25% short | |---|---|---| | `vegetatieobject_vlak` (hedges, **shipped today**) | 756 | **197 (26%)** | | `scheiding_vlak` `muur` (what #176 proposes) | 286 | 37 (13%) | Worked examples from the walls, as (surveyed run -> drawn length, mean width): 44 m -> 22 m at 0.8 m wide; 146 m -> 108 m at 0.3 m wide; 14 m -> 10 m at 0.1 m wide. A 0.1 m-wide polygon is unambiguously a line, so this is not a blob being mis-measured — it is a boundary that bends, replaced by the chord across the bend. ## What a user would expect A hedge round two sides of a garden to follow both sides. What the rule draws is one diagonal from the far end of the first side to the far end of the second — through the garden, and short at each end. ## Where the seam is The reduction itself is in cartopy's `server/pipeline/bgt.ts`, which this lane cannot read; the note quoted above is the specification of it, and `crates/geo/src/furniture.rs`'s `build_line_meshes` stands one box per segment of whatever it is handed, so it would draw a polyline correctly if it were given one. A polyline centreline — a straight skeleton, or simply the longer of the two sides of the strip — costs a handful of extra points on the wire per feature. The current cost of not having one is a quarter of the surveyed hedges. ## Not new, and worth saying so This is a property of the shipped hedge layer, not something #176 introduced. Filed here because #176's decision to reuse the rule for `scheiding_vlak` doubles the layer it affects, and because a wall drawn through a garden reads worse than a hedge does.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jeroen/cartopolis#262
No description provided.