[postgis-users] Re: Problems postgis - mapserver
Ednardo Ferreira
ednardo_ferreira at yahoo.ca
Fri Jul 16 12:04:34 PDT 2004
thank you for yout attention.
this is the .map file and the error is after.
MAP
IMAGETYPE PNG
EXTENT -97.5 41.619778 -82.122902 49.38562 #
Geographic coordinates
SIZE 700 700
SHAPEPATH "data"
IMAGECOLOR 255 255 255
# Start of LAYER DEFINITIONS
---------------------------------------------
LAYER # States polygon layer begins here
CONNECTIONTYPE postgis
NAME "states"
CONNECTION "host=branco dbname=teste
user=postgres"
DATA "the_geom FROM ednardo"
STATUS DEFAULT
TYPE POLYGON
CLASS
COLOR 20 22 22
END
END
END # end of map file/object
-----------
error:
msDrawMap(): Image handling error. Failed to draw
layer named 'states'.
prep_DB(): Query error. Error executing POSTGIS
DECLARE (the actual query) statement: 'DECLARE
mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d()),'NDR'),OID::text
from WHERE && setSRID('BOX3D(-97.5
37.8194380657143,-82.122902 53.1859599342857)'::BOX3D,
find_srid('','','') )'
Postgresql reports the error as 'ERROR: parse error at
or near "WHERE" at character 104 '
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.php
Mappostgis.c - version of June 12/2003.
msPOSTGISLayerParseData(): Query error. Error parsing
POSTGIS data variable. Must contain 'geometry_column
from table_name' or 'geom from (subselect) as foo'
(couldnt find ' from '). More help:
Error with POSTGIS data variable. You specified
'the_geom FROM ednardo'.
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.php
Mappostgis.c - version of June 12/2003
=====
"Eterno é tudo aquilo que dura uma fração de segundo, mas com tamanha intensidade que se petrifica, e nenhuma força jamais o resgata."
Drummond
__________________________________________________________
Lèche-vitrine ou lèche-écran ?
magasinage.yahoo.ca
More information about the postgis-users
mailing list