Re: 2D spatial data

2009-11-11 Thread Thomas Mueller
Hi, Thanks a lot for the link! I will have a look if I find a faster solution if I have time... What would be the easiest benchmark I can run? The most efficient way to use the MultiDimension tool is now: MultiDimension multi = MultiDimension.getInstance(); String sql = multi.generatePreparedQu

Re: 2D spatial data

2009-11-11 Thread Jan Kotek
Hi Marcus, > A few Gigabyte. 1-2 German states from OpenStreetMap. I have simular problem. I have astronomical application which is using spherical spatial index. Areas are mapped into RangeSets using Healpix < http://healpix.jpl.nasa.gov/ >. My typical RangeSet have 1e10 pixels and 1e7 ranges.

Re: 2D spatial data

2009-11-11 Thread marcus.wolschon
On Wed, 11 Nov 2009 07:12:42 +0100, Thomas Mueller wrote: > Hi, > >> I found the spatial-tool to be much slower >> then indexing the lat and lon -column directly > > Which tool do you mean, and how did you test it? I'm not sure if you > mean the tool that is included within H2: > > http://www.

Re: 2D spatial data

2009-11-10 Thread Thomas Mueller
Hi, > I found the spatial-tool to be much slower > then indexing the lat and lon -column directly Which tool do you mean, and how did you test it? I'm not sure if you mean the tool that is included within H2: http://www.h2database.com/html/features.html#multi_dimensional If it's slower than us

Re: 2D spatial data

2009-11-10 Thread Marcus Wolschon
On Wed, Nov 11, 2009 at 6:12 AM, Marcus Wolschon wrote: On Tue, Nov 10, 2009 at 2:36 PM, Ryan McKinley wrote: > > Another approach is to store point data as a geohash -- then a range > query is mapped to a single field rather then two. > > see: http://en.wikipedia.org/wiki/Geohash > > lucene ha

Re: 2D spatial data

2009-11-10 Thread Ryan McKinley
Another approach is to store point data as a geohash -- then a range query is mapped to a single field rather then two. see: http://en.wikipedia.org/wiki/Geohash lucene has a good Apache licensed geohash function: http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/spatial/src/java/org/a

Re: 2D spatial data

2009-11-10 Thread Christopher Lakey
We often store spatial data as a varchar, byte array, or LOB using either the OGC Well Known Text (WKT) format or Well Known Binary (WKB). If you want an index for searching, you can store the bounding box (minx, mint, maxx, maxy) and do a range query on these values. The intersection exres

Re: 2D spatial data

2009-11-09 Thread Martin Davis
I don't have any direct experience with storing & accessing 2D point data on H2, but for other databases it's been the case that for *point* data it's very efficient simply storing the points as X and Y columns and putting indexes on both columns. Range searches are carried out by simply using th