<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" color=#800000>The 
map file at the end of this post is used by me to create a client-side image 
map.&nbsp; When I call this map file using a data source of .shp files (which 
happens when SHAPEPATH&nbsp;and the 'NAME "counties"' lines are uncommented), I 
get the proper result back to the calling webpage.&nbsp; When those lines are 
commented out and I instead use the lines that begin:</FONT></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>CONNECTION ...</FONT></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>CONNECTIONTYPE ...</FONT></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" color=#800000>DATA 
...</FONT></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" color=#800000>to 
retrieve the same date from a POSTGIS/POSTGRESQL database, I don't get the right 
results.&nbsp; The following is a snippet of what I do get 
returned:</FONT></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>===</FONT></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><PRE id=line1>Content-type: text/html

&lt;<SPAN class=start-tag>HTML</SPAN>&gt;
&lt;<SPAN class=start-tag>HEAD</SPAN>&gt;&lt;<SPAN class=start-tag>TITLE</SPAN>&gt;MapServer Message&lt;/<SPAN class=end-tag>TITLE</SPAN>&gt;&lt;/<SPAN class=end-tag>HEAD</SPAN>&gt;
<SPAN class=comment>&lt;!-- MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG --&gt;</SPAN>
&lt;<SPAN class=start-tag>BODY</SPAN><SPAN class=attribute-name> BGCOLOR</SPAN>=<SPAN class=attribute-value>"#FFFFFF"</SPAN>&gt;
&lt;/<SPAN class=end-tag>BODY</SPAN>&gt;&lt;/<SPAN class=end-tag>HTML</SPAN>&gt;</PRE></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>===</FONT></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" color=#800000>Can 
anybody answer why the behavior changes when all i do is change the 
datasource?&nbsp; the shapefile and the table are the same (well, except for 
whatever changes when I use the postgis tools to load the shapefile into the 
Postgresql table, which should be only data format).&nbsp; Does anybody know how 
to fix/work around this?</FONT></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>Thanks!</FONT></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>Matt</FONT></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" color=#800000>=== 
map.map ===</FONT></SPAN></DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>MAP<BR>&nbsp;&nbsp;&nbsp; IMAGETYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
PNG<BR>&nbsp;&nbsp;&nbsp; EXTENT&nbsp; 189783.546875 4810309 761653.5625 
5472346.5<BR>&nbsp;&nbsp;&nbsp; SIZE&nbsp;&nbsp;&nbsp; 680 
510<BR>&nbsp;&nbsp;&nbsp; SHAPEPATH 
"C:\ms4w\gisvote\data\shp"<BR>&nbsp;&nbsp;&nbsp; 
IMAGECOLOR&nbsp;&nbsp;&nbsp;&nbsp; 255 255 255</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>&nbsp;&nbsp;&nbsp; WEB<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
HEADER&nbsp;&nbsp; "imgmap-th.htm"<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
FOOTER&nbsp;&nbsp; "imgmap-tf.htm"<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
TEMPLATE "imgmap-t.htm"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
IMAGEPATH&nbsp;&nbsp; 
"C:\ms4w\Apache\htdocs\tmp\"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
IMAGEURL&nbsp;&nbsp;&nbsp; "/tmp/"<BR>&nbsp;&nbsp;&nbsp; END</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>&nbsp;&nbsp;&nbsp; 
QUERYMAP<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS 
ON<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE 
NORMAL<BR>&nbsp;&nbsp;&nbsp; END</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>&nbsp;&nbsp;&nbsp; 
LAYER<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
"counties"</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" color=#800000>### 
this is pulling straight from the .shp 
files<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
DATA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
"counties"</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" color=#800000>### 
or...</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" color=#800000>### 
this does not behave like calling info from shape files... i don't know why 
yet<BR>### when using this, probably don't need the SHAPEPATH 
setting.<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONNECTION "user=postgres 
dbname=postgis password=4theluv"<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
CONNECTIONTYPE POSTGIS<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DATA "the_geom 
from (select * from shp_counties) as foo using unique the_geom using 
SRID=-1"</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
DEFAULT<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POLYGON</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TEMPLATE 
"imgmap-t.htm"</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
"county_class"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
COLOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 232 232 
232<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
OUTLINECOLOR 32 32 
32<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
END<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<BR>&nbsp;&nbsp;&nbsp; 
END<BR>END</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV align=left>It is from the wellspring of our despair and the places that we 
are broken that we come to repair the world.</DIV>
<DIV align=left>-- Murray Waas</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>