Mapinfo Distance Calculator Methodology

163 views
Skip to first unread message

AndreaD

unread,
Mar 18, 2008, 5:03:19 PM3/18/08
to MapInfo-L
Hi,

I have a bit of a question on the methodology behind the distance
calculator tool in Mapinfo. How exactly does it work? I know it
measures from record to record, but how? Does it calculate to every
node in a file and pick the closest, or does it use some sort of
geographic query (like a buffer) to limit the nodes measured to, or is
it something I haven't even considered?

You see, I'm attempting to calculate the distance between a large
group of points and an exceedingly complex line. Earlier attempts at
simply buffering the line and selecting within produced crawlingly
slow processing times. Any help would be appreciated, thanks.

A. Dawkins

Uffe Kousgaard

unread,
Mar 19, 2008, 4:21:39 AM3/19/08
to mapi...@googlegroups.com
What prevents you from using the Distance Calculator for this task?

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

AndreaD

unread,
Mar 19, 2008, 10:38:14 AM3/19/08
to MapInfo-L
Hi;

I would like to use the tool. I was just trying to figure out if
anyone knew exactly how the program calculated the closest distance to
a line. Our fibre file is so detailed with so many nodes (it comes out
of an engineering GIS package) and covers such a large geographic area
that when we do things like creating buffers we have to chop it up
into smaller files to create the buffers and append them back together
due to the data intensity. Subsequently I just wanted someone to
confirm that the distance calculator doesn't calculate the distance
from a point to every node in the file (which would be just huge) but
rather has some geogrpahic filtering ie buffers that limit the nodes
it calculates to and goes out sequentially if no nodes are picked up
in the first pass. I was also wondering if it does do it this way , if
anyone knew what the default buffer settings are. It would be great to
be able to change them.

Thanks
ANdrea
> > A. Dawkins- Hide quoted text -
>
> - Show quoted text -

Andrew Harfoot

unread,
Mar 19, 2008, 12:28:30 PM3/19/08
to mapi...@googlegroups.com, andrea....@gmail.com
Hi Andrea

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

www.geodata.soton.ac.uk


Reply all
Reply to author
Forward
0 new messages