<!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> </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.  When I call this map file using a data source of .shp files (which 
happens when SHAPEPATH and the 'NAME "counties"' lines are uncommented), I 
get the proper result back to the calling webpage.  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> </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> </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.  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> </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

<<SPAN class=start-tag>HTML</SPAN>>
<<SPAN class=start-tag>HEAD</SPAN>><<SPAN class=start-tag>TITLE</SPAN>>MapServer Message</<SPAN class=end-tag>TITLE</SPAN>></<SPAN class=end-tag>HEAD</SPAN>>
<SPAN class=comment><!-- 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 --></SPAN>
<<SPAN class=start-tag>BODY</SPAN><SPAN class=attribute-name> BGCOLOR</SPAN>=<SPAN class=attribute-value>"#FFFFFF"</SPAN>>
</<SPAN class=end-tag>BODY</SPAN>></<SPAN class=end-tag>HTML</SPAN>></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> </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?  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).  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> </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> </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> </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>    IMAGETYPE      
PNG<BR>    EXTENT  189783.546875 4810309 761653.5625 
5472346.5<BR>    SIZE    680 
510<BR>    SHAPEPATH 
"C:\ms4w\gisvote\data\shp"<BR>    
IMAGECOLOR     255 255 255</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>    WEB<BR>#       
HEADER   "imgmap-th.htm"<BR>#       
FOOTER   "imgmap-tf.htm"<BR>#       
TEMPLATE "imgmap-t.htm"<BR>        
IMAGEPATH   
"C:\ms4w\Apache\htdocs\tmp\"<BR>        
IMAGEURL    "/tmp/"<BR>    END</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>    
QUERYMAP<BR>        STATUS 
ON<BR>        STYLE 
NORMAL<BR>    END</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>    
LAYER<BR>        
NAME         
"counties"</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" color=#800000>### 
this is pulling straight from the .shp 
files<BR>        
DATA         
"counties"</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" color=#800000>### 
or...</FONT></SPAN></DIV>
<DIV> </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>#       CONNECTION "user=postgres 
dbname=postgis password=4theluv"<BR>#       
CONNECTIONTYPE POSTGIS<BR>#       DATA "the_geom 
from (select * from shp_counties) as foo using unique the_geom using 
SRID=-1"</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>        
STATUS       
DEFAULT<BR>        
TYPE         POLYGON</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>        TEMPLATE 
"imgmap-t.htm"</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=117454702-04052007><FONT face="Courier New" 
color=#800000>        
CLASS<BR>            
NAME        
"county_class"<BR>            
STYLE<BR>                
COLOR        232 232 
232<BR>                
OUTLINECOLOR 32 32 
32<BR>            
END<BR>        END<BR>    
END<BR>END</FONT></SPAN></DIV>
<DIV> </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> </DIV></BODY></HTML>