[postgis-users] mapserver with postgis layer

Yingru Cheng yingru.cheng at premierdata.com
Fri Sep 10 12:48:29 PDT 2004


Hi, all

 

I have a problem to load postgis layer into mapserver. I am using
postgis 0.8.2, postgreSQL 7.5 and mapserver4.0.2. and also Apache
2.0.49, php 4.3.7.

 

I have no problem to show shapefiles in the mapserver. 

 

For postgis, I received a prompt dialog saying "postgres.exe has
encountered a problem and needs to close",

Then I received the following:

 

msDrawMap(): Image handling error. Failed to draw layer named
'postgisogactlease'. 
prep_DB(): Query error. Couldnt recover from a bad query: 'DECLARE
mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from
wy_ogactlease_clip_tbl WHERE the_geom && setSRID('BOX3D(-106.44029354308
43.3440540930836,-105.185092420256 44.2530829970614)'::BOX3D,
find_srid('','wy_ogactlease_clip_tbl','the_geom') )'

 

here is part of the map file(layer is in latlong and I want to show it
in utm):

MAP

  NAME ITASCA

  STATUS ON

  SIZE 600 600

  EXTENT 425000.0 4800000.0 445000.0 4900000.0 

   UNITS METERS

  SHAPEPATH "data"

  IMAGECOLOR 255 255 255

 

  IMAGETYPE PNG

 

  PROJECTION

    "proj=utm"

    "ellps=GRS80"

    "zone=13"

     "north"

     "no_defs"

  END

..

.. //other shape file layers

..

LAYER

    NAME postgisogactlease

    TYPE POLYGON

    STATUS DEFAULT

    

    CONNECTIONTYPE postgis

    CONNECTION "user=test1 password=test1 dbname=demo host=localhost"

    

    DATA "the_geom from wy_ogactlease_clip_tbl"

 

    PROJECTION

            "proj=latlong"

            "ellps=clrk66"

    END

 

    CLASS

        COLOR 205 92 82

    END

 

  END # postgis layer

 

END # Map File

 

 

I could not tell what is wrong. Anybody saw this before? Anything I
missed?

 

Thanks and have a good weekend,

 

cheng

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20040910/758778c1/attachment.html>


More information about the postgis-users mailing list