Archives for posts with tag: encoding

From the beginning of sos4R I had to struggle with difficulties in two areas (amongst others): generality and flexibility/versions.

Generality and Specifications. I implement a client for a web service. But the SOS specification does not come as a single document, because it references other specifications, most importantly for me up to now: OWS Common, a specification for common operations among OGC web services; the often mentioned Observations & Measurements. And then there are GML, SensorML and SWE Common.

So how do I represent this division in the code? And do I represent it at all? Read the rest of this entry »

Most of my work goes into parsing and encoding XML files. Luckily, there is a good package available for that in R that I can use. And have to, really, as it is the only one! It is duly titled XML and available on CRAN: http://cran.at.r-project.org/web/packages/XML/index.html. Luckily, the package is available under a BSD license, so no trouble regarding that. There are a bunch of helpful documents with extensive examples available on the project website at http://www.omegahat.org/RSXML/.

Decoding

Nevertheless, let me show you a little code snippet on how I use it, and that is the parsing of an Exception Report as defined in OWS common (OGC Web Services Common). These are my first steps, so I don’t claim this is done cleverly.

Read the rest of this entry »