thank you, I solved the problem
<Filter> <And> <PropertyIsEqualTo> <PropertyName>durum</PropertyName> <Literal>3</Literal> </PropertyIsEqualTo> <Intersects> <PropertyName>geom</PropertyName> <gml:Polygon> <gml:outerBoundaryIs> <gml:LinearRing> <gml:coordinates>@Value(_indices{0}.x),@Value(_indices{0}.y) @Value(_indices{1}.x),@Value(_indices{1}.y) @Value(_indices{2}.x),@Value(_indices{2}.y) @Value(_indices{3}.x),@Value(_indices{3}.y) @Value(_indices{4}.x),@Value(_indices{4}.y)</gml:coordinates> </gml:LinearRing> </gml:outerBoundaryIs> </gml:Polygon> </Intersects> </And> </Filter>
Hi @ssisman06,
Not sure if you already found a proper solution to your problem. I seems to me that there are two items you liked answered:
A useful link to both items can be found from the question:
https://knowledge.safe.com/questions/39574/wfs-reader-filtering-a-non-spatial-class-by-attrib.html
1.
As is discussed there, if the WFS has support for version 2.0.0 you might be able to use WFS paging. You can check this from a 'GetCapabilities' request, i.e.: http://cbsservis.tkgm.gov.tr/tkgm.ows/wfs?request=GetCapabilities&service=WFS.
Unfortunately I noticed that the WFS requires a login, so I can't do this for you. Anyway, you should check for some XML fragment similar to the following:
When supported by the WFS server, within the WFS parameters you can set the 'Start Index' to 0 and the 'Count' to 1000 to 'stack' feature requests per 1000.
2.
Yes, it might be possible to combine both an attribute query and a spatial query. This depends on the XML filter expressions that are supported by the WFS server (again check the 'GetCapabilities' of the WFS server). The following XML filter combines a bounding box and an attribute query. Of cource the coordinates still need to be changed to suit your specific demands.
<Filter> <And> <BBOX> <ValueReference>Geometry</ValueReference> <Envelope srsName="urn:ogc:def:crs:EPSG::4326"> <lowerCorner>10 30</lowerCorner> <upperCorner>35 45</upperCorner> </Envelope> </BBOX> <PropertyIsEqualTo> <ValueReference>durum</ValueReference> <Literal>3</Literal> </PropertyIsEqualTo> </And> </Filter>
Hope this can be of any help.
If you need to download a big area with over a 1000 results why not use a tiler to cut your area into smaller pieces? That always works for me when downloading from WFS. You only might need to remove duplicates with a duplicatefilter afterwards.
Thanks for the help. I have some things to solve. my wfs service gives a maximum of 1000 results per query. i need to download big data.
divided my work area. ( 16000 grid)
My WorkBench =>
this is working correctly.
then I want to use xml filter.
I want to get values that are only 3 .
<TKGM:durum>3</TKGM:durum>
the two do not work together.
xml filter actually works correctly.
How can I use two queries together . I need to apply both the spatial filter and the xml filter.
Is there any idea?
Thank you.
Hallo @ssisman06,
Something like this should work:
<Filter>
<PropertyIsEqualTo>
<PropertyName>durum</PropertyName>
<Literal>3</Literal>
</PropertyIsEqualTo>
</Filter>
In the filter settings of the WFS reader, but that depends if the service supports it, check the get capabilities to make sure.
Hope this helps.
Do you need to delete every <gml:featureMember> element whose descendant element <TKGM:durum> has a value other than 3?