First of all I am new to Geoserver and Openlayers. I have been trying to get this working on the Geoserver side using the Layer preview page to view my layer using the Openlayer viewer. I would be implementing it as an Openlayers WFS GET request in the end.
What I am trying to accomplish is to return features that are within a certain distance of different points. (ie. within 5km of a school)
I am using the Layer preview page on Geoserver . I have added the CQL filter of "DWITHIN(GEOM, POINT(-60.2 46.1), 0.05, kilometers)". It has limited the amount of points that were returned but I am unsure if it is filtering correctly.
My questions are as follows:
- From my understanding because of this bug http://jira.codehaus.org/browse/GEOS-937 I have to use degrees for my unit. How can I convert on client side using javascript/openlayers 3 to change 5km into a degree value?
- Can I add multiple DWITHIN filters to say if a point is within 5km of one point and 10km of another?
- Can I filter based off feature type? ie return point within 5km of a School AND 10km of a Hospital