Hi all,<br>
<br>
Thank you very much everyone who tried to help. I have found the
problem. The map was actually rendered correctly, but since it was only
a &quot;POINT&quot;, it is only 1 pixel big, and thus I did not see it in the
map. I defined a 50 pixel circle symbol for the class, and render it
again, and things appear correctly.<br>
<br>
Best regards,<br>
Keerati<br><br><div><span class="gmail_quote">On 4/23/05, <b class="gmail_sendername">Newland</b> &lt;<a href="mailto:newland@vt.edu">newland@vt.edu</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





<div><font color="#0000ff" face="Arial" size="2"><span>Below 
is an example of how to access a postgis layer.&nbsp; take a careful look at the 
DATA parameter.</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font>&nbsp;</div>
<div><font color="#0000ff" face="Arial" size="2"><span>The 
general format for the DATA parameter is &quot;&lt;GEOMETRY_COLUMN_NAME&gt; from 
&lt;TABLE_NAME&gt; using UNIQUE &lt;UNIQUE_ID_COLUMNNAME&gt; using SRID 
&lt;SRID_OF_LAYER&gt;&quot;.&nbsp;&nbsp;<font color="#000000" face="Times New Roman" size="3">&nbsp;</font></span></font></div>
<div><font><span></span></font>&nbsp;</div>
<div><font><span>In my example, </span></font></div>
<div><font><span>
<div><font size="+0"><span>the <font color="#0000ff" face="Arial" size="2">GEOMETRY_COLUMN_NAME </font>is shape.
<div><font size="+0"><span>the <font color="#0000ff" face="Arial" size="2">TABLE_NAME </font>is stlouis_base.
<div><font size="+0"><span>the&nbsp;<font size="2"><font color="#0000ff" face="Arial">UNIQUE_ID_COLUMNNAME </font></font>is oid.
<div><font size="+0"><span>the<font color="#0000ff" face="Arial" size="2">&nbsp;SRID_OF_LAYER </font>is 4326.</span></font></div>
<div><font size="+0"><span></span></font>&nbsp;</div>
<div><font color="#0000ff" face="Arial" size="2"><span>Hope 
this helps.</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font>&nbsp;</div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font>&nbsp;</div></span></font></div></span></font></div></span></font></div></span></font><font color="#0000ff" face="Arial" size="2"><span></span></font></div>

