Problems with select by Polygon - Update
Randy Page
randy.page at TERRAVERGE.COM
Tue Aug 3 06:14:25 PDT 2004
I have been doing some more experimentation with this problem, and have
found that a point query (identify) works with the mapfile as it is
currently setup, so there must be an issue with the url formatting I am
passing into the CGI. I also tried using imgshape and passing in pixel
coordinates, but that also produced the same results as the mapshape.
So, if anyone has any suggestions, or could share an example of a working
select by polygon, I would greatly appreciate it.
Thanks!
Randy
Hi All,
Im attempting to select a group of census tracts using a user defined
polygon. As a test, I created a simple rectangle that I am using to
select the tracts. The end result I need is a list of the tract IDs that
fall within the supplied rectangle. Below is the URL I am using to
execute the query:
http://myserver.com/scripts/mapserv.exe?map=/maps/tiger.map&mapext=-
78.83+35.87+-
78.70+35.96&mode=nquery&mapsize=440+320&qlayer=tracts&layer=tracts&mapshape
=-78.83+35.96+-78.70+35.96+-78.83+35.87+-78.70+35.87+-78.83+35.96
Below is the layer definition from the mapfile:
LAYER
NAME "tracts"
STATUS DEFAULT
CONNECTIONTYPE postgis
CONNECTION "user=Administrator dbname=tiger
host=localhost"
DATA 'the_geom from tracts_c'
TYPE QUERY
TOLERANCE 5
CLASS
TEMPLATE querytemplate.html
END
END
I get two possible results:
1) If I include the TEMPLATE line, the server just sits there and
eventually times out.
2) If I comment out the TEMPLATE line, I get: msQueryByShape():
Search returned no results. No matching record(s) found.
Any ideas on what I am doing wrong?
Thanks in advance,
Randy
More information about the MapServer-users
mailing list