Geographical indexing

Thomas Flemming tf at ttqv.com
Sun Apr 19 03:14:43 CDT 2009


Hi Ruslan,

the 4.0.1 works fine for me.
I moved all polygon-points of one street-segment to a blob-field and access is 
now very fast.
Even reading of normal field-values is a bit faster, since they are not 
variant anymore but of correct data-types.
Thanks a lot.

One remaining issue I still have.

Reading map-objects always starts with a "spatial select"
This means: "give me all objects which are in a certain area".

So I set up some tables with indexed fields:
obj_id, ext_north, ext_south, ext_east, ext_west

So my select is for example:

(select obj_id from tableidx_1 where not ((ext_north < 48903994) Or
                                           (ext_south > 49146819) or
                                           (ext_east  < 8998828)  or
                                           (ext_west  > 9366460)))
union
(select obj_id from tableidx_2 where not ((ext_north < 48903994) Or
                                           (ext_south > 49146819) or
                                           (ext_east  < 8998828)  or
                                           (ext_west  > 9366460)))
...

This gives me all object_ids which are not outside of the requested area.
Its fast, but since it has to be queried very often while mapdetail changes it 
is now the bottleneck.

Do you see another way? Is there a chance to improve this?

Using API, cascading calls to FindRange() is slower.

Unfortunately there is no spatial index like a rtree in Valentina.
Do you maybe plan, to add this?

Best regards,
Tom


-- 
/****************************************
**   Dipl.-Ing. Thomas Flemming
**   Software Development
**
**   Touratech AG
**   Auf dem Zimmermann 7-9
**   D-78078 Niedereschach
**
**   mail  tf at ttqv.com
**   fon   +49 (0) 7728 9279-206
**   fax   +49 (0) 7728 9279-29
**
**   http://www.ttqv.com
**   http://www.touratech.de
**
**   ... und immer dem Pfeil nach!
***************************************/


More information about the Valentina mailing list