...
 
Commits (29)
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"library(XML)\n",
"library(rgdal)\n",
"library(gdalUtils)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"voi = \"nitrogen\" # variable of interest\n",
"depth = \"5-15cm\"\n",
"quantile = \"Q0.5\"\n",
"\n",
"voi_layer = paste(voi,depth,quantile, sep=\"_\") # layer of interest "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"wcs_path = paste0(\"https://maps.isric.org/mapserv?map=/map/\",voi,\".map\") # Path to the WCS. See maps.isric.org\n",
"wcs_service = \"SERVICE=WCS\"\n",
"wcs_version = \"VERSION=2.0.1\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"wcs_request = \"DescribeCoverage\" \n",
"\n",
"wcs = paste(wcs_path, wcs_service, wcs_version, wcs_request, sep=\"&\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"l1 <- newXMLNode(\"WCS_GDAL\")\n",
"l1.s <- newXMLNode(\"ServiceURL\", wcs, parent=l1)\n",
"l1.l <- newXMLNode(\"CoverageName\", voi_layer, parent=l1)\n",
"\n",
"# Save to local disk\n",
"xml.out = \"./sg.xml\"\n",
"saveXML(l1, file = xml.out)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"gdalinfo(\"./sg.xml\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "R",
"language": "R",
"name": "ir"
},
"language_info": {
"codemirror_mode": "r",
"file_extension": ".r",
"mimetype": "text/x-r-source",
"name": "R",
"pygments_lexer": "r",
"version": "3.6.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
FROM centos8:dfr
FROM laurapoggio/cos8dfs:today
RUN pip install --no-cache-dir notebook==5.*
RUN pip install bash_kernel
RUN python -m bash_kernel.install
RUN pip install rpy2 tzlocal
RUN Rscript --slave --no-save --no-restore-history -e "install.packages(pkgs=c('IRkernel'), repos=c('http://stat.ethz.ch/CRAN/'))"
ENV GRASSBIN="/usr/local/bin/grass" \
GRASS_SKIP_MAPSET_OWNER_CHECK=1 \
SHELL="/bin/bash"
RUN if [ ! -e /usr/bin/pip ]; then ln -s /usr/bin/pip3 /usr/bin/pip ; fi && \
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi
RUN pip install --no-cache-dir notebook==5.*
RUN yum install -y passwd
ARG NB_USER=nbuser
ARG NB_UID=1000
ENV USER ${NB_USER}
......@@ -23,6 +24,14 @@ RUN passwd -d ${NB_USER}
COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_USER}
CMD cd ${HOME}
RUN Rscript --slave --no-save --no-restore-history -e "IRkernel::installspec()"
# Specify the default command to run
EXPOSE 8888
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0"]
CMD ["/bin/bash"]
# CMD ["/bin/bash"]
name: r_env
channels:
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1
- _openmp_mutex=4.5
- _r-mutex=1.0.1
- binutils_impl_linux-64=2.34
- binutils_linux-64=2.34
- boost-cpp=1.72.0
- bwidget=1.9.14
- bzip2=1.0.8
- ca-certificates=2020.4.5.1
- cairo=1.16.0
- certifi=2020.4.5.1
- cfitsio=3.470
- curl=7.69.1
- expat=2.2.9
- fontconfig=2.13.1
- freetype=2.10.2
- freexl=1.0.5
- fribidi=1.0.9
- gcc_impl_linux-64=7.5.0
- gcc_linux-64=7.5.0
- geos=3.8.1
- geotiff=1.5.1
- gettext=0.19.8.1
- gfortran_impl_linux-64=7.5.0
- gfortran_linux-64=7.5.0
- giflib=5.2.1
- glib=2.64.3
- graphite2=1.3.13
- gsl=2.6
- gxx_impl_linux-64=7.5.0
- gxx_linux-64=7.5.0
- harfbuzz=2.4.0
- hdf4=4.2.13
- hdf5=1.10.5
- icu=64.2
- jpeg=9d
- json-c=0.13.1
- kealib=1.4.13
- krb5=1.17.1
- ld_impl_linux-64=2.34
- libblas=3.8.0
- libcblas=3.8.0
- libcurl=7.69.1
- libdap4=3.20.6
- libedit=3.1.20191231
- libffi=3.2.1
- libgcc-ng=9.2.0
- libgdal=3.0.4
- libgfortran-ng=7.5.0
- libgomp=9.2.0
- libiconv=1.15
- libkml=1.3.0
- liblapack=3.8.0
- libnetcdf=4.7.4
- libopenblas=0.3.9
- libpng=1.6.37
- libpq=12.2
- libspatialite=4.3.0a
- libssh2=1.9.0
- libstdcxx-ng=9.2.0
- libtiff=4.1.0
- libuuid=2.32.1
- libwebp=1.0.2
- libxcb=1.13
- libxml2=2.9.10
- llvm-openmp=10.0.0
- lz4-c=1.9.2
- make=4.3
- ncurses=6.1
- openjpeg=2.3.1
- openssl=1.1.1g
- pango=1.42.4
- pcre=8.44
- pip=20.1.1
- pixman=0.38.0
- poppler=0.67.0
- poppler-data=0.4.9
- postgresql=12.2
- proj=6.3.1
- pthread-stubs=0.4
- python=3.8.3
- python_abi=3.8
- r-base=3.6.1
- r-base=3.6
- r-codetools=0.2_16
- r-foreach=1.5.0
- r-gdalutils=2.0.3.2
......@@ -98,29 +15,3 @@ dependencies:
- r-rcpp=1.0.4.6
- r-rgdal=1.4_8
- r-sp=1.4_2
- readline=8.0
- sed=4.7
- setuptools=47.1.1
- sqlite=3.30.1
- sysroot_linux-64=2.12
- tbb=2020.1
- tiledb=1.7.0
- tk=8.6.10
- tktable=2.10
- tzcode=2020a
- wheel=0.34.2
- xerces-c=3.2.2
- xorg-kbproto=1.0.7
- xorg-libice=1.0.10
- xorg-libsm=1.2.3
- xorg-libx11=1.6.9
- xorg-libxau=1.0.9
- xorg-libxdmcp=1.1.3
- xorg-libxext=1.3.4
- xorg-libxrender=0.9.10
- xorg-renderproto=0.11.1
- xorg-xextproto=7.3.0
- xorg-xproto=7.0.31
- xz=5.2.5
- zlib=1.2.11
- zstd=1.4.4
r-3.6-2020-01-01
r-3.6-2020-02-29