FILTER working on PostGIS layers?

Bart van den Eijnden BEN at SYNCERA-ITSOLUTIONS.NL
Tue Sep 13 07:26:44 EDT 2005


Hi list,

I am running into an issue using Mapscript 4.7 from a few weeks back.

PostGIS layers work fine for map display and query, but as soon as I try to highlight a feature using FILTERITEM and FILTER I get the following error (so it seems the filteritem is not used when building the WHERE clause, the column exists in the database and has the right case):

[13-Sep-2005 13:06:43] PHP Warning:  [MapServer Error]: prepare_database(): Error executing POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT identbv::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from bouwvergunning.aanvraag WHERE (20050049) and (the_geom && setSRID( 'BOX3D(114024.650480941 503134.482620259,115117.267932596 503806.862590517)'::BOX3D,find_srid('','bouwvergunning.aanvraag','the_geom') ))' <br><br>

Postgresql reports the error as 'ERROR:  argument of AND must be type boolean, not type integer ........

This is my LAYER definition:

LAYER
  NAME "bimas"
  METADATA
    wms_title "Bouwvergunningen"
  END
  STATUS OFF
  DEBUG ON
  FILTERITEM "identbv"
  FILTER "20050049"
  TYPE POINT
  CONNECTION "user=stragisweb password=synstragisweb dbname=wormerland host=127.0.0.1"
  CONNECTIONTYPE postgis
  DATA "the_geom from bouwvergunning.aanvraag USING UNIQUE identbv"
  PROJECTION
    "init=epsg:28992"
  END
  MINSCALE 0
  MAXSCALE 10000
  CLASS
    NAME bouwlocaties
    STYLE
      COLOR 255 0 0
      SIZE 12
      SYMBOL "Bouwlocaties"
    END
  END
  TEMPLATE "blank.html"
END

Thanks in advance. Is this fixed in CVS?

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl



More information about the mapserver-users mailing list