Closest Feature Query

Abe Gillespie abe.gillespie at GMAIL.COM
Wed Jul 13 11:43:32 EDT 2005


Yes, "as the crow flies" is fine; no routing needed.  How is this done
in PHP MapScript?

Thanks.
-Abe

On 7/13/05, Steve Lime <steve.lime at dnr.state.mn.us> wrote:
> 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