wfs attribute filtering

Bart van den Eijnden BEN at SYNCERA-ITSOLUTIONS.NL
Tue Aug 23 07:54:14 PDT 2005


Huub,

1: add gml_include_items "all" to your LAYER's METADATA section
2: I don't expect this to work with variable subsitution
3: You can set the wfs_filter METADATA with Mapscript, I don't think you can do this with normal CGI

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

>>> Huub Fleuren <hfl at HOME.NL> 08/23/05 1:55 pm >>>
Hi List

I'm happily getting images from a wfs_filtered WFS client layer from my 
map-WFS-server and i was accumulating the following questions.

1. Why are there no attributes in the response to

 http://localhost/cgi-bin/mapserv/bin/mapserv.exe?map=mapserv/bin/chameleon.map&version=1.0.0&service=wfs&request=getfeature&typename=park 
 http://localhost/cgi-bin/mapserv/bin/mapserv.exe?map=mapserv/bin/chameleon.map&version=1.0.0&service=wfs&request=getfeature&typename=park&Filter=<Filter><PropertyIsEqualTo><PropertyName>PARK_</PropertyName><Literal>10</Literal></PropertyIsEqualTo></Filter>

2. I'm trying variable substitution in the to <ogc:filter/> but the 
expression % + variable + % is  interpreted litterally

 http://localhost/cgi-bin/mapserv/bin/mapserv.exe?map=mapserv/bin/wfs_park.map&PARK_=10&service=wms&request=getmap&version=1.1.1&layers=wfs_park&styles=&srs=EPSG:42304&bbox=-2600000,-700000,3500000,3840000&width=610&height=450&format=png&transparent=true&exceptions=text/xml&bgcolor=0xffffff 

3. How can I  filter dynamically?

Regards, Huub
===

WFS Server layerdefinition
LAYER
  NAME park
  DUMP TRUE
  METADATA
    DESCRIPTION   "Park"
  END
  TYPE POLYGON
  STATUS ON
  DATA park
  CLASS
    NAME "Parks"
    COLOR 200 255 0
    OUTLINECOLOR 120 120 120
  END
  TOLERANCE 5
END # Layer


WFS Client layerdefinition

LAYER
  NAME wfs_park
  TYPE POLYGON
  STATUS ON
  CONNECTIONTYPE WFS
  CONNECTION 
"http://localhost/cgi-bin/mapserv/bin/mapserv.exe?map=mapserv/bin/chameleon.map"
  #adding a Filterkeyword works, but also not applicable to variable 
substitution
  
#&Filter=<Filter><PropertyIsEqualTo><PropertyName>PARK_</PropertyName><Literal>%PARK_%</Literal></PropertyIsEqualTo></Filter>"
  METADATA
    "wfs_typename"          "park"
    "wfs_version"           "1.0.0"
    "wfs_request_method"    "GET"
    "wfs_connectiontimeout" "60"
    "wfs_maxfeatures"       "50"
    "wfs_filter"   
"<PropertyIsEqualTo><PropertyName>PARK_</PropertyName><Literal>%PARK_%</Literal></PropertyIsEqualTo>"
#  "wfs_filter"   
"<PropertyIsEqualTo><PropertyName>PARK_</PropertyName><Literal>10</Literal></PropertyIsEqualTo>"

  END
  PROJECTION
    "init=epsg:42304"
  END
    CLASS
        STYLE
        COLOR 0 255 0
        END
    END
END



More information about the MapServer-users mailing list