[Mapserver-users] Error with Postgis data variable

Pericles S. Nacionales nacional at cbs.umn.edu
Tue Jan 20 19:14:07 PST 2004


These might be what you're looking for:
http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0401/msg00331.html

You might also want to look at the original message:
http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0401/msg00291.html

Cheers!
Perry N.

On Tue, 2004-01-20 at 19:54, Matthew Haines wrote:
> 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
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
-- 
Pericles S. Nacionales <nacional at cbs.umn.edu>
University of Minnesota




More information about the MapServer-users mailing list