[OSM-dev] spatial reference

Artem Pavlenko artem at mapnik.org
Mon Jul 2 20:45:44 BST 2007


Hi Martijn,

(dev list is too slow, replying without receiving your reply :]

On 7/2/07, Artem Pavlenko <artem at mapnik.org> wrote:
 >
 > Hello,
 >
 > I had a chance to go through tile.openstreetmap.org implementation  
and I'd
 > like to suggest some improvements.
 >
 > At the moment we store x,y,z and there is a key(x,y,z). I think we  
can
 > improve by introducing spatial reference (also known as quad key  
etc) and
 > this is exactly what MS VE, Oracle and others are using. There are  
a few
 > benefits but the main one is
 > that standard b-tree index will  'cluster' tiles spatially,  
resulting in
 > better I/O.  It will also simplify and reduce table size a little  
bit.

  >> Look in the wiki for quadtiles, I think it resembles your  
proposal a lot.

Yes, absolutely, Thanks for the pointer. I'm talking for particular  
usage, though - exact key matching (not ranges).

 >> As for speed inprovement, do think it will speed it up or have  
you tested it?

Theoretically using one b-tree index with interleaved x,y should  
alway be better. In practice it depends on implementation.
No, I haven't tested this, but it is worth trying/testing, IMHO.
I reckon key(A) is _always_ better then key(A,B,C). And some brief  
look at mysql docs seems to support my view.

Can anyone who *does* know how MySQL handles composite index  
internally help here, please ?

Have a nice day,

Artem Pavlenko
http://mapnik.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20070702/136bf0cc/attachment.html>


More information about the dev mailing list