[Mapserver-users] itemquery problem -- I'm pulling my hair out.

Ryan, Adam ARyan at co.linn.or.us
Wed Nov 19 16:02:19 EST 2003


This is a multi-part message in MIME format.

------_=_NextPart_001_01C3AEE0.6B7605B0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset="iso-8859-1"


It looks like your miny is greater than you minx in you map file extent.  

Adam Ryan
GIS Analyst
Linn County GIS Department
County Courthouse / Room 25
300 SW Fourth Ave.
Albany, OR 97321
541.812.8760
aryan at co.linn.or.us
 

-----Original Message-----
From: Mac Birch [mailto:mac at mbirch.com] 
Sent: Wednesday, November 19, 2003 10:52 AM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] itemquery problem -- I'm pulling my hair out.

Has anyone had any success using itemquery with MS 4.0 with IIS on 
XP-Professional? 

My map file extents have been carefully defined to include a box 
that is much, much larger than the theme coverage I'm searching.

All other aspects of the system work, but I still am getting the 
dreaded "Search returned no results. No matching record(s) found, 
layer and area of interest do not overlap." message.

Here's the .map file I'm using:

#
# Start of map file
#
NAME TESTQuery
STATUS ON
SIZE 480 520
EXTENT 1300000 1443024 4126986 -682424
SHAPEPATH "c:\myApplicationPath\buckscounty\GIS\data"

OUTPUTFORMAT
  NAME png
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE RGBA
  EXTENSION "png"
END

#
# Start of web interface definition
#
	
WEB
  #EMPTY ../../buckscounty/gis/RecNotFound.htm
  TEMPLATE queryResult.htm
  IMAGEPATH "e:\myimagepath\buckscounty\tmp\"
  # LOG "testQuery.log"
END

QUERYMAP
  STATUS ON
  STYLE HILITE
  COLOR 255 255 0
END

LAYER
  NAME boundaries
  DATA townBoundaries
  STATUS DEFAULT
  TYPE  polygon
  TEMPLATE queryResult.htm 
  CLASS
    COLOR 212 212 212
    OUTLINECOLOR 0 0 0
  END
END

END # Map File

Here's the essence of the form I'm submitting:

<form action="http://www.mydomain.com/gis/mapserver40-
png/mapserv.exe" method="get">
<input type="hidden" name="map" 
value="../../mapPath/buckscounty/gis/testQuery.map">
<input type="hidden" name="mode" value="itemquery">
<input type="hidden" name="savequery" value="true">
<input type="hidden" name="qlayer" value="boundaries">
<input type="hidden" name="qitem" value="Name">
<input type="hidden" name="mapext" value="shapes">
<input type="submit" value="Submit Query">
<input name="qstring" size="45">
</form>

I have tried submitting just about every possible combination of 
qstring options I can think of. for example,

([Name] EQ 'Doylestown')
([Name] EQ "Doylestown")
('[Name]' IN 'Doylestown')
([Name] = 'Doylestown')
([Name] = "Doylestown")
('[Name]' EQ "Doylestown")
('[Name]' EQ 'Doylestown')
('[Name]' EQ Doylestown)  -- Yikes!!

etc. (I think you get the picture)

Upper/lower cases of the "Name" variable and "Doylestown" are 
identical to those that appear in the shapefile.dbf table

It appears that MS is simply not finding the requested variable in 
the qstring, so I even tried submitting strings that would always 
evaluate to TRUE, such as

