osm2pgrouting (#24) - other alternative tools for converting OSM Data into PostgreSQL (#306) - Message List

other alternative tools for converting OSM Data into PostgreSQL

Hi, due to the fact, that osm2pgsql only imports attributes that are necessary for rendering the map, I created some new JAVA - Tools to convert OSM-Data into PostgreSQL - Scripts. You can find them right here: http://pgrouting.postlbs.org/wiki/ProgramsToConvert They also import attributes that are NOT necessary for rendering a map from those data (for example "surface"). One of the programs is for automatically resampling the geometries in a table from geographical reference system into the google projection.

Maybe someone enjoys those little tools or finds them usefull.

Best regards

René Westerholt

  • Message #1145

    but it doesnt create topology ?

    • Message #1150

      Hi, no. I created them in the context of a software project at the university. We worked with OSM2PGROUTING for creating topology. But this new tools have the function to import ALL the attributes for each point or line. OSM2PGSQL only import attributes that are necessary for rendering. So, if you desire to create a database just for displaying some data maybe as WMS - Layer this tools (nodes2postgis, etc.) are very good because they give you the opportunity to display really all attributes of the osm - data. But they don't create topology for routing (because this wasn't the reason I created them for).

      Best regards

      René Westerholt

      • Message #1151

        "OSM2PGSQL only import attributes that are necessary for rendering." --> I mean rendering in OSM! (If you want to display the surface of a street, this attribute is necessary for you, but in OSM it's not.)

  • Message #1188

    Thanks! It's very nice!

    • Message #1195

      how does it import the osm data ?

      by first writing all nodes to db and then querying the nodes from db for making multilinestring ways ? this would be a bit slow

      • Message #1200

        Hi,

        it runs through an OSM - File with an JAVA - XML Parser and saves the nodes (or lines, depending on using lines2postgis or nodes2postgis) as java-objects. Then it creates .sql - scripts by evaluating those objects. One of the scripts creates the accordant table and the other one imports the data with "insert into" commands. If you use it for importing the data of a medium-size city (for example Osnabrueck) it works fine and only needs a few seconds (I think it took 8 seconds...). Once I tried to import the data of the federal state of the Saarland and it also worked. Admittedly, I didn't check it out for bigger datasets.

        Best regards

        René Westerholt