[Mapserver-users] mapserver doesnt show anything...

Ednardo Ferreira ednardof at yahoo.com
Fri Jul 16 09:41:16 EDT 2004


Please, I'm having problems with mapserver and
postgis. What is happenning?

Thanks!

--------

My map is:

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

and show this message:

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 Jan 23/2004.
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 









		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 



More information about the mapserver-users mailing list