Skip to content

preserve natural=coastline on outer ways during Merge operation (Fixes #11816) - #11818

Merged
tyrasd merged 3 commits into
openstreetmap:developfrom
Kaushik4141:fix-(#11816)
Apr 21, 2026
Merged

tyrasd merged 3 commits into
openstreetmap:developfrom
Kaushik4141:fix-(#11816)

Conversation

@Kaushik4141

@Kaushik4141 Kaushik4141 commented Jan 27, 2026 •

Copy link
Copy Markdown
Contributor

this applies the same fix logic from 62e1714 to the merge operation

fix

Now, when coastline ways are merged into a multipolygon, the natural=coastline tag stays on the outer ways rather than being shifted to the relation, as recommended by the OSM wiki

image

changes

Modified modules/actions/merge_polygon.js to extract natural=coastline before merging tags

Added a regression test in test/spec/actions/merge_polygon.js to verify that natural=coastline stays on the way while other tags move to the relation.

Fixes #11816

Comment thread test/spec/actions/merge_polygon.js Resolved
Comment thread modules/actions/merge_polygon.js Resolved

@matkoniecz matkoniecz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works as far as I can see :)

@tyrasd tyrasd added the bug A bug - let's fix this! label Apr 21, 2026

@tyrasd tyrasd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Refactoring out the tag to osm/tags.js was a good idea to make this more maintainable in the future.

@tyrasd
tyrasd merged commit b63aa0a into openstreetmap:develop Apr 21, 2026
3 checks passed
tyrasd added a commit that referenced this pull request Apr 21, 2026
@k-yle k-yle added the ai-assisted This PR makes extensive use of outsourced intelligence label Nov 15, 2026

This branch was successfully deployed

1 active deployment
pr-preview-11818 — 984fad9b Deployed Mar 17, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted This PR makes extensive use of outsourced intelligence bug A bug - let's fix this!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

natural=coastline tag should remain on outer way when multipolygon is created using "merge" operation

4 participants