<div><font color="#0000ff" face="Arial" size="2"><span></span></font>&nbsp;</div>
<div><font color="#0000ff" face="Arial" size="2"><span>-------------------------------Begin 
example-----------------------------------------------------------</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"></font>&nbsp;</div>
<div><font color="#0000ff" face="Arial" size="2">&nbsp;&nbsp;&nbsp; DATA &quot;shape from 
stlouis_base using UNIQUE oid USING SRID=4326&quot;<br></font></div>
<div><font color="#0000ff" face="Arial" size="2">&nbsp; LAYER<br>&nbsp;&nbsp;&nbsp; 
NAME &quot;stlouis_roads&quot;<br>&nbsp;&nbsp;&nbsp; TYPE LINE<br>&nbsp;&nbsp;&nbsp; 
CONNECTION &quot;user=<span>john</span> password=<span>doe</span> dbname=<span>stlouis</span> host=192.168.<span>1</span>.1<span>11</span> 
port=5432&quot;<br>&nbsp;&nbsp;&nbsp; TOLERANCEUNITS pixels<br>&nbsp;&nbsp;&nbsp; 
CONNECTIONTYPE postgis<br>&nbsp;&nbsp;&nbsp; TOLERANCE 5<br>&nbsp;&nbsp;&nbsp; 
CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
LABEL<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 255 
0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 
tiny<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANGLE 
AUTO<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
NAME &quot;Roads&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 255 0 
0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
SYMBOL &quot;circle&quot;<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; LABELITEM 
&quot;name&quot;<br>&nbsp;&nbsp;&nbsp; STATUS on<br>&nbsp;&nbsp;&nbsp; CLASSITEM 
&quot;frc&quot;<br>&nbsp;&nbsp;&nbsp; METADATA<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WMS_TITLE 
&quot;St. Louis County Roads&quot;<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; 
PROJECTION<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&quot;init=epsg:4326&quot;<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; DATA &quot;shape 
from stlouis_base using UNIQUE oid USING SRID=4326&quot;<br>&nbsp; END</font></div>
<div><font color="#0000ff" face="Arial" size="2">
<div><font color="#0000ff" face="Arial" size="2"><span>-------------------------------End 
example-----------------------------------------------------------</span></font></div></font></div><div><span class="e" id="q_1036e1b15cb35363_1">
<div><font color="#0000ff" face="Arial" size="2"></font>&nbsp;</div>
<blockquote>
  <div align="left" dir="ltr"><font face="Tahoma" size="2">-----Original Message-----<br><b>From:</b> UMN MapServer Users List 
  [mailto:<a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">MAPSERVER-USERS@LISTS.UMN.EDU</a>]<b>On Behalf Of </b>Keerati 
  Inochanon<br><b>Sent:</b> Friday, April 22, 2005 7:43 PM<br><b>To:</b> 
  <a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">MAPSERVER-USERS@LISTS.UMN.EDU</a><br><b>Subject:</b> [UMN_MAPSERVER-USERS] Trouble 
  rendering map from PostGIS<br><br></font></div>Hi,<br><br>I am new, and having 
  problems rendering a layer from PostGIS. Here is the map 
  file:<br><br>==<br>MAP<br>&nbsp;&nbsp;&nbsp; NAME 
  US_EAST_COAST<br>&nbsp;&nbsp;&nbsp; STATUS ON<br>&nbsp;&nbsp;&nbsp; SIZE 800 
  500<br>&nbsp;&nbsp;&nbsp; IMAGETYPE PNG<br>&nbsp;&nbsp;&nbsp; IMAGECOLOR 240 
  240 240<br>&nbsp;&nbsp;&nbsp; SHAPEPATH 
  &quot;/home/www/testing/maps/countries&quot;<br>&nbsp;&nbsp;&nbsp; EXTENT -180.0000 
  -90.0000 180.0000 90.0000<br>&nbsp;&nbsp;&nbsp; UNITS DD<br>&nbsp;&nbsp;&nbsp; 
  PROJECTION<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &quot;proj=latlong&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &quot;ellps=GRS80&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &quot;datum=NAD83&quot;<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; 
  OUTPUTFORMAT<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME 
  png<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DRIVER 
  &quot;GD/PNG&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MIMETYPE 
  &quot;image/png&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IMAGEMODE 
  PC256<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXTENSION &quot;png&quot;<br>&nbsp;&nbsp;&nbsp; 
  END<br>&nbsp;&nbsp;&nbsp; LAYER<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME 
  &quot;countries&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE 
  POLYGON<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS 
  ON<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DATA 
  &quot;cntry98&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME 
  &quot;Countries&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 255 255 
  180<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 
  0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  PROJECTION<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &quot;proj=latlong&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &quot;ellps=GRS80&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &quot;datum=NAD83&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; 
  END<br>&nbsp;&nbsp;&nbsp; LAYER<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME 
  &quot;cities&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE 
  POINT<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS 
  ON<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DATA 
  &quot;cities&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME 
  &quot;Cities&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0 
  0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 
  0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  PROJECTION<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &quot;proj=latlong&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &quot;ellps=GRS80&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &quot;datum=NAD83&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; 
  END<br>&nbsp;&nbsp;&nbsp; LAYER<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  CONNECTIONTYPE postgis<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME 
  &quot;random&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONNECTION &quot;user=xxx password=yyy 
  dbname=testdb host=localhost&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DATA &quot;location 
  from gtest&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS 
  ON<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE 
  POINT<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME 
  &quot;random&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 255 0 
  0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 255 0 
  0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 
  50<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  PROJECTION<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &quot;proj=latlong&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &quot;ellps=GRS80&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &quot;datum=NAD83&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; 
  END<br>END<br>==<br><br>In python, I do<br>==<br>import mapscript<br>mapObject 
  = mapscript.mapObj('/path/to/map/file/mapfile')<br>image = 
  mapObject.draw()<br>image.save('test.png')<br>==<br><br>The result (test.png) 
  is a map image with only the first two layers (countries and cities), which 
  seem to be rendered correcly. However, I do not see anything from the postgis 
  layer. I have a single entry in the gtest table, which was inserted using the 
  command &quot;insert into gtest (id, location) values (0, 
  GeomFromText('POINT(40.791723 -77.857340)', -1))&quot;. The entry was inserted with 
  no error. I can do a select to retrieve the entry back.<br><br>Please let me 
  know what I have done wrong. Any help or suggestions will be much appreciated. 
  Thank you very much in advance.<br><br>Best regards,<br>Keerati 
Inochanon<br></blockquote>

</span></div></blockquote></div><br>