SOS Profiling

Profiling means that you can define the default behaviour of the SOS. For example, the default responseFormat if it is not requested or if the featureOfInterests should be encoded in the observations or only referenced.

Currently, the SOS profiling definition is based on a XML file but in the future the definition and activation should be possible via the admin interface.


The XML schema describes how a profile XML file should be structured and which elements are required or optional.

In the schema you can find the <documentation> elments which describes the meaning of the defined element.
    1	<schema xmlns:profile="" xmlns="" xmlns:xsi="" xsi:schemaLocation="" targetNamespace="" elementFormDefault="qualified" attributeFormDefault="unqualified">
    2	    <element name="SosProfile" type="profile:SosProfileType">
    3	        <annotation>
    4	            <documentation>Profile for the 52&#176;North Sensor Observation Service</documentation>
    5	        </annotation>
    6	    </element>
    7	    <complexType name="SosProfileType">
    8	        <sequence>
    9	            <element name="identifier" type="string" nillable="false">
   10	                <annotation>
   11	                    <documentation>Identifier for the profile, if duplicated profiles will be overwritten.</documentation>
   12	                </annotation>
   13	            </element>
   14	            <element name="activeProfile" type="boolean" default="false">
   15	                <annotation>
   16	                    <documentation>Indicator if the profile is the default one. If more than one profile is defined as default, active profile will be overwritten. Default is 'false'.</documentation>
   17	                </annotation>
   18	            </element>
   19	            <element name="observationResponseFormat" type="anyURI" nillable="false" default="">
   20	                <annotation>
   21	                    <documentation>Default responseFormat for observations. Default is ''.</documentation>
   22	                </annotation>
   23	            </element>
   24	            <element name="encodeFeatureOfInterestInObservations" type="boolean" default="true">
   25	                <annotation>
   26	                    <documentation>Indicator if features of interest should be encoded in observation. Default is 'true'.</documentation>
   27	                </annotation>
   28	            </element>
   29	            <element name="encodingNamespaceForFeatureOfInterestEncoding" type="anyURI" minOccurs="0">
   30	                <annotation>
   31	                    <documentation>Namespace definition for feature of interest. If set, the features of interest are encoded in this namespace.</documentation>
   32	                </annotation>
   33	            </element>
   34	            <element name="showMetadataOfEmptyObservations" type="boolean" default="false">
   35	                <annotation>
   36	                    <documentation>Indicator for showing the metadata of an empty observation. Default is 'false'.</documentation>
   37	                </annotation>
   38	            </element>
   39	            <element name="listFeatureOfInterestsInOfferings" type="boolean" default="true">
   40	                <annotation>
   41	                    <documentation>Indicator for listing the feature of interest in the offerings of the Capabilities contents section. Default is 'true'.</documentation>
   42	                </annotation>
   43	            </element>
   44	            <element name="encodeChildProcedureDescriptions" type="boolean" default="false">
   45	                <annotation>
   46	                    <documentation>Indicator for encoding the child procedure description in a DescribeSensor response. Default is 'false'.</documentation>
   47	                </annotation>
   48	            </element>
   49	            <element name="showFullOperationsMetadata" type="boolean" default="true">
   50	                <annotation>
   51	                    <documentation>Indicator for showing full operations metadata in Capabilities. Default is 'true'.</documentation>
   52	                </annotation>
   53	            </element>
   54	            <element name="showFullOperationsMetadataForObservations" type="boolean" default="true">
   55	                <annotation>
   56	                    <documentation>Indicator for showing full GetObservation operation metadata in Capabilities. Default is 'true'.</documentation>
   57	                </annotation>
   58	            </element>
   59	            <element name="allowSubsettingForSOS20OM20" type="boolean" default="false">
   60	                <annotation>
   61	                    <documentation>Indicator to allow subsetting of observation for SOS 2.0 and Observation and Measurement 2.0 encoded observations. Default is 'false'.</documentation>
   62	                </annotation>
   63	            </element>
   64	            <element name="mergeValues" type="boolean" default="false">
   65	                <annotation>
   66	                    <documentation>Indicator to merge of observations of a GetObservation response. Default is 'false'.</documentation>
   67	                </annotation>
   68	            </element>
   69	            <element ref="profile:NoDataPlaceholder">
   70	                <annotation>
   71	                    <documentation>Definition of placeholder for no data values.</documentation>
   72	                </annotation>
   73	            </element>
   74	            <element name="returnLatestValueIfTemporalFilterIsMissingInGetObservation" type="boolean" default="false">
   75	                <annotation>
   76	                    <documentation>Indicator for returning the latest observations if the temporal filter is missing in GetObservation. Default is 'false'.</documentation>
   77	                </annotation>
   78	            </element>
   79	            <element ref="profile:EncodeProcedure" minOccurs="0" maxOccurs="unbounded">
   80	                <annotation>
   81	                    <documentation>Definition for procedure encoding in observations. Can be defined dependent on namespace.</documentation>
   82	                </annotation>
   83	            </element>
   84	            <element ref="profile:DefaultObservationTypesForEncoding" minOccurs="0" maxOccurs="unbounded">
   85	                <annotation>
   86	                    <documentation>Define the default observation types for observationencoding. If the responseFormat differs from inserted.</documentation>
   87	                </annotation>
   88	            </element>
   89	        </sequence>
   90	    </complexType>
   91	    <element name="NoDataPlaceholder">
   92	        <annotation>
   93	            <documentation>Definition of placeholder for no data values. One for response and multiple for insertion</documentation>
   94	        </annotation>
   95	        <complexType>
   96	            <sequence>
   97	                <element name="responsePlaceholder" type="string" nillable="false" default="noData">
   98	                    <annotation>
   99	                        <documentation>Definition of the placeholder for not existing values in the responses.</documentation>
  100	                    </annotation>
  101	                </element>
  102	                <element name="placeholder" type="string" nillable="false" minOccurs="0" maxOccurs="unbounded">
  103	                    <annotation>
  104	                        <documentation>Definition of placeholders for no data.</documentation>
  105	                    </annotation>
  106	                </element>
  107	            </sequence>
  108	        </complexType>
  109	    </element>
  110	    <element name="EncodeProcedure">
  111	        <annotation>
  112	            <documentation>Definition for procedure encoding in observations. Can be defined dependent on namespace.</documentation>
  113	        </annotation>
  114	        <complexType>
  115	            <sequence>
  116	                <element name="namespace" type="anyURI" nillable="false">
  117	                    <annotation>
  118	                        <documentation>Namespace for which the procedure should be encoded or not</documentation>
  119	                    </annotation>
  120	                </element>
  121	                <element name="encode" type="boolean" default="true">
  122	                    <annotation>
  123	                        <documentation>Indicator for encoding the procedure. Default is 'true'.</documentation>
  124	                    </annotation>
  125	                </element>
  126	            </sequence>
  127	        </complexType>
  128	    </element>
  129	    <element name="DefaultObservationTypesForEncoding">
  130	        <annotation>
  131	            <documentation>Define the default observation types for observation encoding. If the responseFormat differs from inserted.</documentation>
  132	        </annotation>
  133	        <complexType>
  134	            <sequence>
  135	                <element name="namespace" type="anyURI" nillable="false">
  136	                    <annotation>
  137	                        <documentation>TBD</documentation>
  138	                    </annotation>
  139	                </element>
  140	                <element name="observationType" type="anyURI" nillable="false">
  141	                    <annotation>
  142	                        <documentation>TBD</documentation>
  143	                    </annotation>
  144	                </element>
  145	            </sequence>
  146	        </complexType>
  147	    </element>
  148	</schema>

