Skip to content

Instantly share code, notes, and snippets.

@allixender
Created July 13, 2015 03:24
Show Gist options
  • Save allixender/86db02c9bf468073ed9c to your computer and use it in GitHub Desktop.
Save allixender/86db02c9bf468073ed9c to your computer and use it in GitHub Desktop.
# demo sos 400
library(sos4R)
g1.converters <- SosDataFieldConvertingFunctions(
"http://vocab.smart-project.info/sensorweb/phenomenon/Temperature" = sosConvertDouble,
"http://www.opengis.net/def/property/OGC/0/SamplingTime" = sosConvertTime,
"http://www.opengis.net/def/property/OGC/0/FeatureOfInterest" = sosConvertString)
myopts <- curlOptions(ssl.verifyhost=FALSE, ssl.verifypeer=FALSE, followlocation=TRUE)
handle <- getCurlHandle( .opts= myopts)
g1 <- SOS(url = "http://geomatix1.aut.ac.nz/52n-sos-400/sos/pox" , dataFieldConverters = g1.converters, curlHandle=handle)
cli_offerings <- sosOfferings(cli)
cli_off_no2 <- gwl_offerings[[2]]
year2000 = sosCreateTime(sos = gwl, time = "2000/01/01::2000/12/31")
observ<-getObservation(sos = cli, procedure= "", saveOriginal = FALSE)
result<-sosResult(observ, coordinates = TRUE)
measLevel <- colnames(result)[[2]]
zr<-range(result[[measLevel]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment