Hi,

Just a guess, but using units in filters is often poorly implemented. Have a 
try without units and by giving the distance in degrees.

-Jukka Rahkonen-

Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Troy Day
Lähetetty: 24. syyskuuta 2013 16:23
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Submitting filter does not filter - returns all 
features

I'm looking for advice on how to pass a GET request Filter through mapserver to 
an oracle spatial database connection. Although I have successfully implemented 
a BBOX filter, both DWithin and Intersects spatial filters seem to be ignored 
during the query process because all features (up to MAXFEATURES) are returned. 
No errors are returned with debug set to 5.

Here is a sample URL:

http://wfsd.visualapms.com/wfs.php?SERVICE=WFS&VERSION=1.1.0&REQUEST=getfeature&TYPENAME=parcels&SRSNAME=EPSG:4269&OUTPUTFORMAT=json&Filter=%3CFilter%3E%3CDWithin%3E%3CPropertyName%3ESHAPE%3C/PropertyName%3E%3Cgml:Point%3E%3Cgml:coordinates%3E-101.9378217465,36.758602636999996%3C/gml:coordinates%3E%3C/gml:Point%3E%3CDistance%20units=%27meters%27%3E200%3C/Distance%3E%3C/DWithin%3E%3C/Filter%3E&MAXFEATURES=300

Here is the filter part of that url  in xml format:

&Filter=<Filter><DWithin><PropertyName>SHAPE</PropertyName><gml:Point><gml:coordinates>-101.9378217465,36.758602636999996<gml:coordinates></gml:Point><Distance
 units="meters">200</Distance></DWithin></Filter>

...and here is the layer definition within the map file I'm using:

  LAYER
    NAME           "parcels"
    METADATA
      "wfs_title"                 "Parcels"
      "wfs_srs"                   "EPSG:4269"
      "gml_include_items"         "all"
      "gml_featureid"             "OBJECTID"
      "wfs_enable_request"        "*"
      "wfs_getfeature_formatlist" "gml,json,geojson"
      "gml_COUNTRY_ID_type"       "Character"
      "gml_STATE_ID_type"         "Character"
      "gml_COUNTY_ID_type"        "Character"
      "gml_PARCEL_ID_type"        "Character"
    END
    TYPE           POLYGON
    STATUS         ON
    EXTENT         -180 -90 180 90
    CONNECTIONTYPE oraclespatial
    CONNECTION     "SDE/3nz0rb4rr4g1n@ArcSDE"
    DATA           "SHAPE FROM (select OBJECTID, COUNTRY_ID, STATE_ID, 
COUNTY_ID, PARCEL_ID, APP_USER_G, SHAPE from PARCEL) USING FILTER"
    PROJECTION
      "init=epsg:4269"
    END
    CLASS
      NAME              "Parcels"
      STYLE
        COLOR                240 240 240
        OUTLINECOLOR           0   0   0
      END
    END
  END


Hoping others have gone down this rabbit hole...thanks for looking!
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to