2
votes

I have two layer one is Point Layer and another is Polygon Layer.Both Layer Display on Map from GeoServer using WMS Service. I draw some of the Point inside Polygon and other are on Map only.

Now i want to get Point Feature details these are available into particular Polygon Area,For that i have applied CQL Filter Query with BBOX of the Polygon feature by using WFS request to Geoserver with EPSG:4326.

Filter Query:

http://localhost:8080/geoserver/cite/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=cite:filterquertyTest&CQL_FILTER=BBOX(the_geom%2C70.136719%2C10.833306%2C87.890625%2C32.842674)&SRS=EPSG%3A4326&WIDTH=950&HEIGHT=400&maxFeatures=50&outputFormat=application%2Fjson

But here i'm getting issue like near Point outside the Polygon available also returning by geoserver as feature details.

See the image it's return totalFeatures Count 4 but inside polygon layer only 3 Point is there.

enter image description here

So Any solution to get exactly Point are available inside the polygon Area.

Thanks in advance.

1

1 Answers

2
votes

GeoServer is giving you exactly what you asked for which is all the points that fall inside the box defined by the two corners 70.136719,10.833306 87.890625,32.842674.

If you want just the 3 points that are inside the polygon you need to use a within filter.

&CQL_FILTER=within(the_geom,POLYGON((70.136719 10.833306,....)))