ThinkGeo.com    |     Documentation    |     Premium Support

WFS Version 2.0.0

Hi, I am currently working on a trial with a WFS provider but they are using version 2.0.0 and that doesn’t appear to be supported by ThinkGeo. There is a thread about versions here: WFS WfsFeatureLayer WFS server version is not determined by the layer or no way to set the version number

But that stated that you have no plans to support higher versions the 1.0.0. So I was wondering will that change in the near future?

Hi Jonathan,

We still don’t have a plan to support higher version in near future.

If you wish we support that in future, you can vote for it follow this topic:

Regards,

Ethan

Ethan,

Thank you I have added that to the enhancement tracker. Unfortunately it is not something I look at very often, so don’t think to look for and vote for suggestions I might like. Do you think it would be worth putting out an occasional reminder to users to review and vote?

Anyway back to the original problem, do you have any suggestions for how I can work within the following limitations?

  • The OS WFS is intended to work with Version 2.0.0. and includes 2 additional parameters, number of features to return and offset.
  • The maximum number of features to request is 100, so if an area has more than 100 features you have to keep requesting by incrementing the offset parameter until they return less than 100.
  • I can modify the request URI in SendingRequest but if I change the version the the response is not recognised (not really surprising). I am not sure what leaving as Version 1 and adding the parameters does for sure - but may be OK.

So are there any wfslayer events that I could override to enable mange multiple requests nicely? Or am I looking at writing a new custom layer type and handling all the communication between us and the OS WFS ourselves?

Thanks,
Jonathan

Regards,
Jonathan

Hi Jonathan,

You should make sure which steps block the process. You can watch it in the sending request event.

For WfsFeatureSource it have two events: RequestingData and RequestedData, you can also try to watch that.

When you open the layer, it will call GetColumns.

In fact I am not so familiar with WFS standard, but it looks we have these API can be overrided, you can override each of them and add break point to locate where is the problem.

CanGetBoundingBoxQuicklyCore
OpenCore
CloseCore
GetBoundingBoxCore
GetColumnsCore
GetFeaturesByIdsCore
GetFirstFeaturesWellKnownTypeCore
GetAllFeaturesCore
GetFeaturesInsideBoundingBoxCore
GetFeaturesByColumnValueCore

Wish that’s helpful.

Regards,

Ethan

Hi Ethan,

Thanks. I have been using the sending request event quite a bit, currently modify the request to append an API key and srsName.

Thanks for the list of methods, should be quite handy and helped me think through the problem. I’m still thinking we might have to do a custom layer, but might be able to do something with requesting data? I’ll experiment a bit, but do you happen to know if we can change that to do multiple requests?

Thanks,
Jonathan

Hi Jonathan,

In fact I also suggest you create a custom layer instead of override the functions.

Because WFS is a relatively simple protocol, and it looks you have further requirement based on the new 2.0.

So I think maybe create a totally new class is more simpler.

About the multiple requests, I am not sure whether the multiply tiles is what you need, you can set that in layerOverlay. I think for WFSLayer it’s not easy to implement that.

Regards,

Ethan

OK, thanks Ethan. I’ll give it a go.
Jonathan

Hi Jonathan,

Any question you can discuss with us, we will help you if we know it.

Regards,

Ethan