(1 EQ 1)
(1 = 1)
(2 GE 1)
(2 <= 1)
([Name] EQ [Name]  etc.

Still, the same result.

Where have I gone wrong? Please share your success stories.

Much Appreciated

--Mac--


_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

------_=_NextPart_001_01C3AEE0.6B7605B0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUS-ASCII">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [Mapserver-users] itemquery problem -- I'm pulling my hair =
out.</TITLE>
</HEAD>
<BODY>
<BR>

<P><FONT SIZE=3D2>It looks like your miny is greater than you minx in =
you map file extent.&nbsp; </FONT>
</P>

<P><FONT SIZE=3D2>Adam Ryan</FONT>
<BR><FONT SIZE=3D2>GIS Analyst</FONT>
<BR><FONT SIZE=3D2>Linn County GIS Department</FONT>
<BR><FONT SIZE=3D2>County Courthouse / Room 25</FONT>
<BR><FONT SIZE=3D2>300 SW Fourth Ave.</FONT>
<BR><FONT SIZE=3D2>Albany, OR 97321</FONT>
<BR><FONT SIZE=3D2>541.812.8760</FONT>
<BR><FONT SIZE=3D2>aryan at co.linn.or.us</FONT>
<BR><FONT SIZE=3D2>&nbsp;</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Mac Birch [<A =
HREF=3D"mailto:mac at mbirch.com">mailto:mac at mbirch.com</A>] </FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, November 19, 2003 10:52 AM</FONT>
<BR><FONT SIZE=3D2>To: mapserver-users at lists.gis.umn.edu</FONT>
<BR><FONT SIZE=3D2>Subject: [Mapserver-users] itemquery problem -- I'm =
pulling my hair out.</FONT>
</P>

<P><FONT SIZE=3D2>Has anyone had any success using itemquery with MS 4.0 =
with IIS on </FONT>
<BR><FONT SIZE=3D2>XP-Professional? </FONT>
</P>

<P><FONT SIZE=3D2>My map file extents have been carefully defined to =
include a box </FONT>
<BR><FONT SIZE=3D2>that is much, much larger than the theme coverage I'm =
searching.</FONT>
</P>

<P><FONT SIZE=3D2>All other aspects of the system work, but I still am =
getting the </FONT>
<BR><FONT SIZE=3D2>dreaded &quot;Search returned no results. No matching =
record(s) found, </FONT>
<BR><FONT SIZE=3D2>layer and area of interest do not overlap.&quot; =
message.</FONT>
</P>

<P><FONT SIZE=3D2>Here's the .map file I'm using:</FONT>
</P>

<P><FONT SIZE=3D2>#</FONT>
<BR><FONT SIZE=3D2># Start of map file</FONT>
<BR><FONT SIZE=3D2>#</FONT>
<BR><FONT SIZE=3D2>NAME TESTQuery</FONT>
<BR><FONT SIZE=3D2>STATUS ON</FONT>
<BR><FONT SIZE=3D2>SIZE 480 520</FONT>
<BR><FONT SIZE=3D2>EXTENT 1300000 1443024 4126986 -682424</FONT>
<BR><FONT SIZE=3D2>SHAPEPATH =
&quot;c:\myApplicationPath\buckscounty\GIS\data&quot;</FONT>
</P>

<P><FONT SIZE=3D2>OUTPUTFORMAT</FONT>
<BR><FONT SIZE=3D2>&nbsp; NAME png</FONT>
<BR><FONT SIZE=3D2>&nbsp; DRIVER &quot;GD/PNG&quot;</FONT>
<BR><FONT SIZE=3D2>&nbsp; MIMETYPE &quot;image/png&quot;</FONT>
<BR><FONT SIZE=3D2>&nbsp; IMAGEMODE RGBA</FONT>
<BR><FONT SIZE=3D2>&nbsp; EXTENSION &quot;png&quot;</FONT>
<BR><FONT SIZE=3D2>END</FONT>
</P>

<P><FONT SIZE=3D2>#</FONT>
<BR><FONT SIZE=3D2># Start of web interface definition</FONT>
<BR><FONT SIZE=3D2>#</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR><FONT SIZE=3D2>WEB</FONT>
<BR><FONT SIZE=3D2>&nbsp; #EMPTY =
./../buckscounty/gis/RecNotFound.htm</FONT>
<BR><FONT SIZE=3D2>&nbsp; TEMPLATE queryResult.htm</FONT>
<BR><FONT SIZE=3D2>&nbsp; IMAGEPATH =
&quot;e:\myimagepath\buckscounty\tmp\&quot;</FONT>
<BR><FONT SIZE=3D2>&nbsp; # LOG &quot;testQuery.log&quot;</FONT>
<BR><FONT SIZE=3D2>END</FONT>
</P>

<P><FONT SIZE=3D2>QUERYMAP</FONT>
<BR><FONT SIZE=3D2>&nbsp; STATUS ON</FONT>
<BR><FONT SIZE=3D2>&nbsp; STYLE HILITE</FONT>
<BR><FONT SIZE=3D2>&nbsp; COLOR 255 255 0</FONT>
<BR><FONT SIZE=3D2>END</FONT>
</P>

<P><FONT SIZE=3D2>LAYER</FONT>
<BR><FONT SIZE=3D2>&nbsp; NAME boundaries</FONT>
<BR><FONT SIZE=3D2>&nbsp; DATA townBoundaries</FONT>
<BR><FONT SIZE=3D2>&nbsp; STATUS DEFAULT</FONT>
<BR><FONT SIZE=3D2>&nbsp; TYPE&nbsp; polygon</FONT>
<BR><FONT SIZE=3D2>&nbsp; TEMPLATE queryResult.htm </FONT>
<BR><FONT SIZE=3D2>&nbsp; CLASS</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; COLOR 212 212 212</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 0</FONT>
<BR><FONT SIZE=3D2>&nbsp; END</FONT>
<BR><FONT SIZE=3D2>END</FONT>
</P>

<P><FONT SIZE=3D2>END # Map File</FONT>
</P>

<P><FONT SIZE=3D2>Here's the essence of the form I'm submitting:</FONT>
</P>

<P><FONT SIZE=3D2>&lt;form action=3D&quot;<A =
HREF=3D"http://www.mydomain.com/gis/mapserver40-" =
TARGET=3D"_blank">http://www.mydomain.com/gis/mapserver40-</A></FONT>
<BR><FONT SIZE=3D2>png/mapserv.exe&quot; =
method=3D&quot;get&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&lt;input type=3D&quot;hidden&quot; =
name=3D&quot;map&quot; </FONT>
<BR><FONT =
SIZE=3D2>value=3D&quot;../../mapPath/buckscounty/gis/testQuery.map&quot;&=
gt;</FONT>
<BR><FONT SIZE=3D2>&lt;input type=3D&quot;hidden&quot; =
name=3D&quot;mode&quot; value=3D&quot;itemquery&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&lt;input type=3D&quot;hidden&quot; =
name=3D&quot;savequery&quot; value=3D&quot;true&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&lt;input type=3D&quot;hidden&quot; =
name=3D&quot;qlayer&quot; value=3D&quot;boundaries&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&lt;input type=3D&quot;hidden&quot; =
name=3D&quot;qitem&quot; value=3D&quot;Name&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&lt;input type=3D&quot;hidden&quot; =
name=3D&quot;mapext&quot; value=3D&quot;shapes&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&lt;input type=3D&quot;submit&quot; =
value=3D&quot;Submit Query&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&lt;input name=3D&quot;qstring&quot; =
size=3D&quot;45&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&lt;/form&gt;</FONT>
</P>

<P><FONT SIZE=3D2>I have tried submitting just about every possible =
combination of </FONT>
<BR><FONT SIZE=3D2>qstring options I can think of. for example,</FONT>
</P>

<P><FONT SIZE=3D2>([Name] EQ 'Doylestown')</FONT>
<BR><FONT SIZE=3D2>([Name] EQ &quot;Doylestown&quot;)</FONT>
<BR><FONT SIZE=3D2>('[Name]' IN 'Doylestown')</FONT>
<BR><FONT SIZE=3D2>([Name] =3D 'Doylestown')</FONT>
<BR><FONT SIZE=3D2>([Name] =3D &quot;Doylestown&quot;)</FONT>
<BR><FONT SIZE=3D2>('[Name]' EQ &quot;Doylestown&quot;)</FONT>
<BR><FONT SIZE=3D2>('[Name]' EQ 'Doylestown')</FONT>
<BR><FONT SIZE=3D2>('[Name]' EQ Doylestown)&nbsp; -- Yikes!!</FONT>
</P>

<P><FONT SIZE=3D2>etc. (I think you get the picture)</FONT>
</P>

<P><FONT SIZE=3D2>Upper/lower cases of the &quot;Name&quot; variable and =
&quot;Doylestown&quot; are </FONT>
<BR><FONT SIZE=3D2>identical to those that appear in the shapefile.dbf =
table</FONT>
</P>

<P><FONT SIZE=3D2>It appears that MS is simply not finding the requested =
variable in </FONT>
<BR><FONT SIZE=3D2>the qstring, so I even tried submitting strings that =
would always </FONT>
<BR><FONT SIZE=3D2>evaluate to TRUE, such as</FONT>
</P>

<P><FONT SIZE=3D2>(1 EQ 1)</FONT>
<BR><FONT SIZE=3D2>(1 =3D 1)</FONT>
<BR><FONT SIZE=3D2>(2 GE 1)</FONT>
<BR><FONT SIZE=3D2>(2 &lt;=3D 1)</FONT>
<BR><FONT SIZE=3D2>([Name] EQ [Name]&nbsp; etc.</FONT>
</P>

<P><FONT SIZE=3D2>Still, the same result.</FONT>
</P>

<P><FONT SIZE=3D2>Where have I gone wrong? Please share your success =
stories.</FONT>
</P>

<P><FONT SIZE=3D2>Much Appreciated</FONT>
</P>

<P><FONT SIZE=3D2>--Mac--</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>_______________________________________________</FONT>
<BR><FONT SIZE=3D2>Mapserver-users mailing list</FONT>
<BR><FONT SIZE=3D2>Mapserver-users at lists.gis.umn.edu</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://lists.gis.umn.edu/mailman/listinfo/mapserver-users" =
TARGET=3D"_blank">http://lists.gis.umn.edu/mailman/listinfo/mapserver-use=
rs</A></FONT>
</P>

</BODY>
<!--[object_id=3D#co.linn.or.us#]--></HTML>
------_=_NextPart_001_01C3AEE0.6B7605B0--



More information about the mapserver-users mailing list