Activating a profile

Up version 4.3.x

Due to the use of XML files to define a profile it is necessary to modify the files and reload the SOS instance to activate another profile.

The profile XML files can be found in [TOMCAT_HOME]\webapps\[SOS_NAME]\WEB-INF\classes\profiles.

To activate another profile do the following steps:
  • Open the profile file you want to activate in an editor
  • Change <profile:activeProfile> to true and save changes.
  • Open the former active profile in an editor
  • Change <profile:activeProfile> to false and save changes.
  • Reload the SOS instance.

From version 4.4.x

From version 4.4.x it is possible to activate the profile via the admin interface and a reload the SOS instance is no longer necessary.
  • Go to Admin -> Settings -> Profiles
  • Select the profile in the drop-down list
  • Presss activate

Available profiles

Currently, the SOS provides two profiles, the default profile and the hydrology profile.

Default profile

With this profile, the SOS behaves as described in the OGC SOS 2.0 specification.

Here is the default-profile.xml file:
    1	<?xml version="1.0" encoding="UTF-8"?>
    2	<profile:SosProfile xmlns:profile="" xmlns="" xmlns:xsi="" xsi:schemaLocation=" sos-profile.xsd">
    3	    <profile:identifier>SOS_20_PROFILE</profile:identifier>
    4	    <profile:activeProfile>true</profile:activeProfile>
    5	    <profile:observationResponseFormat></profile:observationResponseFormat>
    6	    <profile:encodeFeatureOfInterestInObservations>false</profile:encodeFeatureOfInterestInObservations>
    7	    <profile:encodingNamespaceForFeatureOfInterestEncoding></profile:encodingNamespaceForFeatureOfInterestEncoding>
    8	    <profile:showMetadataOfEmptyObservations>false</profile:showMetadataOfEmptyObservations>
    9	    <profile:listFeatureOfInterestsInOfferings>true</profile:listFeatureOfInterestsInOfferings>
   10	    <profile:encodeChildProcedureDescriptions>false</profile:encodeChildProcedureDescriptions>
   11	    <profile:showFullOperationsMetadata>true</profile:showFullOperationsMetadata>
   12	    <profile:showFullOperationsMetadataForObservations>true</profile:showFullOperationsMetadataForObservations>
   13	    <profile:allowSubsettingForSOS20OM20>false</profile:allowSubsettingForSOS20OM20>
   14	    <profile:mergeValues>false</profile:mergeValues>
   15	    <profile:NoDataPlaceholder>
   16	        <profile:responsePlaceholder>noData</profile:responsePlaceholder>
   17	        <profile:placeholder>noData</profile:placeholder>
   18	    </profile:NoDataPlaceholder>
   19	    <profile:returnLatestValueIfTemporalFilterIsMissingInGetObservation>false</profile:returnLatestValueIfTemporalFilterIsMissingInGetObservation>
   20	</profile:SosProfile>

Hydrology profile

With this profile, the SOS behaves as described in the OGC Sensor Observation Service 2.0 Hydrology Profile.

The main differences to the default profiles are:

Here is the hydrology-profile.xml file:
    1	<profile:SosProfile xmlns:profile="" xmlns="" xmlns:xsi="" xsi:schemaLocation=" sos-profile.xsd">
    2	    <!-- 
    3	        NOTE: If you use this Hydrology-Profile with the old concept (not the series concept) and without the SOS 
    4	        transactional profile the ObservationConstellation and ObservationType tables and mapping files are required to work!
    5	        You can find the ObservationConstellation and ObservationType tables in the 
    6	        [TOMCAT_HOME]\webapps\52n-sos-webapp\WEB-INF\classes\mapping\transactional folder of the deployed SOS.
    7	    -->
    8	    <profile:identifier>hydrology</profile:identifier>
    9	    <profile:activeProfile>false</profile:activeProfile>
   10	    <profile:observationResponseFormat></profile:observationResponseFormat>
   11	    <profile:encodeFeatureOfInterestInObservations>false</profile:encodeFeatureOfInterestInObservations>
   12	    <profile:encodingNamespaceForFeatureOfInterestEncoding></profile:encodingNamespaceForFeatureOfInterestEncoding>
   13	    <profile:showMetadataOfEmptyObservations>true</profile:showMetadataOfEmptyObservations>
   14	    <profile:listFeatureOfInterestsInOfferings>false</profile:listFeatureOfInterestsInOfferings>
   15	    <profile:encodeChildProcedureDescriptions>false</profile:encodeChildProcedureDescriptions>
   16	    <profile:showFullOperationsMetadata>true</profile:showFullOperationsMetadata>
   17	    <profile:showFullOperationsMetadataForObservations>true</profile:showFullOperationsMetadataForObservations>
   18	    <profile:allowSubsettingForSOS20OM20>true</profile:allowSubsettingForSOS20OM20>
   19	    <profile:mergeValues>true</profile:mergeValues>
   20	    <profile:NoDataPlaceholder>
   21	        <profile:responsePlaceholder>noData</profile:responsePlaceholder>
   22	        <profile:placeholder>noData</profile:placeholder>
   23	    </profile:NoDataPlaceholder>
   24	    <profile:returnLatestValueIfTemporalFilterIsMissingInGetObservation>true</profile:returnLatestValueIfTemporalFilterIsMissingInGetObservation>
   25	    <profile:EncodeProcedure>
   26	        <profile:namespace></profile:namespace>
   27	        <profile:encode>true</profile:encode>
   28	    </profile:EncodeProcedure>
   29	    <profile:DefaultObservationTypesForEncoding>
   30	        <profile:namespace></profile:namespace>
   31	        <profile:observationType></profile:observationType>
   32	    </profile:DefaultObservationTypesForEncoding>
   33	</profile:SosProfile>
Topic revision: r4 - 02 Jul 2016 08:03:39, CarstenHollmann
This site is powered by FoswikiCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback