Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

getObservation SweDataArrayValue' is not yet supported! #179

Open
oggioniale opened this issue Jun 24, 2022 · 6 comments
Open

getObservation SweDataArrayValue' is not yet supported! #179

oggioniale opened this issue Jun 24, 2022 · 6 comments

Comments

@oggioniale
Copy link

I obtain a warning message while trying to get observations from the SOS I am using for the Italian network of the European infrastructure eLTER-RI.

The SOS responds to sosURL = "http://getit.lteritalia.it/observations/service".
My code is:

> mySos <- sos4R::SOS(
    url = sosURL,
    binding = "POX",
    useDCPs = FALSE
  )
> offerings <- sos4R::sosOfferings(mySos)
> offering <- offerings[[1]]
> obs <- sos4R::getObservation(
      sos = mySos,
      offering = offering@id,
      procedure = sos4R::sosProcedures(offering)
    )
Warning message:
In .handleExceptionReport(sos, response) :
  Object of class OwsExceptionReport; version: 1.1.0; lang: NA;
 1 exception(s) (code @ locator : text):
  NoApplicableCode @ NA :
	The merging of value type 'org.n52.sos.ogc.om.values.SweDataArrayValue' is not yet supported! 

The obs object is:

> obs
Object of class OwsExceptionReport; version: 1.1.0; lang: NA;
 1 exception(s) (code @ locator : text):
  NoApplicableCode @ NA :
	The merging of value type 'org.n52.sos.ogc.om.values.SweDataArrayValue' is not yet supported! 

When try to convert observations to results:

> results <- sos4R::sosResult(obs, coordinates = TRUE) %>%
      tibble::as_tibble()
Warning message:
In .local(obj, coordinates, ...) :
  OwsExceptionReport does not have a result set.
> results
# A tibble: 1 × 1
  value                                                                                                                                                                                                                                   
  <chr>                                                                                                                                                                                                                                   
1 "Object of class OwsExceptionReport; version: 1.1.0; lang: NA;\n 1 exception(s) (code @ locator : text):\n  NoApplicableCode @ NA :\n\tThe merging of value type 'org.n52.sos.ogc.om.values.SweDataArrayValue' is not yet supported! \n"

How can solve it?

@EHJ-52n
Copy link
Member

EHJ-52n commented Jun 24, 2022

You are receiving an exception from the server, as far as I see. You may change the response format.

@oggioniale
Copy link
Author

how? What do you suggest?

@oggioniale
Copy link
Author

@EHJ-52n thanks!!

the response formats supported are:

> sos4R::SosSupportedResponseFormats()
[1] "text/xml;subtype=\"om/1.0.0\""       "text/xml;subtype=\"sensorML/1.0.1\"" "text/csv" 

I try to execute the getObservation for each of the three formats.

[1]

> obs <- sos4R::getObservation(
      sos = mySos,
      offering = offering@id,
      procedure = sos4R::sosProcedures(offering)
    )
Warning message:
In .handleExceptionReport(sos, response) :
  Object of class OwsExceptionReport; version: 1.1.0; lang: NA;
 1 exception(s) (code @ locator : text):
  NoApplicableCode @ NA :
	The merging of value type 'org.n52.sos.ogc.om.values.SweDataArrayValue' is not yet supported! 

> obs
Object of class OwsExceptionReport; version: 1.1.0; lang: NA;
 1 exception(s) (code @ locator : text):
  NoApplicableCode @ NA :
	The merging of value type 'org.n52.sos.ogc.om.values.SweDataArrayValue' is not yet supported! 

[2]

> obs <- sos4R::getObservation(
      sos = mySos,
      offering = offering@id,
      procedure = sos4R::sosProcedures(offering)
    )
Warning message:
In .handleExceptionReport(sos, response) :
  Object of class OwsExceptionReport; version: 1.0.0; lang: NA;
 1 exception(s) (code @ locator : text):
  InvalidParameterValue @ responseFormat :
	The value 'text/xml; subtype="sensorML/1.0.1"' of the parameter 'responseFormat' is invalid 

> obs
Object of class OwsExceptionReport; version: 1.0.0; lang: NA;
 1 exception(s) (code @ locator : text):
  InvalidParameterValue @ responseFormat :
	The value 'text/xml; subtype="sensorML/1.0.1"' of the parameter 'responseFormat' is invalid

[3]

> obs <- sos4R::getObservation(
      sos = mySos,
      offering = offering@id,
      procedure = sos4R::sosProcedures(offering)
    )
Warning message:
In .handleExceptionReport(sos, response) :
  Object of class OwsExceptionReport; version: 1.0.0; lang: NA;
 1 exception(s) (code @ locator : text):
  InvalidParameterValue @ responseFormat :
	The value 'text/csv' of the parameter 'responseFormat' is invalid 

> obs
Object of class OwsExceptionReport; version: 1.0.0; lang: NA;
 1 exception(s) (code @ locator : text):
  InvalidParameterValue @ responseFormat :
	The value 'text/csv' of the parameter 'responseFormat' is invalid 

@EHJ-52n
Copy link
Member

EHJ-52n commented Jun 27, 2022

For deeper details, we might ask @nuest or @BenGraeler to give us more details, why the allowed response formats are not working.

@oggioniale
Copy link
Author

oggioniale commented Jun 27, 2022

👍🏽 thank you, I wait the feedback from @nuest and @BenGraeler

@oggioniale
Copy link
Author

Someone have comments about this issue?

Otherwise I need to take a different way to obtain the results for the SweDataArrayValue types.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants