[Mapserver-users] Error with Postgis data variable
Matthew Haines
mhaines94108 at hotmail.com
Tue Jan 20 17:54:29 PST 2004
I'm having what seems to be a very common problem, but I've stripped the
code down to the bone and am at a loss as to what to do next. I've read the
archives for three hours now and am not finding anything.
Mandrake 9.2 Linux, PostgreSQL 7.4, Postgis 0.8.0, Mapserver 4.0.1
I've chopped my .map file down to the bone:
LAYER
NAME "bk_taxlots"
CONNECTIONTYPE postgis
CONNECTION "user=website dbname=nycpr"
DATA "the_geom from brooklyn_taxlots"
MAXSCALE 25000
TYPE POLYGON
STATUS DEFAULT
CLASS
NAME "Residential, 1-2 Fam"
OUTLINECOLOR 32 32 32
END
END
and I'm executing shp2img and get this:
msDrawMap(): Image handling error. Failed to draw layer named 'bk_taxlots'.
<br>
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'),OID::text from
brooklyn_taxlots WHERE the_geom && setSRID('BOX3D(997814 178997,999214
180397)'::BOX3D, find_srid('','brooklyn_taxlots','the_geom') )' <br><br>
Postgresql reports the error ''<br><br>
More Help:<br><br>
Error with POSTGIS data variable. You specified '<check your .map
file>'.<br>
Standard ways of specifiying are : <br>
(1) 'geometry_column from geometry_table' <br>
(2) 'geometry_column from (<sub query>) as foo using unique <column
name> using SRID=<srid#>' <br><br>
Make sure you put in the 'using unique <column name>' and 'using
SRID=#' clauses in.
_________________________________________________________________
High-speed usersbe more efficient online with the new MSN Premium Internet
Software. http://join.msn.com/?pgmarket=en-us&page=byoa/prem&ST=1
More information about the MapServer-users
mailing list