I would like to use CQL in a URL call to return only a particular geometric type from a WFS that broadcasts multiple geometries. I have been going over this:
http://docs.geoserver.org/latest/en/user/filter/ecql_reference.html
and cannot see where it says "Here is how you build the URL," or "Here is how you return only geometries matching a given type."
Here is a non-working call that expresses what I want to do on a GeoServer instance with a WFS 1.0.0 feed:
http://server/geoserver/ows?service=wfs&version=1.0.0&request=GetFeature&typeName=dataset:layer&cql_filter=(geometry='Point')AND(WITHIN(geometry,POLYGON((10.00 20.00,...))))
This call works:
http://server/geoserver/ows?service=wfs&version=1.0.0&request=GetFeature&typeName=dataset:layer&cql_filter=WITHIN(geometry,POLYGON((10.00 20.00,...)))
So all I need to do is add in the geometric type limiter.
My geometry token on GeoServer is geometry
I know how to do the geometric limitation using OGC XML, but I do not know how to add in the polygon WITHIN statement using OGC XML. So I would accept an answer that clearly defines how to construct the XML version of this same thing, or a CQL solution for the same. I tried a coarse bounding box:
<ogc Filter xmlns:ogc='http://www.opengis.net/ogc'>
<ogc:And>
<ogc:BBOX>
<ogc:PropertyName>geometry</ogc:PropertyName>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>10.0,20.0,30.0...</gml:coordinates>
</gml:Box>
</ogc:BBOX>
---other queries---
This ends up yielding:
Attempted to construct illegal filter - I don't understand the tag: gml:Box.