Problems with select by Polygon

Steve Lime steve.lime at DNR.STATE.MN.US
Tue Aug 3 11:15:20 EDT 2004


What version are we talking?

>>> randy.page at TERRAVERGE.COM 8/2/2004 9:23:50 PM >>>
Hi All,

I'm 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