Archives for posts with tag: ISO 8601

The release 0.2 was supposed to be a major improvement, but there were some problems with the Vignette, still. Mainly because it relied on downloading files from web servers, which again and again caused the package to get warnings on CRAN. Now, the vignette contains an option to rely on files stored in the folder along with it – I honestly doubt that this is a good practice, but I couldn’t find a better solution so far.

But of course there also was a bug introduced with some changes that were supposed to be  bug fixes in version 0.2 and 0.2-01 … anyway, here is an updated package: release 0.2-2, now on CRAN. I am very glad to actually have decent results in the checks across several systems.

From the CHANGES file:
* Fixed in sosGetCRS(...) which breaks if there is no bounding box given in an offering, broke even plot funktion.
* Extended saveOrginal parameter, now it also accepts file names to be used for the document to be saved.
* Extended parsing of SensorML, adding slots for all parsed elements
* Added parsing of exception reports to parseFile(...)
* Based vignette completely on dowloaded files for releases

* Added rudimentary support for KML responses (no parsing)
* Changed parser detection, now uses mime type, too. This changes parser exchangeability for known mime types!
* Added attribute to observations (if response is saved) with file name (sosAttributeFileName)
* Added %\VignetteDepends{xtable} to vignette and depedency xtable as well - got NOTEd for that in R 2.13 checks

Date and time parsing is never fun. Two sides claim to use ISO 8601, but they just don’t work together out of the box. In my case, I get times from the SOS like this:


A ‘T’ shows when the time starts after the date, the seconds are including milliseconds, and the time zone is shown at the end, it’s plus 2 hours from UTC time. Can I convert this to an R time object like POSIXct easily? No. For example, as.POSIXct expects a space between date and time – so much for ISO 8601 compatibility… but never mind, the function strptime allows to convert a string to a time object based on a given format. One could also use other packages like chron as dicussed here. But I figured out something else, see the code and comments below:

Read the rest of this entry »