Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

osm2pgsql: relation geometries not updated when node is moved #2578

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: lonvia
[Submitted to the original trac issue database at 8.13am, Sunday, 27th December 2009]

When applying a planet diff in slim mode relation geometries in the *_line and *_polygon tables are sometimes not updated. This happens when a node of a member way is moved but neither the member ways nor the relation itself has been changed.

The reason is that in middle-pgsql.c way_changed_mark is called only for modified ways (in pgsql_way_changed()) but not for those marked pending by node_changed_mark in pgsql_node_changed().

@openstreetmap-trac
Copy link
Author

Author: amm
[Added to the original trac issue at 12.15am, Sunday, 28th October 2012]

I think this bug is no longer the case.

If a node gets changed, it calls the sql function node_changed_mark, which marks all of the ways that contain the node as pending. The going over pending ways function then calls the pgsql_out_ways function, which in return calls the way_changed function, marking any relations containing the way as pending. In the going over pending relations, the geometry for the relation should then correctly be rebuilt.

Lonvia, can you confirm that this is indeed the case and if yes, can you close this bug?

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 10.39pm, Monday, 29th October 2012]

Did a quick test and it seems to be working correctly. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant