[Tile-serving] [openstreetmap/osm2pgsql] avoid ways/rels update for non moving node updates (#1059)
mmd
notifications at github.com
Sat Feb 15 10:40:16 UTC 2020
mmd-osm commented on this pull request.
> @@ -82,15 +84,21 @@ int osmdata_t::node_modify(osmium::Node const &node)
{
slim_middle_t *slim = dynamic_cast<slim_middle_t *>(mid.get());
- slim->nodes_delete(node.id());
- slim->nodes_set(node);
+ osmium::Location oldnode = slim->nodes_get(node.id());
+ if ( node.location().x() != oldnode.x() || node.location().y() != oldnode.y() ) {
osmium::Location has both == and != operators, so `node.location() != oldnode` should do here.
https://github.com/osmcode/libosmium/blob/master/include/osmium/osm/location.hpp#L489
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1059#pullrequestreview-359339144
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20200215/c1cc5627/attachment.htm>
More information about the Tile-serving
mailing list