Thread: [indexing] 2d spatial + 1d value in one index?
Dear list members, Let me first introduce myself, I'm Martijn and currently doing my master's thesis research at Delft University (The Netherlands). I am working in the field of spatial databases and I am going to test, investigate and implement a data structure which is suitable for on-the-fly generalization of map data. I am a proponent of open source software, therefore I'd like to use PostgreSQL. Another candidate for my research is Oracle. However, I cannot find any information on PostreSQL if it is capable of creating a spatial index on 2 dimensional spatial data (on its native geometry types) plus an extra value, so in the tables there will be something like: geometry | importance value ------------------------------------------- line(x1, y1,...,xn, yn) | 5.0 line(x2, y2,...,xn, yn) | 2.0 Is there an (R-tree-like, i.e. reactive) index structure available which can handle such tuples, so the query optimizer can handle a. geometry (location in 2D) and b. the other value in one go? Thanks in advance, Martijn Meijers -- MSc student at Delft University of Technology URL: http://www.gdmc.nl/martijn/
On Tue, Nov 29, 2005 at 01:03:39PM +0100, Martijn Meijers wrote: > Dear list members, > > > Let me first introduce myself, I'm Martijn and currently doing my master's > thesis research at Delft University (The Netherlands). I am working in the > field of spatial databases and I am going to test, investigate and > implement a data structure which is suitable for on-the-fly generalization > of map data. <snip> > Is there an (R-tree-like, i.e. reactive) index structure available which > can handle such tuples, so the query optimizer can handle a. geometry > (location in 2D) and b. the other value in one go? Loor at the documentation about r-tree [1]. There are a number of operators defined which can use an r-tree index. There are is also support for GiST [2] which allows you to create an index for your own geometric types if you find the builtin versions too limited. Finally, look at PostGis which has a complete geo-spatial system for postgresql. Have a nice day, [1] http://www.postgresql.org/docs/8.1/interactive/xindex.html [2] http://www.postgresql.org/docs/8.1/interactive/gist.html [3] http://postgis.refractions.net -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.