Repository navigation
feat: import barrier lines into the fence layer - #5
Merged
Merged
Conversation
barrier=fence|wall paths (GeoJSON or OSM) become fence lines: the projected path is walked along cell edges (a diagonal becomes a staircase close to it), pz:fence selects a style or fence_type a vanilla look, pz:posts sets the post spacing, pz:gates (metres along the source line) and barrier=gate nodes on the line become gates. Only the default styles actually used are added; the real lon/lat path is kept. Preserve edits keeps authored fences and refreshes sourced ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ECCGjSrSADcjxBmXdCBpm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Importer side of contract section 4 (#2). This PR is stacked on #4 (fence layer), which is stacked on #3.
What it does
barrier=fence|wall|city_wall|retaining_walllines and closed ways from GeoJSON or OSM becomeFenceLines.FenceStaircase. Straight runs stay single segments. A diagonal becomes a staircase that follows it (the test checks it stays within 1.5 tiles), and a step straight back cancels the previous one.pz:fencepicks a style that exists in the map. Otherwisefence_typepicks one of four vanilla looks: sheet, planks, picket or wire. Only the defaults actually used are added toFenceStyles.pz:postssets the post spacing.pz:gates(atin metres along the source line,opensleft/right,style) places a gate on the edge nearest that point;barrier=gatenodes within a tile of a fence become a vanilla wooden wicket on the nearest edge;Tests: a new case in
FenceLineTestscovers:fence_typeand defaults (including an unknownpz:fence);pz:gatesand abarrier=gatenode landing on the right edges;Results: core 344/344 passed,
npm test184/184 passed.Generated by Claude Code