[postgis-users] Strange PostGIS/MapServer behaviour

Alexander Pucher pucher at atlas.gis.univie.ac.at
Tue Mar 25 02:14:30 PST 2003


Hi,

I'm using MapServer 3.6 along with PostGIS 0.7.3.
When working on my application code, from time to time I get the 
following error:

---

*Warning*: MapServer Error in prep_DB(): Error executing POSTGIS DECLARE 
(the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT 
myclass::text,asbinary(force_collection(force_2d()),'XDR'),OID::text 
from  WHERE && setSRID('BOX3D(93965 204396.645,705057 
585565.355)'::BOX3D, 31297 )'

Postgresql reports the error 'ERROR: parser: parse error at or near "" '

---

I have tracked it down to the case that it happens when I move the line 
'dl('php_mapscript_36.so');' to another place, but still it remains 
before the '$map = ms_newMapObj($cfg_map_file);' line in the code!!
The strange thing about this is that the app doesn't work anymore, even 
if I undo all the changes until the initial state. I have to get the 
file from the backup to make it work again ?!?
I have tried to execute the PostGIS query manually and it works, so this 
shouldn't be the problem:

select the_geom from
    (select bez_p.the_geom,bez_p.oid,temp_20030325103702.value,
        case when temp_20030325103702.value > 0.1 then 1
        when temp_20030325103702.value between 0.05 and 0.1 then 2
        when temp_20030325103702.value between 0 and 0.05 then 3
        when temp_20030325103702.value between -0.05 and 0 then 4
        else 5
    end as myclass from bez_p,temp_20030325103702
    where bez_p.bezirk_id = temp_20030325103702.id)
as foo using SRID=31297

Any suggestions?

alex

-- 
________________________________________________________

Institut fuer Geographie und Regionalforschung
Universitaet Wien
Kartografie und Geoinformation

Departement of Geography and Regional Research
University of Vienna
Cartography and GIS

Universitaetstr. 7, A-1010 Wien, AUSTRIA

Tel: (+43 1) 4277 48644
Fax: (+43 1) 4277 48649
E-mail: alexander.pucher at univie.ac.at

FTP: ftp://ftp.gis.univie.ac.at
WWW: http://www.gis.univie.ac.at/karto
--------------------------------------------------------
Virtual Map Forum: http://www.gis.univie.ac.at/vmf
--------------------------------------------------------
An eye for an eye, and soon the whole world is blind -- Mahatma Gandhi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20030325/6c77531e/attachment.html>


More information about the postgis-users mailing list