gap: the grass keep-out asks the register's category, so orchards and cover crops lose their grass too #225
Labels
No labels
agent
agent:ci
agent:done
agent:failed
agent:needs-input
agent:refined
agent:refining
agent:running
agent:shipped
agent:skip
autonomous
autopilot
driven
local
plan
proposal
qa
qa-gap
research
retro
ship
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jeroen/cartopolis#225
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while QA-ing what #203 shipped (#217).
What I did
Served the crop tree from a stand-in extractor (see #217) and stood on the ground
at 52.499607, 5.658834 — the seam between a registered pear orchard (
gewascode1098, category
Bouwland) and the natural grassland beside it (1926,Grasland) — with and without the register served, everything else identical:What happened
The keep-out works, and it takes the orchard's grass with it. Without the
register the orchard floor is carpeted in near-field blades; with it the trees
stand on bare ground, with a straight edge where the grassland parcel starts.
grows_grass()asks the category and nothing else:Everything the register files as
Bouwlandis therefore treated as ploughedearth — including the parcels this same file styles as something else entirely:
orchard green ("standing trees, the deepest green here after maize") and OSM
independently tags the same ground
landuse=orchard, which is what puts thetree rows on it. An orchard alley in the Netherlands is mown grass.
groenbemesting, vanggewas:ryegrass and red fescue sown to be ploughed in. The table gives them a cover-crop
green and calls them "the second most numerous thing on arable land after the
crop itself"; five of the 72 arable parcels in the sampled Flevoland cell are
these. They are literally fields of grass with the blades switched off.
What a user would expect
Grass under the fruit trees. The register's category answers "is this land
worked?", which is not the same question as "does grass grow here?" — and the
distinction matters most for the two families the tone table already treats as
green.
Where the seam is
crates/geo/src/crops.rs—CropCategory::grows_grass, andcrops::rgba fewlines below it, which already knows the finer answer per code. The keep-out
consumer is
crates/geo/src/turf.rs(ArableMask::build→crops::arable_triangles), so a per-code rule costs nothing there: the samefilter, asked of the code instead of the category. Suggested shape —
grows_grass(code)returning true for the orchard, cover-crop and nurseryfamilies and falling back to the category otherwise, with the existing
blades grew on an arable parceltest extended by one case per family.Note the fix is a strict improvement in area terms either way: without it the
correct behaviour on true arable land (the thing #203 set out to fix, and it does
fix) costs the orchards and cover crops their grass.