[UMN_MAPSERVER-USERS] Problems displaying PostGIS Layer
Tyler Mitchell
tylermitchell at SHAW.CA
Wed Jan 12 19:14:33 PST 2005
Skweda,
Regardless of the status of the layer, you're obviously turning it on in your
script or it wouldn't give an error. Can you provide us the script as well
so we can see what you are doing with it? Are you modifying anything about
this layer?
Tyler
On January 12, 2005 10:01 am, Ethan Alpert wrote:
> There's also the slight detail that you have the layer status set to OFF.
>
> -e
>
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
> Behalf Of Skweda O'Bomsawin Sent: Wednesday, January 12, 2005 10:15 AM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] RE : [UMN_MAPSERVER-USERS] Problems
> displaying PostGIS Layer
>
>
> Hi William!
>
> I'd first recommend you to create an index for your Postgis layer: CREATE
> INDEX us_cities_idx ON us_cities USING GIST (the_geom GIST_GEOMETRY_OPS);
>
> Second, since your layer is using SRID 4326, make sure you have a
> PROJECTION bloc correctly set in your MAP section of you mapfile.
> Otherwise, you must have a PROJECTION bloc in your LAYER section...
>
> Skweda
>
>
> -----Message d'origine-----
> De : UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la
> part de William Hudspeth Envoyé : 12 janvier 2005 11:28 À :
> MAPSERVER-USERS at LISTS.UMN.EDU Objet : [UMN_MAPSERVER-USERS] Problems
> displaying PostGIS Layer
>
> 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
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.6.10 - Release Date: 2005-01-10
More information about the MapServer-users
mailing list