Skip to content

Allow detecting duplicate nodes in ways when creating geometry#2473

Open
joto wants to merge 1 commit into
osm2pgsql-dev:masterfrom
joto:detect-duplicate-nodes
Open

Allow detecting duplicate nodes in ways when creating geometry#2473
joto wants to merge 1 commit into
osm2pgsql-dev:masterfrom
joto:detect-duplicate-nodes

Conversation

@joto
Copy link
Copy Markdown
Collaborator

@joto joto commented May 16, 2026

When linestrings or polygons are created from ways, duplicate nodes are removed automatically. Generally this is what you want. But sometimes it makes sense to be able to detect this situation, for instance when creating some debug output.

The information is available on the C++ side anyway, this change exposes this information in the Lua code as a second return parameter of the as_linestring and as_polygon functions which can be ignored during normal use.

When linestrings or polygons are created from ways, duplicate nodes are
removed automatically. Generally this is what you want. But sometimes
it makes sense to be able to detect this situation, for instance when
creating some debug output.

The information is available on the C++ side anyway, this change exposes
this information in the Lua code as a second return parameter of the
as_linestring and as_polygon functions which can be ignored during
normal use.
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.

1 participant