European Commission logo
INSPIRE Community Forum

HB and SD geospatial reference units

I am looking at species distribution and habitats in the marine environment. One of the considerations is the geospatial reference unit used for reporting. I am not familiar with the HB and SD specifications so had a little read.... It would seem I can associate, for example, a species distribution with any geographic reference, be this a polygon or grid. This all seems very good and makes perfect sense where the polygon has particular meaning such as a Sea Region or a polygon defined in AU or AM. The question I have are there any examples of where this association between a SD/HB and reference polygon such as a SR or AM has been done in an explicit way, or is it simply been the practice to replicate the SR/AM/AU spatial object in the SD/HB dataset?

  • Stefania MORRONE

    By Stefania MORRONE

    Hi Keiran,

    both in the HB and the SD case, you can use the "spatialObject" association to reference another spatial object defining the spatial extent of your distribution unit. You can choose even how to provide, I mean as external link - i.e."href"- or embedded description i.e. replicate the SR/AM/AU spatial object in the SD/HB dataset.

    Using the 'external link' encoding option, you can provide the PID of the referenced object e.g. the GetFeature request to the WFS service exposing the feature you need.

    For example, you can encode the request for an Administrative Unit as

    <sd:spatialObject  xlink:href=">

    Hope this helps


  • Stefania MORRONE

    By Stefania MORRONE

    You may find it interesting having a look at this post


  • Keiran MILLARD

    By Keiran MILLARD

    Thanks Stefania - this is a very helpful reply.

  • Iurie MAXIM

    Hi Keiran and Stefania,

    It seems that currently it is not enough to provide only the links to the spatial objects (trough a WFS request) simply because currently there is no WFS server that resolves remote/external links (even if this is part of the WFS 2.0 strandard). Currently WFS servers are resolving only internal links.

    To better understand, only links that are pointing to objects that are served within the GML can be resolved by making a WFS request with the parameter RESOLVEDEPTH=1 or 2, 3 ... 

    Curremtly as far as I know, no WFS server is conformant to the optional conformancy class "Remote Resolve":

    Geoserver is not resolving remote links, but only local:

    Same for SnowflakeSoftware:

    If anyone knows a WFS server that implemented remote resolve, please share this information. As far as I know neither Deegree, 52North, ArcGIS for INSIRE or FME from SAFE are not resolving remote links.

    Probably in the future the WFS servers will be able to resolve links that are pointing to objects that are not part of that GML, but it seems that this is not to easy to be implemented as far as I think that till now at least one server would implemented this functionality. The dificulty seems to be related to the fact that the GML from remote links should be firstly retrieved by the WFS server and then inserted in the output GML.

    To be clear, remote/external links are starting with "http://&quot; or "https://&quot;. Internal links are starting with # (e.g. href="#mygmlid")..

    Therefore with the actual technology the only ways to deal with such data are either:
    - to provide the geometry for each object in GML (this will create huge objects) or 
    - to provide the geometry only once within the GML and to make internal links for each object that will point to the spatial object.

    However I am not sure if the EC validator will be able (in the future) to resolve those internal links by using the RESOLVEDEPTH parameter in the request, so there is a risk that such implementations with local resolve will not pass the tests.

    To better understand the second option, for example if a data provider intend to provide in INSPIRE the distribution of species based on the provisions of the reporting according to article 17 of Habitats Directive, than the geometry of the 10x10 km grid can be served by the WFS for each species and for each species distribution to have internal links that are pointing to those grid cells. Beeing internal links the WFS server will be able to resolve them.

    Probably some tricks will be necessary to make that GML valid as the objects will not have geometry, but only links. We can remember the thread about protected sites that have no geometry but are still valid due to a work around.

    As Stefania pointed to those links based on strored querries, here are some short URLS for administrative regions made by using re-writing rules:
    Short URL links can be seen at the end of each GML and it is possible to see all the links by going to upper or lower levels (of administrative regions). The example provided by Stefania (that is coming from our National Agency for Cadstre and Land Registration where we loaded stored queries) is not including the upper and lower levels administrative units, that are necessary to understand the remote xlinks and that currently there is no choice to resolve them.

    So, as I explained, currently the WFS servers are not able to resolve such external links. When they will be able to resolve such external links when using the RESOLVEDEPTH=1 parameter within a WFS request, than the GML that will be provided by that WFS server will provide as well all the upper and lower level administrative units with their gemetry and all the other elements.

    In conclusion, until the WFS servers will be able to resolve such remote/external links, this option should not be used or should be used with care by knowing this fact.

    Best regards,
    Iurie Maxim

  • Ilkka RINNE

    Hi Iurie,

    Maybe I'm missing something here, but why would the WFS server have to resolve the external (xlink) references? The resolve external references conformance class in optional in WFS 2.0.0 specification, and there are no requirements in the INSPIRE Download Service TG (or IR) to implement this of INSPIRE WFS services. The client applications using the WFS service can resolve these references if they need to.



  • Iurie MAXIM

    Hi Ilkka,

    To understand, the GML will be missing the geometries. Instead of the geometries, the xlinks to the URL of each grid cell will be provided.

    The WFS should resolve the xlinks if the users would like to view the geometry of the species/habitats distribution.
    Otherwise if not resolved, if the GML provided by the WFS or downwloaded from ATOM will be opened în a GIS application (I.e qGIS) will have no geometries, so will not be displayed, therefore will not be usable. It will be only a file for transporting information.
    Indeed the spatialdata will be conformant but not usable, unless the user will invest some tme to join some data from different data source and will know how to do it.
    I expect that we are not serving conformant data but that can be used only by very technical people.
    Of course a problem will be as well to create view services if using the data server by WFS.


  • Ilkka RINNE

    Ok, I did not notice that the spatialObject property would be an alternative to the geometry property. In that case, I would agree, that providing the geometries only using the remote references is probably making things difficult for the users.

  • Stefania MORRONE

    By Stefania MORRONE

    It seems that the QGIS ‘GML Application Schema toolbox’ (the plugin works with upcoming QGISv3.0+ ) is able to resolve xlinks to external spatial objects and embed content / add new layer with retrieved object /add retrieved object to current layer. Verry interesting! Has anyone already tested release candidate?

    You may find it useful to have a look a these two posts:


    The picture below is taken from presentation at FOSS4G 2017

  • Keiran MILLARD

    By Keiran MILLARD

    There is also a related to discussion to this topic on the EF cluster...

Biodiversity & Area Management

Biodiversity & Area Management

If themes like Protected Sites, Area Management/Restriction/Regulation Zones and Reporting Units, Habitats and Biotopes, Species Distribution, Bio-geographical Regions matters to you, join these groups!