Hi Brent,<br><br>Thanks for your reply.<br><br>The SRS my data is stored in WGS84.<br><br>Unfortunately, I am not getting configuration file right. I adjusted the map EXTENT to something smaller,<br><br>Map <br><br>Extent 16 -28 25 -16<br>
 <br><br>The layer extent I also adjusted to the output image of the contour data,<br><br>Layer <br><br>Extent 17.002 -20.965 18.007 -20.002<br><br>I played around with the figures a little but I get this error message at all times,<br>
<br>&quot;msDrawMap(): Image handling error. Failed to draw layer named &#39;Contour&#39;. msPostGISLayerWhichShapes(): Query error. Error (ERROR: function geomfromtext(unknown, integer) does not exist LINE 1: ...R&#39;),&#39;hex&#39;) as geom,&quot;gid&quot; from atest where geom &amp;&amp; GeomFromTe... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. ) executing query: select encode(ST_AsBinary(ST_Force_2D(&quot;geom&quot;),&#39;NDR&#39;),&#39;hex&#39;) as geom,&quot;gid&quot; from atest where geom &amp;&amp; GeomFromText(&#39;POLYGON((15.8348164627364 -28,15.8348164627364 -16,25.1651835372636 -16,25.1651835372636 -28,15.8348164627364 -28))&#39;,4326)&quot;<br>
<br>Since this is my first time configurating a mapfile, I am unsure of what is essential and what not, thus, I copied and pasted the script and adjusted it to my CONNECTION details. I am not too sure whether it is vital to have both a &quot;map extent&quot; and a &quot;layer extend&quot;?<br>
<br>Do you perhaps have any hints in this regard?<br><br>Best Regards<br>Cheryl  <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><div class="gmail_quote">
On Sun, Feb 12, 2012 at 6:49 PM, Brent Fraser <span dir="ltr">&lt;<a href="mailto:bfraser@geoanalytic.com">bfraser@geoanalytic.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cherly,<br>
<br>
  One issue could be that you&#39;ve asked Mapserver to render the entire world:<div class="im"><br>
<br>
EXTENT    -<a href="tel:90%20-180%2090%20180" value="+19018090180" target="_blank">90 -180 90 180</a><br>
<br></div>
into a small image:<br>
<br>
mapsize=600+800<br>
<br>
Adjust the extents of the output image to be the extent of you contour data.  I see that you&#39;ve given that in your LAYER definition<div class="im"><br>
<br>
            EXTENT        143 -20 145 -19<br>
<br></div>
so try that for the map extent (but I think it would be valid only if the contours were stored in a Geographic system and not a Projected system).  What SRS are you storing your data in?  The same as your display (EPSG:4326)?<br>

<br>
Best Regards,<br>
Brent Fraser<div><div class="h5"><br>
<br>
<br>
On 2/12/2012 9:43 AM, cheryl buckley wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi,<br>
<br>
I&#39;m trying to get Mapserver connected with PostGIS. PostGIS is holding<br>
a shape2pgsql contourline import in the table &quot;atest&quot; while a test has<br>
the following columns (shape2pgsql default):<br>
<br>
------------------------------<u></u>--------<br>
| Actions | gid | id | height | geom |<br>
------------------------------<u></u>--------<br>
<br>
Quantum GIS picks the conection up perfectly to atest but with<br>
Mapserver I just get a blank screen - or the color of IMAGECOLOR [. .<br>
.] definition in test-2.map definitions.<br>
<br>
Somehow it seems like I got the connection between Mapserver and<br>
PostGIS running - at least the debug.log doesn&#39;t complain. But still<br>
I&#39;m not seeing any of my contour lines as I&#39;m used to by Quantum GIS<br>
;(<br>
<br>
Could someone give me a hint of what I&#39;m missing out or where my mistake is?<br>
I got the feeling that it is either has something to do with the DATA<br>
property or the projection properties …<br>
<br>
The Link with which I call the mapserv binary is:<br>
<br>
<a href="http://192.168.10.15/cgi-bin/mapserv?map=./Maps/test.map&amp;mode=map" target="_blank">http://192.168.10.15/cgi-bin/<u></u>mapserv?map=./Maps/test.map&amp;<u></u>mode=map</a><br>
But then it complains:<br>
msDrawMap(): Image handling error. Unable to initialize image.<br>
msPrepareImage(): General error message. Image dimensions not<br>
specified. msCalculateScale(): General error message. Invalid image<br>
width or height.<br>
<br>
So I changed it to the following:<br>
<a href="http://192.168.10.15/cgi-bin/mapserv?map=./Maps/test.map&amp;mode=map&amp;mapsize=600+800" target="_blank">http://192.168.10.15/cgi-bin/<u></u>mapserv?map=./Maps/test.map&amp;<u></u>mode=map&amp;mapsize=600+800</a><br>

which results in no errors but therefore in a blank screen with a<br>
clean debug.log ...<br>
<br>
Even this one wont change anything:<br>
<a href="http://192.168.10.15/cgi-bin/mapserv?map=./Maps/test.map&amp;mode=map&amp;mapsize=600+800&amp;layer=Contour" target="_blank">http://192.168.10.15/cgi-bin/<u></u>mapserv?map=./Maps/test.map&amp;<u></u>mode=map&amp;mapsize=600+800&amp;<u></u>layer=Contour</a><br>

<br>
<br>
. . . my test-2.map definition is below:<br>
<br>
P.S.: TEMPLATE &quot;./Maps/test.map&quot; does exist and is read and writeable<br>
to the user which runs the webserver (Apache =&gt;  User: www)<br>
CONFIG &quot;PROJ_LIB&quot; &quot;/usr/local/share/proj/&quot; should also be valid:<br>
<br>
FreeBSD [~]# ls /usr/local/share/proj<br>
FL                      WO                      hawaii                  null                                    stlrnc<br>
GL27            alaska          nad.lst                 nzgd2kgrid0005.gsb      stpaul<br>
IGNF            conus           nad27                   other.extra                     world<br>
MD                      epsg                    nad83                   proj_def.dat<br>
TN                      esri                    ntf_r93.gsb             prvi<br>
WI                      esri.extra              ntv1_can.dat            stgeorge<br>
<br>
<br>
<br>
# ==============================<u></u>===== test-2.map<br>
==============================<u></u>===== #<br>
<br>
<br>
MAP<br>
<br>
     CONFIG &quot;PROJ_LIB&quot; &quot;/usr/local/share/proj/&quot;<br>
     CONFIG &quot;MS_ERRORFILE&quot; &quot;./debug.log&quot;<br>
     DEBUG 5<br>
<br>
     IMAGECOLOR 100 100 100<br>
<br>
     NAME      &quot;Contour&quot;<br>
     EXTENT    -<a href="tel:90%20-180%2090%20180" value="+19018090180" target="_blank">90 -180 90 180</a><br>
     STATUS    ON<br>
<br>
     PROJECTION<br>
         &quot;init=epsg:4326&quot;<br>
     END<br>
<br>
     WEB<br>
         METADATA<br>
             WMS_NAME                         &quot;Contour&quot;<br>
             WMS_TITLE                        &quot;SRTM - ContourLines&quot;<br>
             WMS_ABSTRACT                     &quot;My First Web Map Server&quot;<br>
             WMS_SERVER_VERSION               &quot;1.1.1&quot;<br>
             WMS_SRS                          &quot;EPSG:4326&quot;<br>
             WMS_ONLINERESOURCE<br>
&quot;<a href="http://192.168.10.15/cgi-bin/mapserv?map=./Maps/test.map" target="_blank">http://192.168.10.15/cgi-bin/<u></u>mapserv?map=./Maps/test.map</a>&quot;<br>
             WMS_ATTRIBUTION_TITLE            &quot;Some Attribute Title&quot;<br>
             WMS_ATTRIBUTION_ONLINERESOURCE   &quot;<a href="http://www.myHomepage.com/" target="_blank">http://www.myHomepage.com/</a>&quot;<br>
             WMS_KEYWORDLIST<br>
&quot;DEM,SRTM,Contourlines,<u></u>Contour,Lines,Digital,Area,<u></u>Model&quot;<br>
             WMS_FEATURE_INFO_MIME_TYPE       &quot;text/html&quot;<br>
             WMS_<u></u>CONTACTELECTRONICMAILADDRESS &quot;User@Domain.tld&quot;<br>
             WMS_CONTACTPERSON                &quot;Some Reference Person&quot;<br>
             WMS_CONTACTVOICETELEPHONE        &quot;+49-phoneNumber&quot;<br>
             WMS_CONTACTORGANIZATION          &quot;Private&quot;<br>
             WMS_ENCODING                     &quot;utf-8&quot;<br>
         END<br>
     END<br>
<br>
<br>
     LAYER # query layer from PostgreSQL table<br>
             NAME          &quot;Contour&quot;<br>
             EXTENT        143 -20 145 -19<br>
             TYPE          LINE<br>
             STATUS        ON<br>
             DEBUG         ON<br>
             TEMPLATE      &quot;./Maps/test.map&quot;<br>
             DUMP          true<br>
             METADATA<br>
                 WMS_NAME          &quot;Contour&quot;<br>
                 WMS_TITLE         &quot;Contour Lines - 90m&quot;<br>
                 WMS_ABSTRACT      &quot;Contour Lines - 90m&quot;<br>
                 WMS_SRS           &quot;EPSG:4326&quot;<br>
                 GML_INCLUDE_ITEMS &quot;all&quot;<br>
             END<br>
<br>
             CONNECTIONTYPE POSTGIS<br>
             CONNECTION    &quot;host=192.168.10.15 port=5432<br>
dbname=my_spatial_db user=admin password=******&quot;<br>
             DATA          &quot;geom FROM atest using unique gid using srid=4326&quot;<br>
<br>
             CLASS<br>
                 STYLE<br>
                     COLOR 000 000 000<br>
                     OUTLINECOLOR 199 199 199<br>
             END<br>
         END<br>
<br>
     END<br>
END<br>
<br>
<br>
# ==============================<u></u>==============================<u></u>======================<br>
#<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
# ==============================<u></u>===== debug.log<br>
==============================<u></u>===== #<br>
<br>
FreeBSD [/usr/local/www/cgi-bin/Maps]# cat ./debug.log<br>
<br>
[Sat Feb 11 19:02:01 2012].3032 CGI Request 1 on process 2663<br>
[Sat Feb 11 19:02:01 2012].10325 msDrawMap(): rendering using<br>
outputformat named png (AGG/PNG).<br>
[Sat Feb 11 19:02:01 2012].10365 msDrawMap(): WMS/WFS set-up and query, 0.000s<br>
[Sat Feb 11 19:02:01 2012].10388 msDrawMap(): Drawing Label Cache, 0.000s<br>
[Sat Feb 11 19:02:01 2012].10398 msDrawMap() total time: 0.007s<br>
[Sat Feb 11 19:02:01 2012].76893 msSaveImage(stdout) total time: 0.066s<br>
[Sat Feb 11 19:02:01 2012].77721 mapserv request processing time<br>
(loadmap not incl.): 0.075s<br>
[Sat Feb 11 19:02:01 2012].77749 msFreeMap(): freeing map at 0x29879800.<br>
[Sat Feb 11 19:02:01 2012].77839 msPostGISLayerIsOpen called.<br>
<br>
# ==============================<u></u>==============================<u></u>======================<br>
#<br></div></div>
______________________________<u></u>_________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-<u></u>users</a><br>
<br>
</blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Greetings<br>Cheryl<br><br><br>