Closest Feature Query

Steve Lime steve.lime at DNR.STATE.MN.US
Tue Jul 12 22:04:27 PDT 2005


The normal MapServer query will do this but only using "as the crow flies" distances. You use the layer tolerance to set a maximum distance. If you need to need to compute distances along an established route then that's a different story and is not something MapServer can do out of the box.

Steve

>>> Abe Gillespie <abe.gillespie at GMAIL.COM> 07/12/05 10:05 PM >>>
Is there an easy way to query for the closest feature to another
feature.  Take for example the classic "closest ATM" query.  I know
where I'm at (an address point or building feature) and want the
closest ATM.  Can I avoid having to create a line to each ATM point
from the starting point, comparing the length of each line, and
keeping the shortest?

Thanks.
-Abe



More information about the MapServer-users mailing list