sos4R : expectation failed error

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

sos4R : expectation failed error

CharlesB
Hello,

I am trying to use sos4R with a simple request and I encounter th following error "expectation failed".

mySOS <- SOS(url = "http://sos.irceline.be/sos")
OBS <-getObservation(sos = mySOS, offering="81102 - PM10", eventTime = sosCreateTime(sos = mySOS, time = "2016-06-14::2016-06-15"), verbose=TRUE)
[getObservation] Requesting offering 81102 - PM10 by name.
[getObservation] Got observation(s) from offering because none given: 81102 - PM10
[.getObservation_1.0.0] to  http://sos.irceline.be/sos  with offering  81102 - PM10
[.getObservation_1.0.0] REQUEST:
 Object of class SosGetObservation:  service:  SOS , version:  1.0.0 , offering:  81102 - PM10
observered property:  81102 - PM10
responseFormat(s):  text/xml;subtype="om/1.0.0" , responseMode(s):  NA
procedure(s) NA
        feature(s) of interest  
        event time:  <S4 object of class "SosEventTime"> 
        result:  NULL
srsName:  NA
resultModel(s):  NA
[.sosRequest_1.0.0] Encoding Function (beginning of function body):  { standardGeneric("encodeRequestXML")  ... [ 0  more chrs].
[encodeRequestXML] SosGetObservation
[encodeXML] SosEventTime
[encodeXML] TM_During with GmlTimePeriod: [ GmlTimePosition [ time: 2016-06-14 ]
        --> GmlTimePosition [ time: 2016-06-15 ] ]
[.encodeTM]  TM_During
[encodeXML] GmlTimePeriod with GmlTimePeriod: [ GmlTimePosition [ time: 2016-06-14 ]
        --> GmlTimePosition [ time: 2016-06-15 ] ]
[encodeXML] GmlTimePosition with GmlTimePosition [ time: 2016-06-14 ]
[encodeXML] POSIXt with value 2016-06-14
Formatted  1465855200  to  2016-06-14T00:00:00[encodeXML] GmlTimePosition with GmlTimePosition [ time: 2016-06-15 ]
[encodeXML] POSIXt with value 2016-06-15
Formatted  1465941600  to  2016-06-15T00:00:00[.sosRequest_1.0.0] POST!
[.sosRequest_1.0.0] REQUEST:<sos:GetObservation xsi:schemaLocation="http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosAll.xsd" service="SOS" version="1.0.0" xmlns:sos="http://www.opengis.net/sos/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:om="http://www.opengis.net/om/1.0" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml">
 <sos:offering>81102 - PM10</sos:offering>
 <sos:eventTime>
  <ogc:TM_During>
   <ogc:PropertyName>om:samplingTime</ogc:PropertyName>
   <gml:TimePeriod>
    <gml:beginPosition>2016-06-14T00:00:00</gml:beginPosition>
    <gml:endPosition>2016-06-15T00:00:00</gml:endPosition>
   </gml:TimePeriod>
  </ogc:TM_During>
 </sos:eventTime>
 <sos:observedProperty>81102 - PM10</sos:observedProperty>
 <sos:responseFormat>text/xml;subtype="om/1.0.0"</sos:responseFormat>
</sos:GetObservation>
Erreur : Expectation Failed

Thanks for your help !

C. Beaugard
Reply | Threaded
Open this post in threaded view
|

Re: sos4R : expectation failed error

Daniel Nüst-2
This works for me in the current development version:

mySOS <- SOS(url = "http://sos.irceline.be/sos", binding = "KVP",
curlOptions = list(verbose = TRUE))
OBS <-getObservation(sos = mySOS, offering="81102 - PM10",
                     eventTime = sosCreateTime(sos = mySOS, time =
"2016-06-14::2016-06-15"), verbose=TRUE)


> summary(OBS)
Object of class OmObservationCollection
[[members:]] [1] 61
[[bounded by:]] [1] "urn:ogc:def:crs:EPSG::31370, 24655.0 46070.0,
266325.0 225661.0"
[[procedures:]] [1] 61
[[obs. props:]] [1] 1
[[features:]] [1] 61


Changing the binding to "KVP" did the trick. Setting the curlOptions to
verbose gave some potentially helpful output, so I contacted the SOS
maintainer and SOS devs about it: https://github.com/52North/sos4R/issues/49

/Daniel


On 16/06/16 17:24, CharlesB wrote:

> Hello,
>
> I am trying to use sos4R with a simple request and I encounter th following
> error "expectation failed".
>
> mySOS <- SOS(url = "http://sos.irceline.be/sos")
> OBS <-getObservation(sos = mySOS, offering="81102 - PM10", eventTime =
> sosCreateTime(sos = mySOS, time = "2016-06-14::2016-06-15"), verbose=TRUE)
> [getObservation] Requesting offering 81102 - PM10 by name.
> [getObservation] Got observation(s) from offering because none given: 81102
> - PM10
> [.getObservation_1.0.0] to  http://sos.irceline.be/sos  with offering  81102
> - PM10
> [.getObservation_1.0.0] REQUEST:
>  Object of class SosGetObservation:  service:  SOS , version:  1.0.0 ,
> offering:  81102 - PM10
> observered property:  81102 - PM10
> responseFormat(s):  text/xml;subtype=&quot;om/1.0.0&quot; , responseMode(s):
> NA
> procedure(s) NA
>         feature(s) of interest  
>         event time:  <S4 object of class "SosEventTime">
>         result:  NULL
> srsName:  NA
> resultModel(s):  NA
> [.sosRequest_1.0.0] Encoding Function (beginning of function body):  {
> standardGeneric("encodeRequestXML")  ... [ 0  more chrs].
> [encodeRequestXML] SosGetObservation
> [encodeXML] SosEventTime
> [encodeXML] TM_During with GmlTimePeriod: [ GmlTimePosition [ time:
> 2016-06-14 ]
>         --> GmlTimePosition [ time: 2016-06-15 ] ]
> [.encodeTM]  TM_During
> [encodeXML] GmlTimePeriod with GmlTimePeriod: [ GmlTimePosition [ time:
> 2016-06-14 ]
>         --> GmlTimePosition [ time: 2016-06-15 ] ]
> [encodeXML] GmlTimePosition with GmlTimePosition [ time: 2016-06-14 ]
> [encodeXML] POSIXt with value 2016-06-14
> Formatted  1465855200  to  2016-06-14T00:00:00[encodeXML] GmlTimePosition
> with GmlTimePosition [ time: 2016-06-15 ]
> [encodeXML] POSIXt with value 2016-06-15
> Formatted  1465941600  to  2016-06-15T00:00:00[.sosRequest_1.0.0] POST!
> [.sosRequest_1.0.0] REQUEST:<sos:GetObservation
> xsi:schemaLocation="http://www.opengis.net/sos/1.0
> http://schemas.opengis.net/sos/1.0.0/sosAll.xsd" service="SOS"
> version="1.0.0" xmlns:sos="http://www.opengis.net/sos/1.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ows="http://www.opengis.net/ows/1.1"
> xmlns:om="http://www.opengis.net/om/1.0"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml">
>  <sos:offering>81102 - PM10</sos:offering>
>  <sos:eventTime>
>   <ogc:TM_During>
>    <ogc:PropertyName>om:samplingTime</ogc:PropertyName>
>    <gml:TimePeriod>
>     <gml:beginPosition>2016-06-14T00:00:00</gml:beginPosition>
>     <gml:endPosition>2016-06-15T00:00:00</gml:endPosition>
>    </gml:TimePeriod>
>   </ogc:TM_During>
>  </sos:eventTime>
>  <sos:observedProperty>81102 - PM10</sos:observedProperty>
>
> <sos:responseFormat>text/xml;subtype=&quot;om/1.0.0&quot;</sos:responseFormat>
> </sos:GetObservation>
> Erreur : Expectation Failed
>
> Thanks for your help !
>
> C. Beaugard
>
>
>
>
> --
> View this message in context: http://geostatistics.forum.52north.org/sos4R-expectation-failed-error-tp4022968.html
> Sent from the 52° North - Geostatistics Community Forum mailing list archive at Nabble.com.
> _______________________________________________
> Geostatistics mailing list
> [hidden email]
> http://list.52north.org/mailman/listinfo/geostatistics
> http://geostatistics.forum.52north.org
> Please respect our mailing list guidelines:
> http://52north.org/resources/mailing-lists-and-forums/guidelines
>

--
Daniel Nüst
Institute for Geoinformatics (ifgi),   University of Münster
Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 31962
http://ifgi.uni-muenster.de/~d_nues01        http://o2r.info
_______________________________________________
Geostatistics mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geostatistics
http://geostatistics.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines