IT WORKED,<br>i got  a really simple solution to this problem, in the selection bit add <br><pre>USING UNIQUE gid USING SRID=-1<br><br>##the connection bit was<br><br>CONNECTION &quot;user=xxx password=xxxx dbname=xxx host=xxx&quot;<br>

data &quot;the_geom from table_name&quot;<br><br><br></pre><div class="gmail_quote">##so the new code will look like this<br><pre>CONNECTION &quot;user=xxx password=xxxx dbname=xxx host=xxx&quot;<br>data &quot;the_geom from table_name USING UNIQUE gid USING SRID=-1&quot;<br>

</pre>thanks again for looking into this, cheers!!<br><br><br><br>On Mon, May 17, 2010 at 1:22 AM, Linnet Kwamboka <span dir="ltr">&lt;<a href="mailto:scientific1quash@gmail.com">scientific1quash@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">hey Jeff,<br>i managed to run the ogrinfo -al -sokenya_administrative.shp command but i get the following error,<br>

<br><br><pre>FAILURE:<br>Unable to open datasource `E:\Ryan\solid_earth\thick18.ovf&#39; with the <br>following drivers.<br>
  -&gt; ESRI Shapefile<br>  -&gt; UK .NTF<br>  -&gt; SDTS<br>  -&gt; TIGER<br>  -&gt; S57<br>  -&gt; MapInfo File<br>  -&gt; DGN<br>  -&gt; VRT<br>  -&gt; AVCBin<br>  -&gt; REC<br>  -&gt; Memory<br>  -&gt; CSV<br>  -&gt; GML<br>


  -&gt; SQLite<br>  -&gt; ODBC<br>  -&gt; OGDI<br>  -&gt; PostgreSQL<br>  -&gt; FMEObjects Gateway<br></pre>how can this be solved? any ideas, anyone?<div><div></div><div class="h5"><br><br><br><br><br><div class="gmail_quote">

On Sat, May 15, 2010 at 1:05 PM, Linnet Kwamboka <span dir="ltr">&lt;<a href="mailto:scientific1quash@gmail.com" target="_blank">scientific1quash@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Thanks Jeff,<br>for the response, but am just not getting where do i run that ogrinfo command? and there are like two different queries which do i run?<br>


<pre>&gt;ogrinfo PG:&quot;host=127.0.0.1 user=postgres password=postgres dbname=canada port=5432&quot;<br>
      using driver `PostgreSQL&#39; successful.<br>      1: province (Multi Polygon)</pre>or<br><br><pre>&gt;ogrinfo --formats<br>  Loaded OGR Format Drivers:<br>  ...<br>  -&gt; &quot;PGeo&quot; (readonly)<br>  -&gt; &quot;PostgreSQL&quot; (read/write)<br>



  -&gt; &quot;MySQL&quot; (read/write)<br>  ...</pre>i have only one layer-the postgis layer and i have removed the projection<div><div></div><div><br><br><br><div class="gmail_quote">On Sat, May 15, 2010 at 11:49 AM, Jeff McKenna <span dir="ltr">&lt;<a href="mailto:jmckenna@gatewaygeomatics.com" target="_blank">jmckenna@gatewaygeomatics.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div>Linnet Kwamboka wrote:<br>
&gt; hey guys,<br>
&gt; i have trouble displaying postgis layers on mapserver nothing at all<br>
&gt; seems to work, any idea how i can change this, coz when i load directly<br>
&gt; from  a shapefile, everything is ok, but not postgis, here is the code<br>
&gt;<br>
&gt;  LAYER<br>
&gt;     NAME &#39;kenya_administrative&#39;<br>
&gt;     TYPE LINE<br>
&gt;     CONNECTIONTYPE postgis<br>
&gt;     CONNECTION &quot;dbname=&#39;postgis-try&#39; host=localhost port=5432<br>
&gt; user=&#39;postgres&#39; password=&#39;postgres&#39;&quot;<br>
&gt;     DATA &quot;the_geom FROM kenya_administrative&quot;<br>
&gt;     METADATA<br>
&gt;       &#39;wms_title&#39; &#39;kenya_administrative&#39;<br>
&gt;     END<br>
&gt;     STATUS OFF #when status in ON, its completely blank when off there<br>
&gt; is a gray background<br>
&gt;     TRANSPARENCY 100<br>
&gt;     PROJECTION<br>
&gt;     &quot;init=epsg:31468&quot;<br>
&gt;<br>
&gt;     END<br>
&gt;     CLASS<br>
&gt;        NAME &#39;kenya_administrative&#39;<br>
&gt;        STYLE<br>
&gt;          SYMBOL 0<br>
&gt;          SIZE 2<br>
&gt;          OUTLINECOLOR 150 123 90<br>
&gt;          COLOR 0 0 0<br>
&gt;        END<br>
&gt;     END<br>
&gt;   END<br>
&gt;<br>
<br>
</div></div>Linnet,<br>
<br>
I recommend that you:<br>
<br>
- remove all other layers from your mapfile, so that there is only one<br>
layer (postgis layer)<br>
- remove all projection objects from your mapfile<br>
- use the ogrinfo command to get the extent of your postgis layer (see<br>
the example in <a href="http://www.mapserver.org/input/vector/postgis.html" target="_blank">http://www.mapserver.org/input/vector/postgis.html</a>)<br>
   - use the extents returned from ogrinfo in your EXTENT parameter of<br>
your mapfile<br>
- retry using shp2img<br>
<br>
That should display your postgis layer.  If you make it that far, then<br>
you can worry about projection issues.<br>
<br>
-jeff<br>
<br>
<br>
---<br>
Jeff McKenna<br>
MapServer Consulting and Training Services<br>
<a href="http://www.gatewaygeomatics.com/" target="_blank">http://www.gatewaygeomatics.com/</a><br>
<br>
<br>
_______________________________________________<br>
MS4W-Users mailing list<br>
<a href="mailto:MS4W-Users@lists.maptools.org" target="_blank">MS4W-Users@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/ms4w-users" target="_blank">http://lists.maptools.org/mailman/listinfo/ms4w-users</a><br>
</blockquote></div><br><br clear="all"><br></div></div>-- <br>With regards,<br><font color="#888888"> Linnet Kwamboka<br><br><br>
</font></blockquote></div><br><br clear="all"><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>With regards,<br> Linnet Kwamboka<br><br>+254725653165, +254733229041<br>site: <a href="http://geekmates.ning.com">geekmates.ning.com</a><br>blog: <a href="http://one-kenya.blogspot.com">one-kenya.blogspot.com</a><br>

skype: geekmate<br>