[mapserver-users] Flexible queries

Emerson, Gabe gemerson at WelshCo.com
Wed Sep 17 08:13:53 PDT 2008


Hi All,

 

I have an interesting mini-project which some of you might have dealt
with before, I'd be interested in any suggestions. 

 

I'd like to run a query (presented to users as an address search),
across multiple layers. For example, after an address is entered, the
system first searches an in-house dataset, if there are no matches it
searches a county parcel dataset, and if both fail, it tries to map the
address via a geocoding API. 

 

The issue I'm running into is that each of the layers stores addresses a
little differently. The in-house set tends to be sloppy about
punctuation and things like directions ('N' vs 'North', 'St' vs 'ST.' vs
'Street',  etc).  The county is more standardized but breaks everything
up into street prefix, name, type, suffix, etc. (Minnesota Met Council,
for those of you familiar with it). In addition, users tend not to enter
addresses the same way twice, and to leave out things like the street
type and direction.

 

I'm wondering if there's a way to relax the query matches so that
something like "100 James" will return a match from a DBF containing
"100 South James Ave", or a set of columns like "100" "S" "James" "Ave".
Something along the lines of  The Geocoding API is flexible in this way,
so one solution I considered is to use it as an address parser and then
use  the returned X,Y data for an itemquery on each of the layers. The
problems with that are slower performance  and possible API
unavailability. 

 

Currently I'm using Mapserver in CGI mode with some Javascript for
frontend logic and custom tools. I developed the application this way
for various reasons, but am considering moving to PHP Mapscript for
better performance.  If something like this is possible with the CGI
approach I'd love to hear about it, but I'd also be interested in
mapscript ideas or examples. 

 

Thanks!

 

-Gabe

 

 

Gabe Emerson

Research Department

Welsh Companies

4350 Baker Road, Suite 400

Minnetonka, MN 55343-8695

 

952-897-7700, ext. 1306

gemerson at welshco.com

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080917/ba0bd2fd/attachment.htm>


More information about the MapServer-users mailing list