sos4R: error parsing a large om document

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

sos4R: error parsing a large om document

borg
dear list,

we tried to retrieve data from a sos (1.0) via the sos4R library. we are using r 3.0.2 (but also tested with 3.2.5 with the same result).
the error only occurs when we downloading large data (about 100000 data values). when we requesting smaller subsets then we can get all the data in multiple steps.

we called the sos function with verbose=TRUE and we can see that the first om:observation elements are correct.

we also checked that there is no exception thrown from the sos

below we attached the error message

thanks in advance

gruss juergen

<om:ObservationCollection xmlns:om="http://www.opengis.net/om/1.0" xmlns:gml="ht
^
[.getObservation_1.0.0] RESPONSE DOC:
<?xml version="1.0" encoding="UTF-8"?>
 
[.getObservation_1.0.0] Got pure XML according to mime type.  Trying to parse with default parser, see SosParsingFunctions().
[.getObservation_1.0.0] Saved original document: /home/sorg/R.out.xml
Error in UseMethod("xmlName", node) :
  no applicable method for 'xmlName' applied to an object of class "NULL"
In addition: Warning message:
In xmlRoot.XMLInternalDocument(document) : empty XML document


Reply | Threaded
Open this post in threaded view
|

Re: sos4R: error parsing a large om document

Daniel Nüst-2
Hi Jürgen,

On 25/04/16 14:32, borg wrote:

> we tried to retrieve data from a sos (1.0) via the sos4R library. we are
> using r 3.0.2 (but also tested with 3.2.5 with the same result).
> the error only occurs when we downloading large data (about 100000 data
> values). when we requesting smaller subsets then we can get all the data in
> multiple steps.
>
> we called the sos function with verbose=TRUE and we can see that the first
> om:observation elements are correct.
>
> we also checked that there is no exception thrown from the sos
>
> below we attached the error message
>
> thanks in advance
>
> gruss juergen
>
> <om:ObservationCollection xmlns:om=&quot;http://www.opengis.net/om/1.0&quot;
> xmlns:gml=&quot;ht
> ^
> [.getObservation_1.0.0] RESPONSE DOC:
> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
>
> [.getObservation_1.0.0] Got pure XML according to mime type.  Trying to
> parse with default parser, see SosParsingFunctions().
> [.getObservation_1.0.0] Saved original document: /home/sorg/R.out.xml
> Error in UseMethod("xmlName", node) :
>    no applicable method for 'xmlName' applied to an object of class "NULL"
> In addition: Warning message:
> In xmlRoot.XMLInternalDocument(document) : empty XML document

The XML library is a bit buggy sometimes on some systems...

Could you please provide the output of sessionInfo(), and check if the
original document (/home/sorg/R.out.xml) is complete? Especially towards
the end.

If your SOS is openly available, could you please provide a URL and
example script? If not, can you share the original document (via private
message if need be)?



Best regards,
Daniel

> --
> View this message in context: http://geostatistics.forum.52north.org/sos4R-error-parsing-a-large-om-document-tp4022965.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
Reply | Threaded
Open this post in threaded view
|

Re: sos4R: error parsing a large om document

borg
hi daniel,

below is the output from sessionInfo().
the /home/sorg/R.out.xml file is empty only the xmlheader is present:
<?xml version="1.0" encoding="UTF-8"?>
but again the verbose output shows some observation sections from the
responded om doc. (maybe the om output comes from an exception of the
xmlparsing fun (xmlParseDoc) and not from the verbose option)

i can give you access to the sos - can you send me a private
emailaddress, which i can use?

thanks for your help

gruss juergen


R version 3.0.2 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
  [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_US.UTF-8
  [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C
  [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] sos4R_0.2-11   sp_1.2-3       RCurl_1.95-4.8 bitops_1.0-6
XML_3.98-1.4

loaded via a namespace (and not attached):
[1] grid_3.0.2      lattice_0.20-24 tcltk_3.0.2     tools_3.0.2



On 27/04/16 10:04, Daniel Nüst-2 [via 52° North - Geostatistics
Community Forum] wrote:

> Hi Jürgen,
>
> On 25/04/16 14:32, borg wrote:
>
>  > we tried to retrieve data from a sos (1.0) via the sos4R library. we are
>  > using r 3.0.2 (but also tested with 3.2.5 with the same result).
>  > the error only occurs when we downloading large data (about 100000 data
>  > values). when we requesting smaller subsets then we can get all the
> data in
>  > multiple steps.
>  >
>  > we called the sos function with verbose=TRUE and we can see that the
> first
>  > om:observation elements are correct.
>  >
>  > we also checked that there is no exception thrown from the sos
>  >
>  > below we attached the error message
>  >
>  > thanks in advance
>  >
>  > gruss juergen
>  >
>  > <om:ObservationCollection
> xmlns:om=&quot;http://www.opengis.net/om/1.0&quot;
> <http://www.opengis.net/om/1.0">
>  > xmlns:gml=&quot;ht
>  > ^
>  > [.getObservation_1.0.0] RESPONSE DOC:
>  > &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
>  >
>  > [.getObservation_1.0.0] Got pure XML according to mime type.  Trying to
>  > parse with default parser, see SosParsingFunctions().
>  > [.getObservation_1.0.0] Saved original document: /home/sorg/R.out.xml
>  > Error in UseMethod("xmlName", node) :
>  >    no applicable method for 'xmlName' applied to an object of class
> "NULL"
>  > In addition: Warning message:
>  > In xmlRoot.XMLInternalDocument(document) : empty XML document
>
> The XML library is a bit buggy sometimes on some systems...
>
> Could you please provide the output of sessionInfo(), and check if the
> original document (/home/sorg/R.out.xml) is complete? Especially towards
> the end.
>
> If your SOS is openly available, could you please provide a URL and
> example script? If not, can you share the original document (via private
> message if need be)?
>
>
>
> Best regards,
> Daniel
>
>  > --
>  > View this message in context:
> http://geostatistics.forum.52north.org/sos4R-error-parsing-a-large-om-document-tp4022965.html
>  > Sent from the 52° North - Geostatistics Community Forum mailing list
> archive at Nabble.com.
>  > _______________________________________________
>  > Geostatistics mailing list
>  > [hidden email] </user/SendEmail.jtp?type=node&node=4022966&i=0>
>  > 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] </user/SendEmail.jtp?type=node&node=4022966&i=1>
> 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
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://geostatistics.forum.52north.org/sos4R-error-parsing-a-large-om-document-tp4022965p4022966.html
>
> To unsubscribe from sos4R: error parsing a large om document, click here
> <
> NAML
> <
http://geostatistics.forum.52north.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


smime.p7s (6K) Download Attachment