[Tile-serving] [openstreetmap/osm2pgsql] Fix: Create point geometry from collection with single-node way (PR #1767)
mboeringa
notifications at github.com
Mon Sep 19 16:20:54 UTC 2022
@joto,
I am just wondering: is this actually desired behavior?
E.g., lets assume I have code like the one I posted here:
https://github.com/openstreetmap/osm2pgsql/discussions/1752#discussioncomment-3579004
where I use new 'flex' syntax to specifically select "w" or way role members from a relation. Now lets assume there is a bad way in there having only a single node. In that case, despite attempting to specifically select only ways, with this change, I will unexpectedly end up with a osm2pgsql generating a point geometry instead.
Doesn't this break the:
> The GeometryCollection we spoke about contains one geometry for each node and way member, so you can iterate over both the object.members array as well as the result of object:as_geometrycollection() at the same time, ignore the members of type relation and you have a one-to-one correspondence between roles and geometry.
remark you wrote in the https://github.com/openstreetmap/osm2pgsql/discussions/1752#discussioncomment-3555849 issue remark, where the "one-to-one" correspondence no longer holds?
Wouldn't it be better to drop such a geometry as "invalid", and not return it as part of the geometry collection?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1767#issuecomment-1251244812
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1767/c1251244812 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220919/592479e7/attachment.htm>
More information about the Tile-serving
mailing list