<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="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 11 (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>
<!--
_filtered #yiv902123819 {margin:1.0in 1.25in 1.0in 1.25in;}

 /* Font Definitions */
 @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:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p.yiv902123819msonormal, li.yiv902123819msonormal, div.yiv902123819msonormal
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
p.yiv902123819msonormal1, li.yiv902123819msonormal1, div.yiv902123819msonormal1
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.yiv902123819msohyperlink1
        {color:blue;
        text-decoration:underline;}
span.yiv902123819msohyperlinkfollowed1
        {color:purple;
        text-decoration:underline;}
span.yiv902123819emailstyle171
        {font-family:Arial;
        color:windowtext;}
span.EmailStyle25
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
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=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I think we&#8217;re out of the woods, and
special thanks to TC Haddad for the solution&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>TC suggested that I check the upper/lower
case of the table name.&nbsp; I had this correct, but it gave me an idea of
something to try- I created a new table of the same shapefile, only this time
the table name is all lower case.&nbsp; Using that in my map file, the map
image appears correctly.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks everyone for their input!&nbsp; I&#8217;m
sure it won&#8217;t be the last ou hear from me on PostGIS, but at least we&#8217;re off
and running!<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>BB<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
pcreso@pcreso.com [mailto:pcreso@pcreso.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, February 13, 2012
5:01 PM<br>
<b><span style='font-weight:bold'>To:</span></b>
mapserver-users@lists.osgeo.org; Bistrais, Bob<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [mapserver-users]
Trouble connecting to PostGIS</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0>
 <tr>
  <td valign=top style='padding:0in 0in 0in 0in'>
  <p class=MsoNormal><font size=3 face="Times New Roman"><span
  style='font-size:12.0pt'>Hi Bob,<br>
  <br>
  <br>
  I suggest you try testing with QGIS.<br>
  <br>
  Easy to open the native postgis table &amp; a mapserver WFS/WMS layer
  concurrently to ensure it is all working as it should.<br>
  <br>
  Also ensure you have configured your Postgis (Postgres) database to allow
  applications such as mapserver to connect. For testing purposes, set access
  to the database to trusted for all in pb_hba.conf, &amp; enable external
  connections in postgresql.conf, then restart the server to ensure the changes
  are activated.<br>
  <br>
  You can also enable mapserver debugging &amp; specify a log file to see what
  error is reported.<br>
  <a href="http://mapserver.org/optimization/debugging.html">http://mapserver.org/optimization/debugging.html</a><br>
  <br>
  You may also need to specify the unique ID column name &amp; the SRID you are
  using in your DATA string, much like this one:<br>
  DATA &quot;track_line from (select * from trip_track where trip_code =
  'ind0701') as foo using unique id using srid 4326&quot;<br>
  <br>
  HTH,<br>
  <br>
  &nbsp;&nbsp; Brent Wood<br>
  <br>
  --- On <b><span style='font-weight:bold'>Tue, 2/14/12, Bistrais, Bob <i><span
  style='font-style:italic'>&lt;Bob.Bistrais@maine.gov&gt;</span></i></span></b>
  wrote:<o:p></o:p></span></font></p>
  <p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
  face="Times New Roman"><span style='font-size:12.0pt'><br>
  From: Bistrais, Bob &lt;Bob.Bistrais@maine.gov&gt;<br>
  Subject: [mapserver-users] Trouble connecting to PostGIS<br>
  To: mapserver-users@lists.osgeo.org<br>
  Date: Tuesday, February 14, 2012, 10:11 AM<o:p></o:p></span></font></p>
  <div id=yiv902123819>
  <div>
  <div>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>First of all, let me state that I
  am brand new to PostGIS and don&#8217;t know much about what I&#8217;m doing with
  it.&nbsp; That being said, I am having trouble displaying a PostGIS layer
  through MapServer.</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>Right now I&#8217;m just experimenting
  with PostGIS and simply trying to get a layer to display.&nbsp; I installed
  the Postgre and PostGIS 1.5.&nbsp; I used the shapefile loader to convert a
  couple shapefiles to PostGIS data.&nbsp; Looking in pgAdmin, I see the tables
  do indeed exist for these layers.</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>So I built a MapServer map
  file.&nbsp; Here is my connection strings:</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>DATA &quot;the_geom from MylayerPoly&quot;</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>CONNECTION &quot;user=postgisuser
  password=MyPassword! dbname=postgistest host=localhost port=5432&quot;</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>CONNECTIONTYPE postgis</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>But the layer does not
  display.&nbsp; Incidentally, I&#8217;m using GeoMoose as a front end for testing,
  but that shouldn&#8217;t matter here.</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>I did a mapserv &#8211;v at commandline,
  and I see the parameter INPUT=POSTGIS.</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>So as far as I know it should
  work. Can anyone offer suggestions as to what I&#8217;m doing wrong?</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>Thanks,</span></font><o:p></o:p></p>
  <p class=yiv902123819msonormal><font size=2 face=Arial><span
  style='font-size:10.0pt;font-family:Arial'>Bob</span></font><o:p></o:p></p>
  </div>
  </div>
  </div>
  <p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
  face="Times New Roman"><span style='font-size:12.0pt'><br>
  -----Inline Attachment Follows-----<o:p></o:p></span></font></p>
  <div>
  <p class=MsoNormal><font size=3 face="Times New Roman"><span
  style='font-size:12.0pt'>_______________________________________________<br>
  mapserver-users mailing list<br>
  <a href="/mc/compose?to=mapserver-users@lists.osgeo.org"
  ymailto="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
  <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
  target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></span></font></p>
  </div>
  </td>
 </tr>
</table>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>