[OSM-talk] (no subject)

dblasby at openplans.org dblasby at openplans.org
Wed Apr 26 23:41:35 BST 2006

>now, does my approach make any sense ?

I took a quick look at this, and I've noticed that OSM seems to store
each point as a row in the database.  I'm not 100% sure why this is
done - but I'll assume there's a good reason for it.

Most road datasets store edges instead of points.  For example, if you
look at tiger you'll see edges (represented two ways - start/end point
and as the complete chain of points).  There's about 35,000,000 edges
(chains) and about 280,000,000 points (avg of 8 points/chain).

You'll also find road datasets store things slighly more network-centric
(node/edge graphs), coverage bases (tiger is actually a giant
winged-edge data structure), or as Linear Events in an LRS.

It seems to me that if you were to store things on an edge basis,
instead of point-basis you'd find that your database will be much more
efficient.  As I said, I dont really know the OSM datamodel and I'm
sure there's a good reason for storing individual points.

I also noticed you're using segments (2 point chains), which is also
inefficient - why not just use homogeneous chains?  You're also using a
box_cache which you dont need if you're using real geometry objects
(plus the bbox will be in the index).


This mail sent through IMP: https://webmail.limegroup.com/

More information about the talk mailing list