GithubHelp home page GithubHelp logo

Comments (5)

mikelmaron avatar mikelmaron commented on June 10, 2024

Found the bug at https://github.com/rsoden/osm-history/blob/master/import_scripts/pbf_to_mongo.rb#L101

When PbfParser is initiatilized, it parses the first FileBlock. "next" parses the next FileBlock. So what's happening here is that the first FileBlock is skipped. This explains the missing nodes in my case.

I'll commit a fix and make a pull request tomorrow, gotta run.

from epic-osm.

jenningsanderson avatar jenningsanderson commented on June 10, 2024

Wow. This makes a ton of sense and I'm really glad you caught this, sorry for my absence, but I'm back now and will look for your request tomorrow.

from epic-osm.

mikelmaron avatar mikelmaron commented on June 10, 2024

@jenningsanderson just made pull request

Found one other issue. Fixing PbfParser didn't resolve problems with all missing modes. When OSMMongoable constructs a Way (or Relation) geometry, it was selecting Nodes (or Ways) that matched the exact same changeset. But these "component" Nodes (or Ways) won't necessarily have been edited at the same time. Modified the logic to match the most recent changeset.

from epic-osm.

mikelmaron avatar mikelmaron commented on June 10, 2024

btw, if I had time right now, would add additional tests to import_pbf_spec.rb, to test under various scenarios that the result in mongo from a test pbf file matched expectations. don't have time though now; another ticket?

from epic-osm.

jenningsanderson avatar jenningsanderson commented on June 10, 2024

Thanks, @mikelmaron, I just accepted the pull -- I will start another ticket for the import specs -- these will be even more important once we get a system in place to do larger imports.

from epic-osm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.