osm2pgrouting (#24) - Add column (#279) - Message List

Add column

Hi, I'm using osm2pgrouting to migrate map routing, but also make anothers functionalities such as search location by door number. I found that the ways splitted doesn't have the id of osm way, that is neccesary to relate other objects to the way directly from osm.

Then I realize that I could add osm_id column to the ways table and insert data inthere.

I put the patch on this file. It simply:

  • Add osm_id to Way model
  • Set osm_id on parsing
  • Insert osm_id in model generation

 http://drop.io/etnalubma/asset/osm-column-patch

Is this patch correct? Could I add to trunk version? Or is there some reason for the curent behavior?

  • Message #982

    Yes, it makes sense! Thank you! We just didn't think about linking results back to osm data. I'll put it to the trunk.

    • Message #1608

      It looks like this osm_id functionality is not yet in trunk. And I just went to apply the patch above to the latest osm2pgrouting I checked out of svn and it fails. I guess the latest osm2pgrouting revision has changed since July 2009?

      Anyone else having this problem? I may just be making a mistake...

      • Message #1609

        Actually, it does look like the latest revision (357, I think) does have the osm_id code. (The patch applies to revision 336.) However, the osm_id field is not appearing in my ways table.

      • Message #1612

        It has changed recently a bit but very small change, adding some include.

        • Message #1614

          I created a new version of osm2pgrouting that adds a new way_tag table. See Ticket #214 for details. Let me know if I should create a branch or just upload the new version as an attachment to the ticket.

          Thanks, Jordan

          • Message #1615

            Hi Jordan,

            Thanks for your effort!

            I know that I have written this a couple of times now already and nothing has changed, but we want to move pgRouting to OSGeo servers (or somewhere else if there is nothing going forward). Personally I would like to use GitHub? or so, which would make it easy for anybody to contribute code and patches, but there is no general agreement yet.

            For now it would be probably best to attach a patch if possible. In two weeks will be FOSS4G conference and I hope to be able to talk to some people directly to speed-up server migration.

            • Message #1617

              Great. I added the patch to Ticket #214. Let me know what you think.

              By the way, I don't think the trunk version (revision 357) that this is based on has the osm_id column patch. I haven't gone back to look at earlier revisions to see if maybe it was there and then got rolled back b/c of another change.