Hi Saka,
I believe that you have found a real issue that should be handled somehow, if not else then in the documentation.
I am sure that you can demonstrate the issue with simple GET requests against the demo layers, I suggest to use topp:states. You will need to make 4 requests, GetMaps for WMS 1.1.0 and 1.3.0 and GetFeatures for WFS 1.0.0 and 1.1.0.
WFS with axis flipping and filters is tricky. I would consider using the long and ugly OGC XML filters instead of CQL_FILTER.
-Jukka Rahkonen-
···
Saka Royban wrote:
Thanks Brad for your help
Yes. WKT format is POINT(x y). But why for WFS, i have to reverse the order to POINT(y x)?
Following code works right but if i change it to POINT(x y), i doesn’t work (Note: Lat=30, Long=40):
filterString = “DWithin(the_geom, POINT(30 40),1,meters)”;
var filter = encodeURIComponent(filterString);
vectorSource = new ol.source.Vector({
format: new ol.format.GML(),
url: ‘http://localhost:8080/geoserver/wfs?’
-
‘SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&’
-
‘typename=ws:Layer1&’
-
‘CQL_FILTER=’ + filter,
});
I’ve also tested other functions like INTERSECTS but the problem exists. I have to define points in y/x order to get a correct result form Geoserver.
and it’s a geoserver log for this filter:
filter = [ the_geom dwithin POINT (30 40), distance: 1.0 ]
Regards
Saka
From: Brad Hards <bradh@…7296…>
To: ‘Saka Royban’ <sakaroyban@…54…>; ‘GeoServer Mailing List List’ <geoserver-users@lists.sourceforge.net>
Sent: Wednesday, August 24, 2016 4:55 AM
Subject: RE: [Geoserver-users] Axis order in WMS ?
2D WKT is POINT(x, y). X is usually the longitude.
Brad