Offline OpenStreetMap SDK?

OK, here’s my idea: I want to build an SDK so I can use OpenStreetMap within .NET applications, but without an internet connection. There are so many uses for this! On boats, custom applications, laptops in the field etc.

Additionally, IÂ’d like to be able to plot points by lat/long and link points programatically.

HereÂ’s what I envisage:

  • Download the OSM data for the entire world
  • Create a .NET component to render it to look just like on the site.
  • Add a PlotPoint and CreateLink function.
  • Release open source!

Ok, that first part (downloading) is easy. But the second part, well, that’s a hell of a job.

How enormous do you think this job is? Has anybody attempted such a feat… if so, where, and how can I help?

Does anybody have any ideas where to start?


I believe there is already a .NET application that can do just about what you’re proposing here: Kosmos.

It cannot (realistically) load the entire planet dump, but you’d be a godlike programmer if you could pull that off and be able to really work on/with the data… Kosmos’ll be a good place to start anyway.

I’m risking showing some arrogance here, but a loading an entire planet.osm dump isn’t that hard. Sure you would have to do some programming but it’s not that hard, if HD space isn’t an issue… :wink:

emj, that’s cruel… you give me hope, but no answers! there is a solution, but I have to stop being lazy and fingure it out myself :slight_smile:

emj, on a more serious note, do you think so? I’ve been doing some serious reading, and the concept of tiling isn’t so hard to understand. If I pre-generated all of the tiles, then made viewer in .NET to display the pre-rendered tiles, that’d be a start.

I’m just downloading Fedora 8 and the entire planet file, and I’m going to read the guide I found at on how to make your own OSM server.

That should help me learn this stuff…

Thanks for the tip about Kosmos, too, Lambertus.

If anybody comes up with some ideas, let me know!

Well, realistically, I would be surprised if you could load the entire planet into RAM on an ‘average’ machine and be able to work on it. Remember that a bz2-ed planet is almost 4GB in size and that Osmosis (a Java tool for working on the planet file) needs more than an hour to extract a simple bounding box from the planet file on an AMD64 X2 4200 with 3GB RAM.

There is approximately 400MB of data (18*10^6 *(nodes+ways+refs_between_them)) that need to be in memory. Without all tags, so you will still need to seek on the disk.

Tiling is fun, try to do the tiling separately from your SDK, since you are going to need to do that in batch jobs anyway. And it could be fun to have a /api/0.7beta/map RESTfull call that uses tiles. On a serious note just try to get some code written, every bit of code is sacred, every contribution is greatly appreciated.

Seriously, I think you can do a lot just using the planet.osm dump.

PS. I failed in my Monty Python reference… :wink: DS.

Us Linux or Apple guys would love to build or use off-line apps that do the same thing. Any chance you’d consider building this SDK in a cross-platform software technology such as Mono or Java?

Better yet, if it was in C, we could create bindings for all languages (e.g. Python, Perl, et al).

An offline API would be cool. I’ve thrown together something simple for python. The code is in git here: