[mapserver-users] Reg: QueryMap(Zoom To Shape) with Mapserver PostgreSql/PostGIS
Carlos Ruiz
boolean10001 at yahoo.com
Thu Aug 7 07:26:37 PDT 2008
Venkat,
Are you using a filter ? I can see in the SQL statement this: WHERE (Africa). So I guess
you have FILTER "Africa" instead FILTER " continent = 'Africa' ". Try this and let me know
what happened.
Greetings from México
IC Carlos Ruiz
--- On Thu, 8/7/08, Venkat Rao Tammineni <vtammineni at roulacglobal.com> wrote:
From: Venkat Rao Tammineni <vtammineni at roulacglobal.com>
Subject: [mapserver-users] Reg: QueryMap(Zoom To Shape) with Mapserver PostgreSql/PostGIS
To: mapserver-users at lists.osgeo.org, mapserver-users-owner at lists.osgeo.org, mapserver-dev at lists.osgeo.org, mapserver-commits at lists.osgeo.org
Date: Thursday, August 7, 2008, 6:35 AM
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.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080807/324473b9/attachment.htm>
More information about the MapServer-users
mailing list