Thanks Brad for your helpYes. 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 ]

RegardsSaka      From: Brad Hards <br...@frogmouth.net>
 To: 'Saka Royban' <sakaroy...@yahoo.com>; '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




  
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to