Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geometric operation DWITHIN and WITHIN returns wrong results #1931

Closed
MV88 opened this issue Jun 13, 2017 · 4 comments
Closed

Geometric operation DWITHIN and WITHIN returns wrong results #1931

MV88 opened this issue Jun 13, 2017 · 4 comments

Comments

@MV88
Copy link
Contributor

MV88 commented Jun 13, 2017

how to reproduce:

  • Open the Test WFS Map
  • Create a polygon as descrivbed in the picture below
  • Click search

image
It should return only WA and OR but it seems to use degrees and not meters

here is the request

curl 'https://demo.geo-solutions.it/geoserver/wfs?service=WFS&outputFormat=json' -H 'Origin: http://localhost:8081' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Referer: http://localhost:8081/?debug=true' -H 'Connection: keep-alive' --data-binary '<wfs:GetFeature startIndex="0" maxFeatures="20" service="WFS" version="1.1.0" xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"><wfs:Query typeName="topp:states" srsName="EPSG:900913"><ogc:Filter><ogc:DWithin><ogc:PropertyName>the_geom</ogc:PropertyName><gml:Polygon srsName="EPSG:900913"><gml:exterior><gml:LinearRing><gml:posList>-13912762.14035465 6447616.209911188 -14225848.20821073 5811660.134578522 -13589892.132878065 5410518.610137917 -13306157.883883491 6046474.685470584 -13912762.14035465 6447616.209911188</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon><ogc:Distance units="m">10</ogc:Distance></ogc:DWithin></ogc:Filter></wfs:Query></wfs:GetFeature>' --compressed
@MV88
Copy link
Contributor Author

MV88 commented Jun 14, 2017

if i use this spatial filter the results are wrong, i.e. it returns 0 features
image
this happens using leaflet.

no problem with openlayers.

@MV88 MV88 changed the title Geometric operation DWITHIN returns wrong results Geometric operation DWITHIN and WITHIN returns wrong results Jun 14, 2017
@aaime
Copy link
Member

aaime commented Jun 14, 2017

The WFS DWithin filter won't work, it's a well know and very old GeoServer issue:
https://osgeo-org.atlassian.net/browse/GEOS-937

@aaime
Copy link
Member

aaime commented Jun 14, 2017

By the way, fixing the issue above is some medium work, but not as hard as it seems, assuming one can do a rough meter to degree translation like it's done in mapserver (which works for small distances)

@tdipisa tdipisa added this to the 2018.04.00 milestone Sep 21, 2018
@tdipisa tdipisa modified the milestones: 2019.02.00, 2019.03.00 Nov 23, 2018
@tdipisa tdipisa modified the milestones: 2019.03.00, 2019.04.00 Aug 9, 2019
@tdipisa tdipisa removed this from the 2020.02.00 milestone Jan 15, 2020
@tdipisa
Copy link
Member

tdipisa commented Jan 15, 2020

closed for inactivity.

@tdipisa tdipisa closed this as completed Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants