samplingGeometry 3D crs

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

samplingGeometry 3D crs

Inês Pedro
Hello :) I am trying to insert profile and trajectory data into the 52 north
SOS, which may vary in X, Y and Z (and T). As such, I thought that the
variations in space of each observation should be registered in the sampling
geometry parameter. In that way, with different locations, we would have
different observations rather than augmenting the number of series in the
SOS database, in case we would register the (X, Y, Z) parameters in the
feature of interest.

Someone has already questioned in [1] how could we insert a 3D location in
the feature of interest. I tried to use the same solution for the sampling
geometry. i.e., I defined, in the xml, the following

<om:parameter>
    <om:NamedValue>
        <om:name
xlink:href="http://www.opengis.net/def/param-name/OGC-OM/2.0/samplingGeometry"/>
        <om:value xsi:type="gml:GeometryPropertyType">
            <gml:Point gml:id="SamplingPoint">
                <gml:pos
srsName=&quot;http://www.opengis.net/def/crs/EPSG/0/&lt;b>4979*">
                    38.43 -10.7 1.0
                </gml:pos>
            </gml:Point>
        </om:value>
    </om:NamedValue>
</om:parameter>.

The InsertObservation request runs with success, but if I do
ST_AsEWKT(samplinggeometry), where samplinggeometry is the value of the
corresponding sampling geometry, I get

                                        SRID=4326;POINT(-10.7 38.43),

which means that the 3rd dimension (Z, in this case) is lost. If I run the
same command after I insert the feature of interest as in [1], I get the
correct behavior

                                               SRID=4979;POINT(x y z).

So I would like to know if it is the 52N that does not support 3D coordinate
reference systems for the samplingGeometry, or if I am doing something
wrong. Moreover, in the release notes [2], it says the following:

/
Release 52n-sensorweb-sos-4.4.1
====================================
 
  --- New features ---

      * Support for ReferencedObservation
      * *Support for insertion of profile observations via
InsertResult/Template operations*/

What do you mean exactly by support for insertion of profile observations
for result handling?

Thank you in advance!!

Inês Pedro


[1]
http://sensorweb.forum.52north.org/om-parameter-and-DataArray-Support-in-SOSv4-td4026422.html#a4026473
<http://sensorweb.forum.52north.org/om-parameter-and-DataArray-Support-in-SOSv4-td4026422.html#a4026473>  
[2]  https://github.com/52North/SOS/blob/develop/RELEASE-NOTES
<https://github.com/52North/SOS/blob/develop/RELEASE-NOTES>  



--
Sent from: http://sensorweb.forum.52north.org/
_______________________________________________
SWE mailing list
[hidden email]
https://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: samplingGeometry 3D crs

Carsten Hollmann
Hi Inês,

I have checked the behavior you described and it was a bug in the SOS
when checking the CRS of the sampling geometry with the default database
CRS.

This issue is fixed in the SS 4.4.x maintenance branch:

    https://github.com/52North/SOS/tree/maintenance/4.4

> Moreover, in the release notes [2], it says the following:
>
> /
> Release 52n-sensorweb-sos-4.4.1
> ====================================
>  
>    --- New features ---
>
>        * Support for ReferencedObservation
>        * *Support for insertion of profile observations via
> InsertResult/Template operations*/
>
> What do you mean exactly by support for insertion of profile observations
> for result handling?
This allows to insert profile observation into the SOS via the
InsertResult/Template operations.

Supported it the insertion of profiles at fixed locations with
measurements in different depth but also profiles that are measured at
different locations and different depth.

As an observation does not necessarily has a sampling geometry, for
example if the profile is measured at a fixed location, the 52N SOS
stores the depth (or height) value in the appropriate table for the
om:parameter. In the default OM_Observation response the depth value
would be encoded as om:parameter.

Attached you find an InsertResultTemplate request example for the
profile observation insertion. This example defines the samplingGeometry
and the depth as om:parameter.

Best,
Carsten

_______________________________________________
SWE mailing list
[hidden email]
https://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines

