Were you able to try this Christophe?   I expect it to only be a very slight
performance improvement, but I'm still curious as to how much.


On 6/9/08, Shane Harrelson <[EMAIL PROTECTED]> wrote:
>
> Each pair of columns (min/max) represents one dimension.  So for
> latitude/longitude coordinates you would have 5 columns: 1 id column and 2
> columns each for latitude and longitude.   5 "columns" equates to 2
> dimensions of data.  7 "columns" equates to 3 dimensions of data.  Etc.
>
> HTH.
> -Shane
>
>
>  On 6/9/08, Christophe Leske <[EMAIL PROTECTED]> wrote:
>>
>>
>> > You can improve performance (space/speed) a little by changing the
>> > RTREE_MAX_DIMENSIONS at the top of rtree.c to match you data set.   It
>> > defaults to 5 dimensions, but you could reduce to this to 2, or 3 with
>> city
>> > size.
>> >
>> > #define RTREE_MAX_DIMENSIONS 5
>> >
>> Hi Shane,
>>
>> thanks for the answer.
>>
>> AFAIK, this wouldn´t work though, as 3 dimensions would mean that you
>> could only query if a given point is in a line?
>>
>> If i do a 3 dimensional rtree, then
>>
>> 1 field = ID
>> 2 field = longitude_min
>> 3 field = longitude_max (and NOT latitude)
>>
>> The third parameter also always needs to be smaller than the second one
>> passed (or generally spoken, the second one has always to be bigger than the
>> first one), otherwise a rtree request wouldn´t work...
>>
>> Say we would do such a 3 dimensional rtree (id, longitude, latitude) - how
>> could I query for cities in a given rectangle?
>>
>> Select * from rtree where longitude>longitude_minimal and
>> longitude<maximal and latitude>latitude_minimal and
>> latitude<latitude_maximal?
>>
>> Would that actually work?
>>
>>
>>
>> Christophe Leske
>>
>> www.multimedial.de - [EMAIL PROTECTED]
>> http://www.linkedin.com/in/multimedial
>> Lessingstr. 5 - 40227 Duesseldorf - Germany
>> 0211 261 32 12 - 0177 249 70 31
>>
>>
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to