OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2008-03-24 14:17:51

BenMap
Member
Registered: 2008-03-24
Posts: 2

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 openstreetmap.org 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?   

Regards,
Ben

Offline

#2 2008-03-24 22:43:09

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Offline OpenStreetMap SDK?

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.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#3 2008-03-25 11:09:21

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: Offline OpenStreetMap SDK?

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.. ;-)

Offline

#4 2008-03-25 11:44:42

BenMap
Member
Registered: 2008-03-24
Posts: 2

Re: Offline OpenStreetMap SDK?

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 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 http://www.passback.org.uk/maps/fedora.shtml 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!

Offline

#5 2008-03-25 12:42:07

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Offline OpenStreetMap SDK?

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.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#6 2008-03-25 14:50:22

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: Offline OpenStreetMap SDK?

Lambertus wrote:

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.

BenMap wrote:

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. !

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.. ;-) DS.

Last edited by emj (2008-03-25 14:55:18)

Offline

#7 2008-04-16 04:06:35

MDave
Member
Registered: 2008-04-09
Posts: 4

Re: Offline OpenStreetMap SDK?

BenMap wrote:

I want to build an SDK so I can use OpenStreetMap within .NET applications, but without an internet connection.

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).

Offline

#8 2008-04-23 14:18:32

rorym
Member
Registered: 2008-04-23
Posts: 32

Re: Offline OpenStreetMap SDK?

An offline API would be cool. I've thrown together something simple for python. The code is in git here: http://github.com/rory/python-osm/tree/master

Offline

Board footer

Powered by FluxBB