Question

WFS data not coming through


Badge

Hi, I'm trying to read data from this server:

https://geodata.nationaalgeoregister.nl/bag/wfs?request=GetCapabilities

but only a 1000 features (the same ones it seems) come through. I've tried switching some parameters around, like what was suggested in previous questiosn about WFS on this forum (ignoring the schema etc. ). However, nothing has worked so far.


11 replies

Userlevel 6
Badge +34

This is because the request limit is 1000 features at a time. You can find this in the GetCapabilities:

<ows:Constraint name="CountDefault">
<ows:NoValues/>
<ows:DefaultValue>1000</ows:DefaultValue>
</ows:Constraint>

If the service is 2.0.0 and responsepaging is allowed you can configure the WFS reader to read the complete dataset in blocks of 1000 features. (This is recently implemented in the WFS reader, use the HTTPCaller for earlier versions.)

0684Q00000ArKN6QAN.png

The reason for this limit is to prevent overloading the service / killing the server. WFS should not be used to download entire datasets, you can use other services, like the BAG Extract for that. So you should use a polygon and a spatial filter to limit the area.

0684Q00000ArKODQA3.png

Badge

This is because the request limit is 1000 features at a time. You can find this in the GetCapabilities:

<ows:Constraint name="CountDefault">
<ows:NoValues/>
<ows:DefaultValue>1000</ows:DefaultValue>
</ows:Constraint>

If the service is 2.0.0 and responsepaging is allowed you can configure the WFS reader to read the complete dataset in blocks of 1000 features. (This is recently implemented in the WFS reader, use the HTTPCaller for earlier versions.)

0684Q00000ArKN6QAN.png

The reason for this limit is to prevent overloading the service / killing the server. WFS should not be used to download entire datasets, you can use other services, like the BAG Extract for that. So you should use a polygon and a spatial filter to limit the area.

0684Q00000ArKODQA3.png

Yes, there's WFS2.0.0 with responsepaging allowed. How do I apply that in FME?

 

Badge

This is because the request limit is 1000 features at a time. You can find this in the GetCapabilities:

<ows:Constraint name="CountDefault">
<ows:NoValues/>
<ows:DefaultValue>1000</ows:DefaultValue>
</ows:Constraint>

If the service is 2.0.0 and responsepaging is allowed you can configure the WFS reader to read the complete dataset in blocks of 1000 features. (This is recently implemented in the WFS reader, use the HTTPCaller for earlier versions.)

0684Q00000ArKN6QAN.png

The reason for this limit is to prevent overloading the service / killing the server. WFS should not be used to download entire datasets, you can use other services, like the BAG Extract for that. So you should use a polygon and a spatial filter to limit the area.

0684Q00000ArKODQA3.png

Thanks,.... yes I don't want to download the whole dataset...lol... I probably don't even have enough space on my computer for that... I do indeed want a subset, of the data. 

 

 

This seems to do the trick only partially.. It does download the data that intersects with the initiator (clip polygon), but when I want to save this data to a shapefile, I don't get any results....Why is that? 

 

 

 

Userlevel 6
Badge +34
Thanks,.... yes I don't want to download the whole dataset...lol... I probably don't even have enough space on my computer for that... I do indeed want a subset, of the data.

 

 

This seems to do the trick only partially.. It does download the data that intersects with the initiator (clip polygon), but when I want to save this data to a shapefile, I don't get any results....Why is that?

 

 

 

My bet is on multi geometry aggregates in the WFS where only single geometry aggregates in shape is allowed. When using WFS as source I usually create 2 workbenches: The first to read the data from WFS and write to FFS. The second to process the FFS to the result dataset. This way you only have to wait for the download from the WFS once.
Badge

This is because the request limit is 1000 features at a time. You can find this in the GetCapabilities:

<ows:Constraint name="CountDefault">
<ows:NoValues/>
<ows:DefaultValue>1000</ows:DefaultValue>
</ows:Constraint>

If the service is 2.0.0 and responsepaging is allowed you can configure the WFS reader to read the complete dataset in blocks of 1000 features. (This is recently implemented in the WFS reader, use the HTTPCaller for earlier versions.)

0684Q00000ArKN6QAN.png

The reason for this limit is to prevent overloading the service / killing the server. WFS should not be used to download entire datasets, you can use other services, like the BAG Extract for that. So you should use a polygon and a spatial filter to limit the area.

0684Q00000ArKODQA3.png

Thanks again...

 

 

Okay, but in the 1st workbench (from WfS to FFS), what parameters do you set for your writer?

 

Because when I add an inspector after the feature reader,I can see both geometry and attributes. 

 

But I just can't write them to a file.  I don't get output for the FFS writer either, just like I didn't when writing to a shapefile...No matter what parameters I set for attribute and geometry handling in the feature reader. At best I get the attributes of the initiator, but I don't want that.. i want the WFS data....

 

 

Userlevel 6
Badge +34
Thanks again...

 

 

Okay, but in the 1st workbench (from WfS to FFS), what parameters do you set for your writer?

 

Because when I add an inspector after the feature reader,I can see both geometry and attributes.

 

But I just can't write them to a file. I don't get output for the FFS writer either, just like I didn't when writing to a shapefile...No matter what parameters I set for attribute and geometry handling in the feature reader. At best I get the attributes of the initiator, but I don't want that.. i want the WFS data....

 

 

Use a FeatureReader to read the Features, single output port. Use a FeatureWriter, Dynamic Schema Definition, connect Generic output port and Schema output port to FeatureWriter. Thats about it...

 

 

 

01-wfs-ffs2017.fmw

 

Badge

This is because the request limit is 1000 features at a time. You can find this in the GetCapabilities:

<ows:Constraint name="CountDefault">
<ows:NoValues/>
<ows:DefaultValue>1000</ows:DefaultValue>
</ows:Constraint>

If the service is 2.0.0 and responsepaging is allowed you can configure the WFS reader to read the complete dataset in blocks of 1000 features. (This is recently implemented in the WFS reader, use the HTTPCaller for earlier versions.)

0684Q00000ArKN6QAN.png

The reason for this limit is to prevent overloading the service / killing the server. WFS should not be used to download entire datasets, you can use other services, like the BAG Extract for that. So you should use a polygon and a spatial filter to limit the area.

0684Q00000ArKODQA3.png

Yes, I'm still not getting output for the 2nd workbench... from (FFS to shape). I think it does have something to do with multi geometry aggregates in WFS... because I get the following warning during translation:

 

 

Dropping heterogeneous aggregate feature for the ESRISHAPE Writer, due to feature type allowed geometries restriction

 

 

And when I tried a geometrycoercer to coerce the FFS to fme_polygon, I got the following:

 

 

Cannot coerce from Multiple Geometry to fme_polygon

 

 

 

 

Userlevel 5
Badge +26
Yes, I'm still not getting output for the 2nd workbench... from (FFS to shape). I think it does have something to do with multi geometry aggregates in WFS... because I get the following warning during translation:

 

 

Dropping heterogeneous aggregate feature for the ESRISHAPE Writer, due to feature type allowed geometries restriction

 

 

And when I tried a geometrycoercer to coerce the FFS to fme_polygon, I got the following:

 

 

Cannot coerce from Multiple Geometry to fme_polygon

 

 

 

 

Perhaps a DeAggregator can help.

 

 

Userlevel 2
Badge +17
Yes, I'm still not getting output for the 2nd workbench... from (FFS to shape). I think it does have something to do with multi geometry aggregates in WFS... because I get the following warning during translation:

 

 

Dropping heterogeneous aggregate feature for the ESRISHAPE Writer, due to feature type allowed geometries restriction

 

 

And when I tried a geometrycoercer to coerce the FFS to fme_polygon, I got the following:

 

 

Cannot coerce from Multiple Geometry to fme_polygon

 

 

 

 

Hi @fmenco

 

Try adding a GeometryFilter with the option Homogenize Collections set to Yes. This will split aggregates by geometry type as well. So if you have an mixed aggregate of lines and polygons, the output will be an aggregate of lines and an aggregate of polygons, each through the respective geometry port. This is perfect for writing to Esri GDB or Shape.

 

Badge

@redgeographics @DaveAtSafe @nielsgerrits

Hi everyone, ..Sorry, I was really busy, so I didn't have time to respond...Yes the deaggregator helped, I was able to create a shapefile with output. I'm also going to try the GeometryFilter to see if there are differences in output. But I've also realized that I don't need a shapefile to get my ultimate output... I've just been using the FFS for my other conversions/analyses etc...:-)

Thanks again, everyone, for your input..:-)

Userlevel 5
Badge +26

@redgeographics @DaveAtSafe @nielsgerrits

Hi everyone, ..Sorry, I was really busy, so I didn't have time to respond...Yes the deaggregator helped, I was able to create a shapefile with output. I'm also going to try the GeometryFilter to see if there are differences in output. But I've also realized that I don't need a shapefile to get my ultimate output... I've just been using the FFS for my other conversions/analyses etc...:-)

Thanks again, everyone, for your input..:-)

I'd recommend not using Shapefile as an intermediate format unless you know your final output is going to be Shapefile too (and even then...), it introduces so many limitations and especially when it comes to BAG XML data, with its many long attribute names it's just a major hassle to deal with.

 

 

Reply