[Rebuild] Coordinates of deleted nodes

Andy Allan gravitystorm at gmail.com
Fri Jul 6 21:06:07 BST 2012


Hi All,

Co-ordinates of deleted nodes still show up, even if they are set to
0,0 on upload

<osmChange version="0.6" generator="Redaction bot">
  <delete>
    <node id="573785524" changeset="11173438" user="Redaction bot"
uid="0" visible="false" timestamp="2012-04-01T00:00:00Z" version="1"
lat="0" lon="0"/>
  </delete>
</osmChange>

http://redaction.apis.dev.openstreetmap.org/browse/node/573785524/history

That's because the coordinates aren't updated by the API when it deletes a node.

https://github.com/openstreetmap/openstreetmap-website/blob/master/app/models/node.rb#L131

Notice that delete_with_history! doesn't update the latitude or
longitude from new_node, whereas update_from does.

I see three options

A) Modify rails_port so that deleting a node updates the lat/lon
B) Modify rails_port so that lat/lon of a deleted node is not visible
on the website or via any api calls
C) Modify the bot so that any node deletions are preceeded with a
separate modify, i.e. modify(lat,lon), then delete

Which is best?

Cheers,
Andy

P.S. I prefer A :-)



More information about the Rebuild mailing list