inserresult.xml (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: samplingGeometry 3D crs

Ines Pedro
Thank you for your help and for providing me an example that uses both the
samplingGeometry and om:parameter depth in an InsertResultTemplate request.

Since I am trying to insert vertical profile (X, Y, T fixed; Z variable) and
trajectory (X, Y, Z, T all variable) data to be later consulted by other
potential users, I would like to know if it is possible to perform a
vertical filtering with the GetObservation request. With that in mind, I
tried the following approaches:

(1) Store the Z (depth) variable in the *samplingGeometry* of the
observation (in conjunction with the X and Y values, for the case of
trajectory observations). With your correction, this works fine with the
InsertObservation request, in the sense that when I perform
st_asewkt(samplinggeometry), I get all X, Y, Z coordinates, but when I run
the GetObservation request with the Spatial Filtering:

<sos:spatialFilter>
    <fes:BBOX>
        <fes:ValueReference>
            http://www.opengis.net/req/omxml/2.0/data/samplingGeometry
        </fes:ValueReference>
        <gml:Envelope srsName="http://www.opengis.net/def/crs/EPSG/0/4979">
            <gml:lowerCorner>50 0 3</gml:lowerCorner>
            <gml:upperCorner>60 8 5</gml:upperCorner>
        </gml:Envelope>
    </fes:BBOX>
</sos:spatialFilter>,

the Z coordinate filter does not work properly. For example, if the
samplinggeometry of the observation is
                                             SRID=4979; POINT(7.52 52.9
2.3),
the GetObservation request will still return this observation, even though
2.3 \notin [3, 5].

If, on the other hand, I use the InsertResultTemplate and define the
samplingGeometry parameter as follows

<swe:field name="samplingGeometry">
     <swe:Vector
definition="http://www.opengis.net/def/param-name/OGC-OM/2.0/samplingGeometry"
referenceFrame="http://www.opengis.net/def/crs/EPSG/0/4979">
          <swe:coordinate name="latitude">
               <swe:Quantity definition="latitude" axisID="lat">
                    <swe:uom code="deg"/>
               </swe:Quantity>
           </swe:coordinate>
           <swe:coordinate name="longitude">
                <swe:Quantity definition="longitude" axisID="lon">
                     <swe:uom code="deg"/>
                </swe:Quantity>
            </swe:coordinate>
            <swe:coordinate name="depth">
                <swe:Quantity definition="depth" axisID="dep">
                     <swe:uom code="m"/>
                </swe:Quantity>
            </swe:coordinate>
        </swe:Vector>
    </swe:field>,

then when I perform GetResult, the value of the depth variable appears as
"NaN". Moreover, the result of the st_asewkt(samplinggeometry) query is
                                             SRID=4979;POINT(depth_value
lat_value),
which is not correct.

(2) Store the Z (depth) variable in the *om:parameter depth* of the
observation, following your example.
If my observation is of the type OM_ProfileObservation (as you defined in
the example), and I use the InsertResult/Template, for each observation
inserted, two observations are created in the SOS database - one numeric,
containing the value of the observed property and in relation with the
parameter table, which stores the depth; and another one of the type
profile. Although everything works fine in the database, when I perform a
GetResult or GetObservation request, no result nor observation,
respectively, is returned in response.

Moreover, if I try to insert the observation with the InsertObservation
request (InsertObservation_ProfileObs.xml attached), I get the following
error:
/The requested observation is invalid! The result element does not comply
with the defined type
(http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_ProfileObservation)!/

On the other hand, if my observation is of the type OM_Measurement and I
still use your result structure, when I perform GetObservation, all
parameters defined in the result template (phenomenonTime, observedProperty,
samplingGeometry containing the latitude and longitude, and om:parameter
depth) are returned. The problem here is that I cannot perform "Spatial
Filtering" by the om:parameter depth. Strangely, with the GetResult request,
I only obtain the phenomenonTime and observed property as response (I am not
sure if this is the correct behavior).


I was hoping that you could advice me on which is the best approach, and
what is missing for it to work!

Thank you for you time,
Inês Pedro
InsertObservation_ProfileObs.xml
<http://sensorweb.forum.52north.org/file/t496247/InsertObservation_ProfileObs.xml>  



--
Sent from: http://sensorweb.forum.52north.org/
_______________________________________________
SWE mailing list
[hidden email]
https://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: samplingGeometry 3D crs

Carsten Hollmann
Hi Ines,

see my answers inline.

> (1) Store the Z (depth) variable in the *samplingGeometry* of the
> observation (in conjunction with the X and Y values, for the case of
> trajectory observations). With your correction, this works fine with the
> InsertObservation request, in the sense that when I perform
> st_asewkt(samplinggeometry), I get all X, Y, Z coordinates, but when I run
> the GetObservation request with the Spatial Filtering:
>
> <sos:spatialFilter>
>      <fes:BBOX>
>          <fes:ValueReference>
>              http://www.opengis.net/req/omxml/2.0/data/samplingGeometry
>          </fes:ValueReference>
>          <gml:Envelope srsName="http://www.opengis.net/def/crs/EPSG/0/4979">
>              <gml:lowerCorner>50 0 3</gml:lowerCorner>
>              <gml:upperCorner>60 8 5</gml:upperCorner>
>          </gml:Envelope>
>      </fes:BBOX>
> </sos:spatialFilter>,
>
> the Z coordinate filter does not work properly. For example, if the
> samplinggeometry of the observation is
>                                               SRID=4979; POINT(7.52 52.9
> 2.3),
> the GetObservation request will still return this observation, even though
> 2.3 \notin [3, 5].

The 3D filtering is not yet supported by the 52N SOS.

> If, on the other hand, I use the InsertResultTemplate and define the
> samplingGeometry parameter as follows
>
> <swe:field name="samplingGeometry">
>       <swe:Vector
> definition="http://www.opengis.net/def/param-name/OGC-OM/2.0/samplingGeometry"
> referenceFrame="http://www.opengis.net/def/crs/EPSG/0/4979">
>            <swe:coordinate name="latitude">
>                 <swe:Quantity definition="latitude" axisID="lat">
>                      <swe:uom code="deg"/>
>                 </swe:Quantity>
>             </swe:coordinate>
>             <swe:coordinate name="longitude">
>                  <swe:Quantity definition="longitude" axisID="lon">
>                       <swe:uom code="deg"/>
>                  </swe:Quantity>
>              </swe:coordinate>
>              <swe:coordinate name="depth">
>                  <swe:Quantity definition="depth" axisID="dep">
>                       <swe:uom code="m"/>
>                  </swe:Quantity>
>              </swe:coordinate>
>          </swe:Vector>
>      </swe:field>,
>
> then when I perform GetResult, the value of the depth variable appears as
> "NaN". Moreover, the result of the st_asewkt(samplinggeometry) query is
>                                               SRID=4979;POINT(depth_value
> lat_value),
> which is not correct.

I have checked this and the Z-value was erroneously set to to the
Y-coordinate and not to the Z-coordinate.

> (2) Store the Z (depth) variable in the *om:parameter depth* of the
> observation, following your example.
> If my observation is of the type OM_ProfileObservation (as you defined in
> the example), and I use the InsertResult/Template, for each observation
> inserted, two observations are created in the SOS database - one numeric,
> containing the value of the observed property and in relation with the
> parameter table, which stores the depth; and another one of the type
> profile. Although everything works fine in the database, when I perform a
> GetResult or GetObservation request, no result nor observation,
> respectively, is returned in response.

I have to check this.

> Moreover, if I try to insert the observation with the InsertObservation
> request (InsertObservation_ProfileObs.xml attached), I get the following
> error:
> /The requested observation is invalid! The result element does not comply
> with the defined type
> (http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_ProfileObservation)!/

The insertion via the InsertResult operations was a requirement of a
project but there was no requirement to insert OM_ProfileObservation via
InsertObservation. Therefore, the insertion of the OM_ProfileObservation
via InsertObservation is not yet supported.

> On the other hand, if my observation is of the type OM_Measurement and I
> still use your result structure, when I perform GetObservation, all
> parameters defined in the result template (phenomenonTime, observedProperty,
> samplingGeometry containing the latitude and longitude, and om:parameter
> depth) are returned. The problem here is that I cannot perform "Spatial
> Filtering" by the om:parameter depth. Strangely, with the GetResult request,
> I only obtain the phenomenonTime and observed property as response (I am not
> sure if this is the correct behavior).

I have to check this, too.

Best,
Carsten
_______________________________________________
SWE mailing list
[hidden email]
https://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines