European Commission logo
INSPIRE Community Forum

GeoServer Configurations for INSPIRE Themes

Dear all, for those of you working on providing INSPIRE data via GeoServer App Schema mapping, I've put up the configurations for various themes we've been working on in the API4INSPIRE Project. At present we provide DB configuration and mapping files for the following INSPIRE Themes: * Hydrography Networks * Transport Networks - Water * Area management/restriction/regulation zones and reporting units * Statistical Units - Vector While our main concern within API4INSPIRE pertains to the evaluation of OGC API - Features and OGC SensorThings API, GeoServer allows us to provide OGC API - Features utilizing the same App Schema configuration as is also used for WFS2. Thus these configurations allow you to provide both endpoint types. Here's the overview of our preconfigured GeoServer Black Boxes: https://datacoveeu.github.io/API4INSPIRE/ogc-api/GS-Config.html Additional information on the API4INSPIRE project available at: https://datacoveeu.github.io/API4INSPIRE Have fun! :) Kathi

  • Johanna Ott

    Hi Kathi,

    Thanks a lot for these examples! I have a question related to the App schema mapping that I cannot find in the examples: How can I create multiple instances of a complex attribute? I am currently trying with OM_Observation.parameter. According to the hale studio AppSchema plugin, the mapping should look like this:

    <AttributeMapping>
          <targetAttribute>om:parameter/om:NamedValue/om:name</targetAttribute>
          <encodeIfEmpty>true</encodeIfEmpty>
          <ClientProperty>
              <name>xlink:href</name>
              <value>'relatedMonitoringFeature'</value>
         </ClientProperty>
    </AttributeMapping>
    <AttributeMapping>
           <targetAttribute>om:parameter/om:NamedValue/om:value</targetAttribute>
            <sourceExpression>
                     <OCQL>strConcat('http://serviceURIgetFeature_EnvironmentalMonitoringFacility_&#39;, locality_code)</OCQL>
             </sourceExpression>
    </AttributeMapping>
    <AttributeMapping>
            <targetAttribute>om:parameter[1]/om:NamedValue/om:name</targetAttribute>
            <encodeIfEmpty>true</encodeIfEmpty>
            <ClientProperty>
                  <name>xlink:href</name>
                  <value>'uncertainty'</value>
            </ClientProperty>
    </AttributeMapping>
    <AttributeMapping>
             <targetAttribute>om:parameter[1]/om:NamedValue/om:value</targetAttribute>
             <sourceExpression>
                     <OCQL>uncertainty</OCQL>
             </sourceExpression>
    </AttributeMapping>

     

    But when I use it in Geoserver only one parameter element with one of the values is returned.

  • Katharina SCHLEIDT

    By Katharina SCHLEIDT

    Hi Johanna,

    one example is the use of multiple relatedParty dataTypes in AM (reason I've added stuff for base2).

    At the moment, you can see it at the following endpoint (will probably go down or change soon as I reconfigure other bits):

    http://service.datacove.eu/geoserver/am/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=am%3AManagementRestrictionOrRegulationZone&outputFormat=gml32&maxFeatures=50

    :)

    Kathi

  • Johanna Ott

    Hi Kathi,

    Thank you for the hint - I would still say it is slightly different as it is reading data from a different source type (bs2_contact).

    What I want to do, is simply assign fixed values as names for two instances of 'parameter' and use values from two different source fields (of the same featureType though).

     

    All the best

    Johanna

  • Katharina SCHLEIDT

    By Katharina SCHLEIDT

    Hi Johanna,

    While I've never tried, it should be possible to do this via the array indexes in the xpath

    If it does work - please report this back!

    :)

    Kathi

  • Johanna Ott

    That is also what I expected due to the output of the appschema plugin. Unfortunately it does not. As mentioned above, only one of the parameter elements is returned by the service:

    [...]

    <om:procedure xlink:href="URL_WFS_GetFeatureById_Process_103"/>
    <om:parameter>
            <om:NamedValue>
                   <om:name xlink:href="uncertainty"/>
                   <om:value>http://serviceURIgetFeature_EnvironmentalMonitoringFacility_DEZ0001</om:value&gt;
             </om:NamedValue>
    </om:parameter>
    <om:observedProperty xlink:href="https://www.bfs.de/EN/topics/ion/environment/air-soil/odl/odl_node.html&quot; xlink:title="gamma dose rate"/>

    [...]

     

  • Katharina SCHLEIDT

    By Katharina SCHLEIDT

    Could you provide the <AttributeMapping> for name and value (both - should be 4 total)

  • Johanna Ott

    Hi Kathi,

    you can find them in my post from yesterday, 1.25 pm.

     

    Thanks and all the best

    Johanna

  • Katharina SCHLEIDT

    By Katharina SCHLEIDT

    Hi Johanna,

    think I've found your issue - you need to specify the array for both entries. In the example you posted above, the first pair of mappings is without array index, you only specify this on the 2nd one. What happens when you explicitly map to [1] and [2]?

    A further question, I noticed that in the 2nd parameter entry, you're providing data quality information. What's the rational for not using the resultQuality attribute and the DQ_Element type?

    :)

    Kathi

     

     

  • Johanna Ott

    Hi Kathi,

    Looks like that did the trick - thanks a lot for your help!

    As the quality information is not yet properly filled in the source database, we decided to go with the third option described in D2.9 ("A third option not to trigger the machinery of ISO 19157 in simple usecases is to store quality related information in the ‘Parameter’ attribute.") until there is data available and the data provider can decide which DQ_Element to use.

     

    All the best

    Johanna

  • Katharina SCHLEIDT

    By Katharina SCHLEIDT

    Dear all,

    an update on the main topic of this thread, we've now added configs for the following:

    • Physical Waters: Watercourse
    • Natural Risk Zones: HazardArea

    Available together with the other configs described above at https://datacoveeu.github.io/API4INSPIRE/ogc-api/GS-Config.html

    Hope this helps!

    :)

    Kathi