[Mapserver-users] MAXFEATURES and postgis layer

Zamil Murji Zamil.Murji at divestco.com
Tue Aug 12 14:00:42 EDT 2003


Still no luck...
Here is my DATA tag:
DATA "the_geom from (select * from twell limit 1) as foo"

Any thoughts?
Returns the following:
prep_DB(): Query error. Error executing POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT wellid::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from (select * from twell limit 1) as foo WHERE the_geom && setSRID('BOX3D(-98.8122689312977 28.0409584082397,-98.8045708396947 28.0517352621723)'::BOX3D, find_srid('','twell','the_geom') )' 

Postgresql reports the error ''

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. 

Thanks in advance,
Zamil
-----Original Message-----
From: Paul Ramsey [mailto:pramsey at refractions.net]
Sent: Tuesday, August 12, 2003 11:57 AM
To: Zamil Murji
Cc: David Blasby; mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] MAXFEATURES and postgis layer


That's not a SQL data statement, it's a mapserver data statement:

DATA "the_geom from (select * from twell limit 1) as the_selection"

Zamil Murji wrote:

> Sorry doesn't work...
> Here is my DATA tag in my layer definition:
> DATA "the_geom from twell LIMIT 1"
> 
> 
> Any thoughts?
> It brought back this:
> prep_DB(): Query error. Error executing POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT wellid::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from twell LIMIT 1 WHERE the_geom && setSRID('BOX3D(-98.8122689312977 28.0409584082397,-98.8045708396947 28.0517352621723)'::BOX3D, find_srid('','twell LIMIT 1','the_geom') )' 
> 
> Postgresql reports the error ''
> 
> 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. 
> 
> -----Original Message-----
> From: David Blasby [mailto:dblasby at refractions.net]
> Sent: Tuesday, August 12, 2003 11:17 AM
> To: Paul Ramsey; mapserver-users at lists.gis.umn.edu
> Subject: Re: [Mapserver-users] MAXFEATURES and postgis layer
> 
> 
> Paul Ramsey wrote:
> 
>>I am guessing that mappostgis.c is ignoring it. The maplayer.c delegates 
>>that feature to the implementation, and the mappostgis.c implementation 
>>says nothing about it. Should be a very easy feature to add.
> 
> 
> You can also add a "LIMIT n" clause to the SQL in your DATA statement if 
> you want the functionality "right now".
> 
> dave
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users


-- 
       __
      /
      | Paul Ramsey
      | Refractions Research
      | Email: pramsey at refractions.net
      | Phone: (250) 885-0632
      \_





More information about the mapserver-users mailing list