Opened 10 years ago

Closed 7 years ago

#2578 closed defect (fixed)

osm2pgsql: relation geometries not updated when node is moved

Reported by: Sarah Hoffmann Owned by: jburgess777@…
Priority: major Milestone:
Component: osm2pgsql Version:
Keywords: Cc: lonvia@…


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().

Change History (4)

comment:1 Changed 10 years ago by Ldp

Owner: changed from Tom Hughes to jburgess777@…

comment:2 Changed 8 years ago by Tom Hughes

Component: utilsosm2pgsql

comment:3 Changed 7 years ago by amm

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?

comment:4 Changed 7 years ago by Sarah Hoffmann

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.