<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Bob,<br>
    &nbsp; Typical problems are <br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; - the connecting user (<font face="Arial" size="2"><span
        style="font-size:10.0pt;
        font-family:Arial">postgisuser</span></font>) does not have
    privilege to access the table<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; - coordinate system is not specified in data (SRID=-1) and
    not in the mapfile either<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp; and others<br>
    <br>
    Turn on the layer debug logging by adding <br>
    <br>
    DEBUG 5<br>
    <br>
    to your mapfile and looking a the log.&nbsp; You can also execute the SQL
    statements shown in the log file using pgAdmin's SQL tool to see
    additional information.<br>
    &nbsp; <br>
    <pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
    <br>
    On 2/13/2012 2:11 PM, Bistrais, Bob wrote:
    <blockquote
cite="mid:4EFF8BB964547748A07CA32961810C041CFF0639@SOM-TEAQASMAIL1.som.w2k.state.me.us"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 11 (filtered
        medium)">
      <style>
<!--
 /* 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:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@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]-->
      <div class="Section1">
        <p class="MsoNormal"><font face="Arial" size="2"><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.<o:p></o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><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.<o:p></o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial">So I built a MapServer map file.&nbsp; Here
              is my connection
              strings:<o:p></o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial">DATA "the_geom from MylayerPoly"<o:p></o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial">CONNECTION "user=postgisuser
              password=MyPassword!
              dbname=postgistest host=localhost port=5432"<o:p></o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial">CONNECTIONTYPE postgis<o:p></o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><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.<o:p></o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial">I did a mapserv &#8211;v at commandline, and
              I see the
              parameter INPUT=POSTGIS.<o:p></o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><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?<o:p></o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial">Thanks,<o:p></o:p></span></font></p>
        <p class="MsoNormal"><font face="Arial" size="2"><span
              style="font-size:10.0pt;
              font-family:Arial">Bob<o:p></o:p></span></font></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
    </blockquote>
  </body>
</html>