[Mapserver-users] No table name in PostGIS request??

List Reader megalistreader at yahoo.com
Sun Jun 6 09:05:32 EDT 2004


I have a working mapserver (4.0.1) configured for
PostGIS support and WMS support.  My map file is
valid:  WMS GetCapabilities request returns good
results.

I'm trying to add a PostGIS layer of point data:  the
PostGIS data are good (tested from psql);  postgres is
running with -i options; host 127.0.0.1 is authorized
in pg-hba.conf;  database permissions grant select to
the owner of the web server process.


When I try a WMS GetMap request, I get a bad SQL
statement:  no tablename in the SELECT..FROM clause,
for one thing.  The SQL looks like this:

DECLARE mycursor BINARY CURSOR FOR 
SELECT
asbinary(force_collection(force_2d()),'XDR'),OID::text
from  WHERE (Lemma IS NOT NULL) 
and ( && setSRID( 'BOX3D(0 -50.05,180
130.05)'::BOX3D,find_srid('','','') ))


I'm wondering if my error is with my layer definition
in the map file. (I'm trying to migrate up to
Mapserver 4.*)  I've included these lines in my LAYER
definition:  lonlat is a geometry field, and
ptolemygeo is the table name.  I don't see why they
don't appear in the SQL.


  CONNECTIONTYPE postgis
  NAME "Ptolemy"
  CONNECTION "user=www dbname=ptolgis host=127.0.0.1
port=5432"
  DATA "lonlat FROM ptolemygeo"
  TYPE POINT
  STATUS ON


Any suggestions/help appreciated,

Neel Smith



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 



More information about the mapserver-users mailing list