postgis query / template ignored

Henrik Wilsdorf h.wilsdorf at GMX.DE
Fri Sep 9 09:45:12 EDT 2005


Hi, I'm using MapServer version 4.6.0 CGI with Postgis /Postgres80 on
Win2000.
The image of the geometry works fine.
But I've got trouble with getting results in query mode.
When I query a polygon from postgis, then i got a page with
content "Content-type: text/html", and my template specified in the CLASS
section of mapfile is completely ignored. Only the header template is
working. Even when I misspell the template name, this is not reported. With
the same geometrie as a layer from shape data, the template runs fine from
the same mapfile.
When I query a point from postgis, the template file is also ignored, but I
got an additional error: "Content-type: text/html msPOSTGISLayerGetShape():
Query error. Error executing POSTGIS SQL statement (in FETCH ALL): DECLARE
mycursor2 BINARY CURSOR FOR SELECT
objnr::text,folie::text,objart::text,artinfo::text,objkartyp::text,label::te
xt,winkel::text,mver::text,objgeom::text,bemerkung::text,asbinary
(force_collection(force_2d(the_geom)),'NDR') from alkobj_t_pkt WHERE objnr
= 0 -ERROR: cannot cast type boolean to text
More Help: "
The same results are with mapserver 4.4 and 4.2 on IIS and apache.
Is there a general problem with query postgis layers??? or is there a
special trick for postgis?

Thank you for help - Henrik.



More information about the mapserver-users mailing list