You may want to check out the source code for Mapserver.. The algorithm is probably in there somewhere. I'd start by looking at mapsearch.c. Denise Demone Interpretation Resources Consulting Inc. Amherst, NS Phone: (902) 661-0830 Fax: (902) 661-2241 Email: ddemone at interp-resources.ns.ca Web: www.interp-resources.ns.ca