[UMN_MAPSERVER-USERS] RE : [UMN_MAPSERVER-USERS] Problems displaying PostGIS Layer

Skweda O'Bomsawin sobomsawin at KASSINI.COM
Thu Jan 13 10:24:33 EST 2005


Obviously, this question is for Bill (or maybe William, I don't exactly know
his name).  By the way Bill or William, could you please give us a sign of
life and help to resolve these misunderstanding (and maybe provide us with
some of your Python script)?

Tyler, I agree with you, you don't have to set the layer status to ON or
DEFAULT if you do that in your script (Swing or PHP).

Skweda
 

-----Message d'origine-----
De : UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la
part de Tyler Mitchell
Envoyé : 12 janvier 2005 22:15
À : MAPSERVER-USERS at LISTS.UMN.EDU
Objet : [UMN_MAPSERVER-USERS] RE : [UMN_MAPSERVER-USERS] Problems displaying
PostGIS Layer

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

-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.11 - Release Date: 2005-01-12
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.11 - Release Date: 2005-01-12
 



More information about the mapserver-users mailing list