Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid ways/rels update for non moving node updates #1059

Closed
wants to merge 1 commit into from

Conversation

cquest
Copy link
Contributor

@cquest cquest commented Jan 11, 2020

No description provided.

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() ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

{
return cache->get(osm_id);
}

Copy link
Contributor

@mmd-osm mmd-osm Feb 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are also other places in the code where nodes_get would have to be implemented, see compiler errors:

In file included from /home/travis/build/openstreetmap/osm2pgsql/tests/test-parse-extra-args.cpp:15:

/home/travis/build/openstreetmap/osm2pgsql/tests/mockups.hpp:7:8: note:   because the following virtual functions are pure within ‘dummy_middle_t’:

 struct dummy_middle_t : public middle_t {

        ^~~~~~~~~~~~~~

In file included from /home/travis/build/openstreetmap/osm2pgsql/tests/test-parse-extra-args.cpp:9:

/home/travis/build/openstreetmap/osm2pgsql/middle.hpp:91:30: note: 	‘virtual osmium::Location middle_t::nodes_get(osmid_t)’

     virtual osmium::Location nodes_get(osmid_t osm_id) = 0;

@lonvia lonvia force-pushed the 1.2.x branch 2 times, most recently from 0ab45a6 to 7d9f3e9 Compare June 28, 2020 14:55
@joto
Copy link
Collaborator

joto commented Nov 27, 2020

Closing the outdated PR. We still have the open issue.

@joto joto closed this Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants