INSPIRE Thematic Clusters

  • Discussion
  • Land Cover
  • Land Cover GML files not correctly displayed in GIS environment: a matter of mapping

Land Cover GML files not correctly displayed in GIS environment: a matter of mapping

1217 Views

Land Cover GML files not correctly displayed in GIS environment: a matter of mapping

Started by Stefania MORRONE Replies (6)

In the framework of the eENVplus EU project we are addressing the issue of ‘true’ (i.e. beyond formal conformance) usability of the GML data.

Hoping our experience could be of help, we would like to share the following considerations related to Land Cover GML datasets. We mapped our source data (shapefile /PostGis tables) to GML using HALE, but same methodology can be applied using other transformation tools.

As can be seen in figure below illustrating target schema structure in HALE workbench, when mapping the member attribute of the LandCoverDataset feature type, we are given the possibility to choose if we want to

  1. address the LandCoverUnit feature type instances by reference, using xlink:href 
  2. embedd the LandCoverUnits mapping within the member attribute itself

HALE: target schema tab

Despite the encodings being both formally correct, second choice causes the GML file not to be correctly displayed by GIS tools (for example QGIS is not able to display any LandCoverUnit element, Gaia displays the LandcoverUnit polygons in the map but cannot address single unit’s info ...)

Conversely the ‘LandcoverUnit’ elements are properly displayed and addressed in the GIS maps if we choose object reference encoding.

Find below snippets of the GML files produced by HALE in different cases:

 Case 1: address by reference

  <gml:featureMember>

<lcv:LandCoverDataset >

<lcv:member xlink:href="#LandCoverUnitID"></lcv:member>

 </lcv:LandCoverDataset>

 </gml:featureMember>

<gml:featureMember>

       <lcv:LandCoverUnit gml:id=" LandCoverUnitID "></lcv:LandCoverUnit>

  </gml:featureMember>

 

Case 2: embedded mapping

 <gml:featureMember>

<lcv:LandCoverDataset >

<lcv:member>

<lcv:LandCoverUnit>

</lcv:LandCoverUnit>

</lcv:member>

</lcv:LandCoverDataset>

  </gml:featureMember>

 

Note:

For a practical example on how to use the object referencing in GML datasets, you may refer to the video tutorial ‘How to manage object referencing according to INSPIRE Generic Network model on Epsilon Italia You Tube channel playlist INSPIRE_in_pills.

 

Replies

    • Public

    By Jürgen WEICHAND

    Dear Stefania,

    QGIS is using the GDAL/OGR GML driver to load the GML file. The GML driver has some „hidden“ config options like „convert GML attributes to fields“ or „resolve elements“ .

     

    I made a simple QGIS Plugin for further testing.  
    http://plugins.qgis.org/plugins/gmlloader/

    1. Install the Plugin "GML Loader" using the QGIS Plugin Manager. Be sure to enable ,,display Experimental Plugins" first. You will find the plugin under ,,Vector / GML Loader".

    2. Open your GML-File.

    For more detailed information please refer to: https://themes.jrc.ec.europa.eu/file/view/24142/oi-result-in-qgis

    UPDATE
    Sorry I didn't understand the problem correctly. Can you provide example datasets for further testing (especially one with the embedded members)?

    Best regards
    Jürgen

     

    • Public

    By Stefania MORRONE

    Hi Jürgen,

    sorry for my late reply.

    The meaning of my previous post was something like:

     “if you are transforming a Land Cover dataset according to INSPIRE LC schema, be aware that, despite both mapping choices available for land cover units (embedded vs referenced) lead to a valid GML file, a profitable use of your GML in GIS environment is currently possible only with referenced encoding choice”

    I am providing following examples of the different encodings :

    1. embeddedLandCoverUnits_example.gml produced in the framework of eENVplus EU project (file has been downloaded from WFS service)
    2. referencedLandCoverUnits_example.gml produced in the framework of LIFE+IMAGINE EU project

    After your post, I have installed the GML_Loader plugin in QGIS v2.8.2 Wien.

    Here’s what I experience when I load the referencedLandCoverUnits_example.gml file by means of the GML_loader plugin:

    1. I am no more able to display the LandCoverDataset layer correctly (conversely everything works fine again if I uninstall the plugin)
    2. The href elements are not resolved even though the “resolve element (xlink:href)” in pop up window  is checked  (e.g. I am still not able to see the class of the LandCoverUnit)

    Maybe I’m not using the plugin correctly? I would very much appreciate if you make a test using the provided file.

    Thank you

    • Public

    By Lena Hallin-Pihlatie

    Hi Stefania,

    Thank you for raising this issue and for providing the examples. It is good to raise awareness about the encoding alternatives and about the challenges with present software, both to help others making decisions about mappings and so that the present problems can be identified and solved.

    I'm not sure you got any answer from Jürgen to your last queston. But based on your experiences so far, do you consider it best practise to do the mapping as in the referencedLandCoverUnits_example? If yes, is this due to present software restrictions or also because of other reasons?

    Based on your experiences I would also encourage you to contribute to the following discussion topics:

    https://themes.jrc.ec.europa.eu/discussion/view/48703/the-association-role-%E2%80%99member%E2%80%99-in-land-cover-and-land-use

    https://themes.jrc.ec.europa.eu/discussion/view/43639/associating-landcoverunit-instances-to-their-parent-landcoverdataset-instances-for-wfs-filtering

    Thank you in advance,

    Lena

     

    • Public

    By Stefania MORRONE

    Hi Lena,

    in my opinion the use of the xlink encoding in the mapping of the dataset members can be considered as a best practise, since currently it is the only encoding allowing the GML user to select a single land cover unit in a GIS map and to access relevant information.

    As far as I could experience, currently available GIS software is not able to handle the nested structures of the GML encoding (features embedded in other features) efficiently.


    I take this opportunity to highlight a problem related to the usability of GML files in QGIS environment, which, though not specific to Land Cover theme, is particularly significant in the case of a Land Cover data set. I am referring to the inability of QGIS to  display in the attribute table those GML attributes whose value type is ‘xlink'.

    In the case of a Land Cover data set, this issue prevents the user who selects a land cover unit in the map from accessing the information related to the land cover class of the selected unit !

    This issue is not relevant to other tools, such as Gaia and Snowflake GML Viewer, which conversely are able to display xlink attributes correctly. It’s a task for QGIS developers!

     

    • Public

    By Jürgen WEICHAND

    Hi Stefania,

    thank you for your valuable feedback!

    I've released a new (experimental) QGIS Plugin called "Complex GML Info" some days ago, with a different approach. This plugin is able to show the properties of the feature as hierarchical tree. Also the xlink:href references will be solved.

    Pros

    • the nested structure of the GML will be displayed as tree (the attached screenshot is showing your "referenced" example)
    • xlink:href references will be solved

    Cons

    • still a prototype
      • weak performance on GML files > 5 MB
      • currently only local references are supported
      • currently the geometry of referenced features won't be displayed
      • codelists are not supported yet

     

    Usage

    1.     Install the plugin using the QGIS Plugin Manager. Be sure to enable "display experimental plugins" first.
    2.     Load a GML file (no additional plugin or .gfs required).
    3.     Select on or more features using the default selection tool. They will be highlighted yellow.
    4.     Click on the QGIS Complex GML Info icon  button.

     

    Best regards
    Jürgen

    • Public

    By Stefania MORRONE

    Hi jurgen,

    I've tried your "Complex GML Info" plugin and I think it's a good step forward in making the GML user's life easier ! 

    I'll keep on using/testing in my daily working activities.

    In terms of usability of GML in GIS environment, it would really be a turning point if the displayed attributes could be saved in the attribute table (and thus be available for an eventual "save as"  shapefile  ..).

    Hope I could hear about this soon ...

    Thank you

    Stefania