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' with the <br>following drivers.<br>
-> ESRI Shapefile<br> -> UK .NTF<br> -> SDTS<br> -> TIGER<br> -> S57<br> -> MapInfo File<br> -> DGN<br> -> VRT<br> -> AVCBin<br> -> REC<br> -> Memory<br> -> CSV<br> -> GML<br>
-> SQLite<br> -> ODBC<br> -> OGDI<br> -> PostgreSQL<br> -> FMEObjects Gateway<br></pre>how can this be solved? any ideas, anyone?<br><br><br><br><br><div class="gmail_quote">On Sat, May 15, 2010 at 1:05 PM, Linnet Kwamboka <span dir="ltr"><<a href="mailto:scientific1quash@gmail.com">scientific1quash@gmail.com</a>></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>>ogrinfo PG:"host=127.0.0.1 user=postgres password=postgres dbname=canada port=5432"<br>
using driver `PostgreSQL' successful.<br> 1: province (Multi Polygon)</pre>or<br><br><pre>>ogrinfo --formats<br> Loaded OGR Format Drivers:<br> ...<br> -> "PGeo" (readonly)<br> -> "PostgreSQL" (read/write)<br>
-> "MySQL" (read/write)<br> ...</pre>i have only one layer-the postgis layer and i have removed the projection<div><div></div><div class="h5"><br><br><br><div class="gmail_quote">On Sat, May 15, 2010 at 11:49 AM, Jeff McKenna <span dir="ltr"><<a href="mailto:jmckenna@gatewaygeomatics.com" target="_blank">jmckenna@gatewaygeomatics.com</a>></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>
> hey guys,<br>
> i have trouble displaying postgis layers on mapserver nothing at all<br>
> seems to work, any idea how i can change this, coz when i load directly<br>
> from a shapefile, everything is ok, but not postgis, here is the code<br>
><br>
> LAYER<br>
> NAME 'kenya_administrative'<br>
> TYPE LINE<br>
> CONNECTIONTYPE postgis<br>
> CONNECTION "dbname='postgis-try' host=localhost port=5432<br>
> user='postgres' password='postgres'"<br>
> DATA "the_geom FROM kenya_administrative"<br>
> METADATA<br>
> 'wms_title' 'kenya_administrative'<br>
> END<br>
> STATUS OFF #when status in ON, its completely blank when off there<br>
> is a gray background<br>
> TRANSPARENCY 100<br>
> PROJECTION<br>
> "init=epsg:31468"<br>
><br>
> END<br>
> CLASS<br>
> NAME 'kenya_administrative'<br>
> STYLE<br>
> SYMBOL 0<br>
> SIZE 2<br>
> OUTLINECOLOR 150 123 90<br>
> COLOR 0 0 0<br>
> END<br>
> END<br>
> END<br>
><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>