[mapserver-users] Reg: QueryMap(Zoom To Shape) with Mapserver PostgreSql/PostGIS

Venkat Rao Tammineni vtammineni at roulacglobal.com
Thu Aug 7 04:35:33 PDT 2008


Dear All,

 

I am getting error with query map.But it is working fine for Shape
files.Only  I am getting error with Postgresql/PostGIS.I do not know where
I am doing wrong.

 

Here is my Map File Code :- 

   Name "Continents"

   CONNECTIONTYPE POSTGIS

   CONNECTION "host=192.168.1.158 dbname=GIS password=administrator
user=postgres port=5432"

   DATA "the_geom from rgp_gis_continent"

 

And I have also used like 

     DATA "the_geom from rgp_gis_continent using unique gid and SRID=-1"

 

But this also getting the same error.I am  using Mapserver 5.0  and
Postgresql8.1.

Please let me know where  I am doing wrong.

 

 

 

Below is my error 

 

 

prepare_database(): Query error. Error executing POSTGIS DECLARE (the actual
query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
"continent"::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::
text from rgp_gis_continent WHERE (Africa) and (the_geom && setSRID(
'BOX3D(-180 -112.415519399249,180
112.415519399249)'::BOX3D,find_srid('','rgp_gis_continent','the_geom') ))' 

 

Postgresql reports the error as 'ERROR:  column "africa" does not exist

'

 

More Help:

 

Error with POSTGIS data variable. You specified 'check your .map file'.

Standard ways of specifiying are : 

(1) 'geometry_column from geometry_table' 

(2) 'geometry_column from (sub query) as foo using unique column name using
SRID=srid#' 

 

Make sure you put in the 'using unique  column name' and 'using SRID=#'
clauses in.

 

For more help, please see http://postgis.refractions.net/documentation/ 

 

Mappostgis.c - version of Jan 23/2004.

 

 

 

I am waiting for your great response.

 

 Thanks and Regards

Venkat.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080807/d685c964/attachment.htm>


More information about the MapServer-users mailing list