<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='color:#1F497D'>John, <o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>What features are not being
rendered? Are they randomly distributed? located at the outside
edges of the rendered features? Any pattern to the IDs? <o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>David. <o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> mapserver-users-bounces@lists.osgeo.org
[mailto:mapserver-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>W.John
Guineau<br>
<b>Sent:</b> Friday, December 04, 2009 8:12 AM<br>
<b>To:</b> 'W.John Guineau'; mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> RE: [mapserver-users] Shapefile, itemnquery and HTML image map
generation problem<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='color:#1F497D'>How would I go about debugging
this? <o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>I think this is GDAL and its
query of shapefiles, right?<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>The bottom line is that
MapServer finds all the items when it is rendering the map by layer/class </span>EXPRESSION<span
style='color:#1F497D'>, but the qstring in a URL using the exact same </span>EXPRESSION
<span style='color:#1F497D'>string misses some of the items.<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>I can also use ogrinfo from
MAP4W to execute an SQL query directly on the shapefile and the items in
questions are certainly there.<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>In the image below, the green
areas are result of the mapfile layer class EXPRESSION – all are
correctly rendered. However, several of them do not get generated (HTML imagemap
<area> tags not generated) when using a URL and itemnquery/qstring with
the identical EXPRESSION.<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>How do I enable debug (enabling
mapfile DEBUG does not seem to give any useful info as to why GDAL is skipping
certain items) Am I better off using MAP4W or similar to get debug/trace info
for shapefile queries?<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>john<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><img width=611 height=414
id="Picture_x0020_1" src="cid:image001.png@01CA7719.0F845920"><o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
mapserver-users-bounces@lists.osgeo.org [mailto:mapserver-users-bounces@lists.osgeo.org]
<b>On Behalf Of </b>W.John Guineau<br>
<b>Sent:</b> Thursday, December 03, 2009 3:11 PM<br>
<b>To:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> [mapserver-users] Shapefile, itemnquery and HTML image map
generation problem<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I have a basic vector shapefile that I am trying to generate
HTML clickable maps from. It seems to work well for the most part, however
there is a problem where some items from the shapefile do not get processed
from the qstring in the browser, but they are processed fine in the mapfile
layer (to color them differently).<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>So the map that renders shows all the items colored properly
as the layer class defines. Using the exact same list of items in the HTTP
query string causes several items to be ignored (the HTML image map area is not
generated).<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,114A,114B,115A,115B,115C")<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Below is the layer section from the mapfile. I can post
whatever else is helpful. <o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Thanks for any help on this.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>john<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>LAYER <o:p></o:p></p>
<p class=MsoNormal>
NAME map_m<o:p></o:p></p>
<p class=MsoNormal>
DATA "map_shape"<o:p></o:p></p>
<p class=MsoNormal>
TEMPLATE "bodytemplate.html"<o:p></o:p></p>
<p class=MsoNormal>
HEADER "imapheader.html"<o:p></o:p></p>
<p class=MsoNormal>
FOOTER "imapfooter.html"<o:p></o:p></p>
<p class=MsoNormal>
PROJECTION<o:p></o:p></p>
<p class=MsoNormal>
"proj=latlong"<o:p></o:p></p>
<p class=MsoNormal>
"ellps=GRS80"<o:p></o:p></p>
<p class=MsoNormal>
"init=epsg:4326"<o:p></o:p></p>
<p class=MsoNormal>
END<o:p></o:p></p>
<p class=MsoNormal>
TYPE polygon<o:p></o:p></p>
<p class=MsoNormal>
STATUS ON<o:p></o:p></p>
<p class=MsoNormal>
TRANSPARENCY 70<o:p></o:p></p>
<p class=MsoNormal>
CLASS<o:p></o:p></p>
<p class=MsoNormal>
NAME "MLRA"<o:p></o:p></p>
<p class=MsoNormal>
COLOR 0 200 0<o:p></o:p></p>
<p class=MsoNormal>
OUTLINECOLOR 0 0 0<o:p></o:p></p>
<p class=MsoNormal>
EXPRESSION( "[MLRARSYM]" in "102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,114A,114B,115A,115B,115C"
)<o:p></o:p></p>
<p class=MsoNormal>
END<o:p></o:p></p>
<p class=MsoNormal>
METADATA <o:p></o:p></p>
<p class=MsoNormal>
qstring_validation_pattern ".*"<o:p></o:p></p>
<p class=MsoNormal>
END<o:p></o:p></p>
<p class=MsoNormal>END<o:p></o:p></p>
</div>
</body>
</html>