I assume it calculates to every line section of the polyline combined with
some geographic search, so it doesn't check more polylines than needed.
Regards
Uffe Kousgaard
I'm not sure how the distance calculator (or the MapBasic 'nearest'
statement) works internally, nor do I think you can change the internal
parameters, but I would say that using it on a single complex polyline
would be a lot slower than on the same object split into many smaller
lined polylines - this is because of the spatial indexing that MapInfo uses.
As I understand it, MapInfo decides which objects to consider using
their minimum bounding rectangles - this is what the spatial indexes
work with. Unfortunately the MBR says nothing about the location of
nodes within the object. So if you use a single polyline, MapInfo has no
choice but to examine all the nodes some way. If however, the polyline
is split up into many smaller polylines, MapInfo can almost certainly
ignore some of those sections completely before it gets to examining
individual nodes, because their MBRs are too far away, though obviously
this will depend on what exactly you are asking.
Effectively, if you store your line as a single object, you are
preventing MapInfo from using the 'geographic filtering' that it is
geared up for. For the same reason, the line will probably be noticeably
slow to display and redraw.
Andy
--
Andy Harfoot
GeoData Institute
University of Southampton
Southampton
SO17 1BJ
Tel: +44 (0)23 8059 2719
Fax: +44 (0)23 8059 2849