Re: [mapserver-users] Submitting filter does not filter - returns all features

2013-09-25 Thread tday
Thanks for the advice. I have not yet gotten the DWithin to work, however, I
was able to put together a successful Intersects filter and I'm going to
work with that for now.

I suspect you are right about the units being at the root of the problem.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Re-Submitting-filter-does-not-filter-returns-all-features-tp5079619p5080013.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Submitting filter does not filter - returns all features

2013-09-24 Thread Rahkonen Jukka
Sorry about spamming.  This document 
http://mapserver.org/ogc/filter_encoding.html says what are the valid units and 
using "deg" in the filter really works.

http://hip.latuviitta.org/cgi-bin/mapserver_wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=lv:mml_railway&SRSNAME=EPSG:3067&Filter=%3CFilter%3E%3CDWithin%3E%3CPropertyName%3Ethe_geom%3C/PropertyName%3E%3Cgml:Point%3E%3Cgml:coordinates%3E246700,6780800%3C/gml:coordinates%3E%3C/gml:Point%3E%3CDistance%20units=%27deg%27%3E4000%3C/Distance%3E%3C/DWithin%3E%3C/Filter%3E&MAXFEATURES=300

I wonder if not supported unit in a filter like "degrees" should rather lead to 
an error? Now Mapserver drops to use quietly the default distance unit.

-Jukka-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Submitting filter does not filter - returns all features

2013-09-24 Thread Rahkonen Jukka
Blah, copied the same request twice. This request has degrees as units but 
Mapserver is still using the native units, meters.

http://hip.latuviitta.org/cgi-bin/mapserver_wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=lv:mml_railway&SRSNAME=EPSG:3067&Filter=%3CFilter%3E%3CDWithin%3E%3CPropertyName%3Ethe_geom%3C/PropertyName%3E%3Cgml:Point%3E%3Cgml:coordinates%3E246700,6780800%3C/gml:coordinates%3E%3C/gml:Point%3E%3CDistance%20units=%27degrees%27%3E4000%3C/Distance%3E%3C/DWithin%3E%3C/Filter%3E&MAXFEATURES=300

-Jukka-


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Submitting filter does not filter - returns all features

2013-09-24 Thread Rahkonen Jukka
Hi,

I had a try and this with units='meters'
http://hip.latuviitta.org/cgi-bin/mapserver_wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=lv:mml_railway&SRSNAME=EPSG:3067&Filter=%3CFilter%3E%3CDWithin%3E%3CPropertyName%3Ethe_geom%3C/PropertyName%3E%3Cgml:Point%3E%3Cgml:coordinates%3E246700,6780800%3C/gml:coordinates%3E%3C/gml:Point%3E%3CDistance%20units=%27meters%27%3E4000%3C/Distance%3E%3C/DWithin%3E%3C/Filter%3E&MAXFEATURES=300

seem to give the same result as this one with units='degrees'
http://hip.latuviitta.org/cgi-bin/mapserver_wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=lv:mml_railway&SRSNAME=EPSG:3067&Filter=%3CFilter%3E%3CDWithin%3E%3CPropertyName%3Ethe_geom%3C/PropertyName%3E%3Cgml:Point%3E%3Cgml:coordinates%3E246700,6780800%3C/gml:coordinates%3E%3C/gml:Point%3E%3CDistance%20units=%27meters%27%3E4000%3C/Distance%3E%3C/DWithin%3E%3C/Filter%3E&MAXFEATURES=300

The first one sent for TinyOWS does not give results at all but just an error 
message

http://hip.latuviitta.org/cgi-bin/tinyows?SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=lv:mml_railway&SRSNAME=EPSG:3067&Filter=%3CFilter%3E%3CDWithin%3E%3CPropertyName%3Ethe_geom%3C/PropertyName%3E%3Cgml:Point%3E%3Cgml:coordinates%3E246700,6780800%3C/gml:coordinates%3E%3C/gml:Point%3E%3CDistance%20units=%27meters%27%3E4000%3C/Distance%3E%3C/DWithin%3E%3C/Filter%3E&MAXFEATURES=300

The error is about namespaces but Mapserver does not care about such things, 
which means that Mapserver users learn to write filters which do not work with 
almost any other WFS server.

http://www.opengis.net/ows 
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd"; version="1.1.0"
language="en">

Filter Element contains incoherent XML Namespaces




Isn't it fun with WFS?

-Jukka Rahkonen-


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

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>
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Troy Day
Lähetetty: 24. syyskuuta 2013 16:23
Vastaanottaja: 
mapserver-users@lists.osgeo.org<mailto: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.75860263696%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=SHAPE-101.9378217465,36.75860263696200

...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
COLOR240 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

Re: [mapserver-users] Submitting filter does not filter - returns all features

2013-09-24 Thread Rahkonen Jukka
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.75860263696%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=SHAPE-101.9378217465,36.75860263696200

...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
COLOR240 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

Re: [mapserver-users] Submitting filter does not filter - returns all features

2013-09-24 Thread Troy Day
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&OUTPUTF
ORMAT=json&Filter=%3CFilter%3E%3CDWithin%3E%3CPropertyName%3ESHAPE%3C/Proper
tyName%3E%3Cgml:Point%3E%3Cgml:coordinates%3E-101.9378217465,36.758602636999
996%3C/gml:coordinates%3E%3C/gml:Point%3E%3CDistance%20units=%27meters%27%3E
200%3C/Distance%3E%3C/DWithin%3E%3C/Filter%3E&MAXFEATURES=300

 

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

 

&Filter=SHAPE-101.9378217465,36.75860263696200

 

.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

COLOR240 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

Re: [mapserver-users] Submitting filter does not filter - returns all features

2013-09-24 Thread Troy Day
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&OUTPUTF
ORMAT=json&Filter=%3CFilter%3E%3CDWithin%3E%3CPropertyName%3ESHAPE%3C/Proper
tyName%3E%3Cgml:Point%3E%3Cgml:coordinates%3E-101.9378217465,36.758602636999
996%3C/gml:coordinates%3E%3C/gml:Point%3E%3CDistance%20units=%27meters%27%3E
200%3C/Distance%3E%3C/DWithin%3E%3C/Filter%3E&MAXFEATURES=300

 

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

 

&Filter=SHAPE-101.9378217465,36.75860263696200

 

.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

COLOR240 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