Comments and answers for "wfs query" https: //knowledge.safe.com/questions/86641/wfs-query-1.html The latest comments and answers for the question "wfs query" 发表评论ssisman06 ssisman06的回答 https: //knowledge.safe.com/comments/87991/view.html < div class = " fr-view clearfix " > < p > hı< rel = "用户"href="//www.baooytra.com/knowledge/users/8845/thijsknapen.html" nodeid="8845">@thijsknapen ;


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>
Wed, 06 Mar 2019 07:38:49 GMT ssisman06
Answer by thijsknapen https: //knowledge.safe.com/answers/87869/view.html

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:

  1. Is there a work around for the WFS limitation of querying 1000 features at a time?
  2. Can two queries be combined?

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.

Mon, 04 Mar 2019 00:04:25 GMT thijsknapen
Comment by arnovananrooij on arnovananrooij's answer https: //knowledge.safe.com/comments/86885/view.html

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.

Wed, 13 Feb 2019 15:05:20 GMT arnovananrooij
Answer by ssisman06 https: //knowledge.safe.com/answers/86852/view.html < div class = " fr-view clearfix " > < p > hı< rel = "用户"href="//www.baooytra.com/knowledge/feed/86641/#">@itay ,

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.

Wed, 13 Feb 2019 08:56:10 GMT ssisman06
Answer by itay https: //knowledge.safe.com/answers/86667/view.html

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.

Fri, 08 Feb 2019 19:12:43 GMT itay
Comment by takashi https: //knowledge.safe.com/comments/86644/view.html

Do you need to delete every <gml:featureMember> element whose descendant element <TKGM:durum> has a value other than 3?

Fri, 08 Feb 2019 12:51:55 GMT takashi