[OSM-talk] OGL, OSM, NASA

Raphaël Jacquot sxpert at esitcom.org
Tue Apr 25 14:47:15 BST 2006


SteveC wrote:
> * @ 25/04/06 02:13:52 PM sxpert at esitcom.org wrote:
> 
>>flags or not, I'm not sure what the performance of those
>>
>>a.latitude > $lat2  and a.latitude < $lat1  and a.longitude > $lon1 and 
>>a.longitude < $lon2
>>
>>statements are, compared to the nice r-tree index I'm using, especially 
>>as it is used twice in the request I showed earlier, plus some more 
>>hacks to select the segments...
> 
> 
> Right.. but rather than help and move the code and db, you want to
> reimplement everything?

erh... guess this is a big-ass misunderstanding :D

here goes the long story :

a long long time ago, in a place far, far away... I was living in the US 
and was looking at gps navigation systems that they were selling in car 
stores that were going for a few thousands, plus 200 or so per year for 
a new dvd...

I figured that there should be some free software of doing this, and I 
looked around. There were already a few packages doing that sort of 
thing, notably gpsdrive (no offense Jörg) but all it offered at the time 
was downloading image maps from mapblast or something

so, I set out to write myself a gps system based on the tiger database 
(I was in the US at the time, remember).

then september 11th happened, my company fired me and I came back to .fr

that's when I discovered the state of map data in europe, with every 
country having their own little geographic monopoly charging an arm and 
a leg for 1 year licenses (for instance, France's IGN charges 2M € a year)

so.. I set out to write some software to capture map data, and edit it 
(some sort of precursor to josm, see mapeditor on the navsys web site).

One of my mistakes was to insist on writing the whole thing in C, with 
my own data structures and the like (I didn't know anything about 
databases at the time, and I was not a cartographer by any means... 
after all, my initial training is in computer network engineering)

three years ago I started a new job at the University I'm currently 
working at, and learned databases (I'm their Information Systems 
Engineer). I learned a great deal on the job.

Last year, I discovered OSM, and thought that 'hey, that's exactly what 
I've been working on for the past few years', and I started 
participating (as shown by my rank on the database stats page :D)

I pretty soon noticed the fact that the thing was pretty slow and had 
considered it a thing of life, not having time to delve into it further

a few months ago, I started working with python for some work related 
stuff, and found it rather easy to use...
Having worked on my gps system in C for a few years already, and going 
nowhere (because of whatever...) I thought that hey, python is fine, 
let's use it and rewrite the gps software with it.
I set out to write the thing in python, and pretty soon I had something 
useable. alas, I was still using my own data structures (converted from 
C to the python equivalent), and it was getting slower and slower as I 
was driving.

I am working with postgresql at work, and it's a real nice database, so, 
I naturally had a tendency to check out the newer releases. which is 
when I discovered a chapter I overlooked in the doc, "geometric data 
types"...

I figured "hey, this looks good, let's try it.
the first thing I worked on was to replace the storage of breadcrumbs 
for the gps app to display. after battling the missing 'point_ops', I 
figured I could accelerate my app greatly using nice r-tree indexes that 
were available.
that's when I started reading the current OSM code and thought to myself 
"no way... no wonder it's slow as molasses"...

then I needed to show already drawn streets from OSM in my navigation 
system (so as to know where to drive next). and started writing more 
code and more sql which had me end up with a db structure pretty similar 
to the one OSM uses (with the exception of the history data, but that 
could be arranged)

as I figured that the osm server was slow for some reason, I set out to 
create a replica that could be used as a temporary repository that would 
be synced at night, allowing me to use josm much faster. so I started 
writing a clone of the api...

that's where I am right now...





More information about the talk mailing list