[Mapserver-users] Searching for crossing streets

Mario Servin mservin at tecnoaccion.com.ar
Tue Mar 2 07:22:19 PST 2004


Hi,
    I did the following CGI query for getting the closest street near the
click of the mouse:
http://mariolaptop/MYPages/Scripts/mapserv_41.exe?mode=nquery&itemquery=[NAME]&layer=calles&imgxy=10+10&mapext=shape&imgext=-71.899651+-41.582889+-71.086875+-40.770450&map=c%3A%2FDocuments+and+Settings%2Fmario%2FMyPages%2Fitasca%2Fquery.map&savequery=true&img.x=452&img.y=265&map_calles_tolerance=10

I use a query.map and a query .html that follows:
query.html:
Calle: [ID] Nombre:[NAME]<br>

query.map:
#
# Start of map file
#
NAME DEMO
STATUS ON
SIZE 600 600
EXTENT -71.89965056 -41.36073059 -71.08687515 -40.99260904
UNITS DD
SHAPEPATH "Bariloche"
IMAGECOLOR 255 255 255

# you may need to change this to match your MapServer build
IMAGETYPE PNG


#
# Start of layer definitions
#

#Bariloche
LAYER
 NAME calles
 GROUP Calles
 TYPE LINE
 DATA Calles
 STATUS OFF
 TOLERANCE 1
 TOLERANCEUNITS meters
 CLASS
  TEMPLATE query.html
 END
END


END # Map File

 As you can see I modify the TOLERANCE attribute of my layer 'calles'
(streets in spanish) to get the minimum number of streets near my location.
I want to use this for finding two crossing streets near me. The process
will follow like this: wiht a minimum TOLERANCE value (10 meters as an
example ) I found a street. Then I should increment the TOLERANCE and
requery to mapserver. Here's my problem. I need to use the previous result
to filter the new ones as again I will get the same street (among others).
This time I need the nearest street EXCEPT the found in the previous query.
I did set the SAVEQUERY=true but I do not know how to use it. Can anybody
help me?.
    Regards
                Mario





More information about the MapServer-users mailing list