Spencer Simpson wrote:
Looking at the Distance Calculator source that comes with MapBasic 8.5, I
notice that the Distance Calculator is merely a wrapper around a single call
to a single statement you could type into the MapBasic window.  Thus, only a
future version of MapInfo Pro can add any significant optimization to the
process, if at all.
A call to "Set Table FastEdit On", as suggested by Peter, might help a
little, but you're creating an O(N) optimization in an operation that's
O(N^2) at best (and I fear much worse with polylines and region objects).
The underlying command allows you to specify minimum and maximum distance
criteria (I hope that means MapInfo uses the tables' spatial indexes), but
the criteria don't appear in the Distance Calculator dialog.

Spencer


I haven't tried this with distance calculations, but you can often increase the speed of spatial index based operations by breaking up (splitting) the objects being searched using a grid of regions created using the Create Grid mbx. This allows the spatial indexing to work more efficiently, particularly if the original objects were large and intertwined. Of course the splitting operation takes time, and is only really viable if the search table isn't updated frequently.

A slight aside, but I have noticed that the distance calc mbx appears to return a lower coordinate precision than running the same command - the Nearest statement - through the MapBasic window. For this reason I don't use the mbx.

Andrew

--
Andy Harfoot

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

Tel:  +44 (0)23 8059 2719
Fax:  +44 (0)23 8059 2849

www.geodata.soton.ac.uk

---------------------------------------
For further information about GeoData's
Training Courses, please visit:
www.geodata.soton.ac.uk/training
---------------------------------------


_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to