Skip to main content

Though experienced with reading WFS's, I'm a little bit frustrated about reading a WFS2.0 in the FeatureReader. It seems it is not paginating. Checking the WFS GetCapabilities, 'FeaturePaging’ is not mentioned.

I want to query the WFS with a polygon. So that is my initiator. But I'm not sure whether the results exceeding the 50k or 100k or even 200k. That's why I want some sort of ‘FeaturePaging’.

 

Anyone an idea on how to solve my issue? It's probably simple, but I can't see it at the moment.

Hi Harmen,

 

Maybe check this question: 

It really depends on if the result service has pagination enabled and I don't think you can really see that from the getcapabilities page. Apparently you need to study the GetFeature response you get to see if there is a "next" property. If it is missing then it won't really work.

If your first question is that you just want to know if the amount of features in your geometry you can use the

resultType=hits

option for your query though to do that you might need to use a http caller to perform your request outside the FeatureReader.

Also there is an option to add a start index in a FeatureReader which you might be able to leverage. Another had made option is to check if your query results into the maximum amount of features returned by using the resultType=hits option and if it does tiling the input geometry and then checking again.


Hi Harmen,

 

Maybe check this question: 

It really depends on if the result service has pagination enabled and I don't think you can really see that from the getcapabilities page. Apparently you need to study the GetFeature response you get to see if there is a "next" property. If it is missing then it won't really work.

If your first question is that you just want to know if the amount of features in your geometry you can use the

resultType=hits

option for your query though to do that you might need to use a http caller to perform your request outside the FeatureReader.

Also there is an option to add a start index in a FeatureReader which you might be able to leverage. Another had made option is to check if your query results into the maximum amount of features returned by using the resultType=hits option and if it does tiling the input geometry and then checking again.

Thank you Birgit for your reply.

I've read the post about the paging and wfs 2.0.0. That post gave me some hints and clues, but I still went clueless ;-) 

Also I’ve tried to work with the max features, the start index and the count parameters. But that doesn't work, probably because the wfs service isn't having that paging option.

Now I'm trying to use a spatial filter with small(er) areas to fetch the data.


Eventually, it seems that the WFS is not handling spatial restrictions very well and also paging seems not implemented as well. So in the end I just used the WFS reader and gave it a simple bounding box with a million features max output. That gave me alle the features I wanted (and much more...). 

With some filtering after the reader, I have the data I wanted. 

As always: there are many ways to Rome, and this one works for me.


Reply