data (#23) - Want to import .osm data to PostGIS easily? (#329) - Message List

Want to import .osm data to PostGIS easily?

Yes, the data will come from OpenStreetMap?, have real bi-directional routing topology, all the OSM tags, speed limits, etc. You name it, we'll deliver it... in the next version, of course... or the next after that... perhaps. Well, anyway:

You will need:

  • Good Linux skills (getting sources from svn, compiling, resolving dependencies)
  • Know Java programming (locating and building missing jars)
  • Know SQL, complex queries
  • Basic understanding of PostgreSQL geometries and PostGIS, or want to learn
  • to build your own PostGIS database for routing
  • to get one-way roads, speed limits, etc. right
  • Enough time to try out a few solutions and to communicate if (or how well) they're working.
  • Communication skills to clearly state your Goals what exactly do you need from the tool.
  • Patience to get an early prototype of the tool working, then use it, and analyze what is still missing from the results you're getting, then communicating your findings back to the project.

You will get:

  • The Perfect Tool you were looking for, in due time. ;-)
  • Learn a lot on the topic of PostGIS, pgRouting, and OSM data for routing.

On the other hand, if you are in a hurry, then move along. There's nothing for you to see in here. At least not at this time. ;-) Please come back after the project has matured a bit. See you next year or so!

Oh, and yes, you really need to say YES to ALL the items listed above. Please don't come with questions on how to install pgRouting on your Windows box or how to set your Java CLASSPATH. If you know what I mean, then you're welcome to check this out.

This project is pre-alpha. It means it's not fully functional. It has bugs, missing features, etc. Still interested?

Okay then. You have been warned, but you insist, so here we go:

Welcome to the OSM2PostGIS project at:  https://sourceforge.net/projects/osm2postgis/

Free? What do you mean "is it free"? Of course it's free! Released under Apache License V2.0. Full source. No catch. Will always be free.

  • Message #1369

    That sounds cool!
    Thanks for posting this here. If you like you can create a Wiki page to describe and advertize OSM2PostGIS.
    (Just first page is not freely editable because of Wiki spam)

    Looking forward to try it out!

    • Message #1376

      Thanks, I will create the page after some time. Right now I'm working on the tool itself. My main goal is to have it behave well even with very large data sets. The other tools I have tried cannot really handle big files. OSM2PostGIS does not use too much memory or CPU, so it's well-behaved even with the full planet.osm file.

      The current version has already read over 300 million lines of the latest planet.osm (33 GiB in PostgreSQL) and seems to be working pretty well. It will take several days before this first full test run finishes, so I will report the results when it's done.

      It's still an early prototype and not performance optimized at all. Still, it's currently inserting at a rate of about 1000-1200 OSM nodes per second (on my quad core Xeon L5420 / SATA RAID-1). The input parser is a hundred times faster, so the bottleneck is currently when writing the nodes to PostgreSQL.

      The current version already has a basic support for restarting after an interrupted run, i.e. the user can choose where the parsing starts (at which line number). If the same elements are imported again, they will replace those previosly imported, so restarting and merging over existing data is possible.

      It builds real topology, so it splits the OSM ways where they cross. It calculates the cost and reverse cost based on the OSM tags, one-way roads, speed limits, etc.

      The tool will keep improving quite rapidly for the following weeks. After all the basic features are in place, I will use a profiler to tune the multithreading behaviour, etc.