[MS4W-Users] mapserver not displaying postgis layers
Linnet Kwamboka
scientific1quash at gmail.com
Mon May 17 03:22:25 EST 2010
hey Jeff,
i managed to run the ogrinfo -al -sokenya_administrative.shp command but i
get the following error,
FAILURE:
Unable to open datasource `E:\Ryan\solid_earth\thick18.ovf' with the
following drivers.
-> ESRI Shapefile
-> UK .NTF
-> SDTS
-> TIGER
-> S57
-> MapInfo File
-> DGN
-> VRT
-> AVCBin
-> REC
-> Memory
-> CSV
-> GML
-> SQLite
-> ODBC
-> OGDI
-> PostgreSQL
-> FMEObjects Gateway
how can this be solved? any ideas, anyone?
On Sat, May 15, 2010 at 1:05 PM, Linnet Kwamboka <scientific1quash at gmail.com
> wrote:
> Thanks Jeff,
> 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?
>
> >ogrinfo PG:"host=127.0.0.1 user=postgres password=postgres dbname=canada port=5432"
>
> using driver `PostgreSQL' successful.
> 1: province (Multi Polygon)
>
> or
>
> >ogrinfo --formats
> Loaded OGR Format Drivers:
> ...
> -> "PGeo" (readonly)
> -> "PostgreSQL" (read/write)
>
>
> -> "MySQL" (read/write)
> ...
>
> i have only one layer-the postgis layer and i have removed the projection
>
>
>
> On Sat, May 15, 2010 at 11:49 AM, Jeff McKenna <
> jmckenna at gatewaygeomatics.com> wrote:
>
>> Linnet Kwamboka wrote:
>> > hey guys,
>> > i have trouble displaying postgis layers on mapserver nothing at all
>> > seems to work, any idea how i can change this, coz when i load directly
>> > from a shapefile, everything is ok, but not postgis, here is the code
>> >
>> > LAYER
>> > NAME 'kenya_administrative'
>> > TYPE LINE
>> > CONNECTIONTYPE postgis
>> > CONNECTION "dbname='postgis-try' host=localhost port=5432
>> > user='postgres' password='postgres'"
>> > DATA "the_geom FROM kenya_administrative"
>> > METADATA
>> > 'wms_title' 'kenya_administrative'
>> > END
>> > STATUS OFF #when status in ON, its completely blank when off there
>> > is a gray background
>> > TRANSPARENCY 100
>> > PROJECTION
>> > "init=epsg:31468"
>> >
>> > END
>> > CLASS
>> > NAME 'kenya_administrative'
>> > STYLE
>> > SYMBOL 0
>> > SIZE 2
>> > OUTLINECOLOR 150 123 90
>> > COLOR 0 0 0
>> > END
>> > END
>> > END
>> >
>>
>> Linnet,
>>
>> I recommend that you:
>>
>> - remove all other layers from your mapfile, so that there is only one
>> layer (postgis layer)
>> - remove all projection objects from your mapfile
>> - use the ogrinfo command to get the extent of your postgis layer (see
>> the example in http://www.mapserver.org/input/vector/postgis.html)
>> - use the extents returned from ogrinfo in your EXTENT parameter of
>> your mapfile
>> - retry using shp2img
>>
>> That should display your postgis layer. If you make it that far, then
>> you can worry about projection issues.
>>
>> -jeff
>>
>>
>> ---
>> Jeff McKenna
>> MapServer Consulting and Training Services
>> http://www.gatewaygeomatics.com/
>>
>>
>> _______________________________________________
>> MS4W-Users mailing list
>> MS4W-Users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/ms4w-users
>>
>
>
>
> --
> With regards,
> Linnet Kwamboka
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20100517/f9997bef/attachment.htm
More information about the MS4W-Users
mailing list