2

I am struggling with the DescribeFeatureType query with WFS KVP encoding.

I have this WFS: https://inspire-wfs.maanmittauslaitos.fi/inspire-wfs/au?request=GetCapabilities&service=wfs&version=2.0.0 and I can see in the GetCapabilities that there is a FeatureType called au:AdministrativeUnit.

I could of course use DescribeFeatureType to give me the description of all Feature Types of the service, but I would like to use &typeName=XXXX in the kvp to choose only this FeatureType au:AdministrativeUnit

So I basically do the following request: https://inspire-wfs.maanmittauslaitos.fi/inspire-wfs/au?&request=DescribeFeatureType&service=WFS&version=2.0.0&typeName=au:AdministrativeUnit

But the result is not filtering at all to give me only the Feature Type with the name au:AdministrativeUnit.

I saw that in the OGC specifications, there is sometimes written typename or typenames. I tried both of them with changing the version and I don´t get it!

Am I missing something important here?

With an other WFS, I can do the query with filtering typenames without issue!

  • If you analyze the schema inspire.ec.europa.eu/schemas/au/4.0/AdministrativeUnits.xsd you should see that au:AdministrativeUnit contains also ResidenceOfAuthority, Condominium, and AdministrativeBoundary. Inspire data are modelled as GML application schema data and structures are much more complex than with simple feature feature types. – user30184 Apr 9 '18 at 19:36
  • Thanks @user30184. So I can not only to the describe feature type request on au:AdministrativeUnit? One more question: I can see in the describe feature mentionned above that there is also a feature type called AdministrativeUnitPropertyType. But I can not find anywhere in the GetCapabilities the same feature type AdministrativeUnitProperty! – Floni Apr 10 '18 at 8:18
3

I saw that in the OGC specifications, there is sometimes written typename or typenames.

It is strictly speaking typenames for a version 2.n and typename for a version 1.n request, similarly it should always WFS for a service request (i.e. it should be capitals) like service=WFS& and for version negotiation in a GetCapabilities request it should be acceptversions=2.0.0, 1.1.0, ...& for a version 2.n and version=1.1.0& for versions of WFS before 2, or version can be omitted.

I would like to use &typeName=XXXX in the kvp

And for completeness the syntax for the KVP is name[=value]& where =value is optional, and the pair ends with an &. Where name is not case sensitive, but value is always, case sensitive.

That's what it says in the specification documents, but some software doesn't adhere to this, or is lax when it comes to case sensitivity, and gives feature types if you give typename instead of typenames.

So this should work:

https://inspire-wfs.maanmittauslaitos.fi/inspire-wfs/au?request=GetCapabilities&service=WFS&

and this:

https://inspire-wfs.maanmittauslaitos.fi/inspire-wfs/au?request=GetCapabilities&service=WFS&acceptversions=2.0.0,1.1.0&

and this:

https://inspire-wfs.maanmittauslaitos.fi/inspire-wfs/au?request=GetCapabilities&service=WFS&version=1.1.0&

and of course:

https://inspire-wfs.maanmittauslaitos.fi/inspire-wfs/au?&request=DescribeFeatureType&service=WFS&version=2.0.0&typeNames=au:AdministrativeUnit&

but none do, so the service is not showing WFS compliance.

If we cut off the trailing & then the URL's work, but omission of the & is a client prerogative, not a server option...

So I basically do the following request: https://inspire-wfs.maanmittauslaitos.fi/inspire-wfs/au?&request=DescribeFeatureType&service=WFS&version=2.0.0&typeName=au:AdministrativeUnit

The correct request would be:

https://inspire-wfs.maanmittauslaitos.fi/inspire-wfs/au?&request=DescribeFeatureType&service=WFS&version=2.0.0&typeNames=au:AdministrativeUnit

But the result is not filtering at all to give me only the Feature Type with the name au:AdministrativeUnit.

If the response is not as expected, the server may be at error here, not your request.

  • Thanks for the help @nmtoken. So if I understand well, the issue here is from the WFS but not from the request? I will try with some others WFS to check if the same request is working. – Floni Apr 10 '18 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.