Problems displaying PostGIS Layer

William Hudspeth bhudspeth at EDAC.UNM.EDU
Wed Jan 12 11:28:13 EST 2005


Hello,

I have imported a shapefile into PostGIS with the following:

./shp2pgsql –s 4326 /path/us_cities.shp us_cities –d reason | ./psql –d
reason

The new table has a "gid" column as well as a populated geometry column
named "the_geom".
My map file entry looks like this:

****************************
LAYER
        CONNECTIONTYPE postgis
        NAME "us_cities"
        CONNECTION "user=postgis dbname=reason host=falstaff.unm.edu"
        DATA "the_geom from us_cities"
        STATUS OFF
        TYPE POINT

        CLASS
                COLOR 177 213 34
                SIZE 7
                SYMBOL "circle"
        END
END
********************************
The layer does not display. I get the following error in my Apache error
log:

[Wed Jan 12 08:47:48 2005] [error] [client 129.24.73.222]
_mapscript.MapServerError: msDrawMap(): Image handling error. Failed to
draw layer named 'us_cities'., referer: http://falstaff.unm.edu/cgi-
bin/reason/python_mapscript.py
[Wed Jan 12 08:47:48 2005] [error] [client 129.24.73.222] prep_DB():
Query error. Error executing POSTGIS DECLARE (the actual query)
statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT asbinary
(force_collection(force_2d(the_geom)),'NDR'),gid::text from us_cities
WHERE the_geom && setSRID('BOX3D(-125.000000000, referer:
http://falstaff.unm.edu/cgi-bin/reason/python_mapscript.py


I would appreciate any insight into this problem.

Thanks, Bill



More information about the mapserver-users mailing list