Skip to content

Commit

Permalink
documentation updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Boeck committed Nov 16, 2016
1 parent 62807eb commit 8871230
Show file tree
Hide file tree
Showing 14 changed files with 309 additions and 235 deletions.
9 changes: 5 additions & 4 deletions R/S2_query_angle.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@
#' @param orbitNo see wiki
#' @param product see wiki
#' @param productId see wiki
#' @param retGeometry see wiki
#' @param retGeometry logical should product geometry be included in the response?
#' @param utm see wiki
#' @param dateSingle see wiki
#' @param dateSingle character date of format "YYYY-MM-DD", specifies a single
#' date and will override \code{dateMin} and \code{dateMax}.
#' @param ... further arguments, none implemented
#' @return list of query arguments
#' @export

S2_query_angle <- function(angleType = NULL,
band = NULL,
broken = 0,
broken = FALSE,
dateMax = Sys.Date(),
dateMin = as.Date(dateMax) - 365,
geometry = NULL,
Expand All @@ -30,7 +31,7 @@ S2_query_angle <- function(angleType = NULL,
orbitNo = NULL,
product = NULL,
productId = NULL,
retGeometry = 0,
retGeometry = FALSE,
utm = NULL,
dateSingle = NULL,
...){
Expand Down
48 changes: 27 additions & 21 deletions R/S2_query_granule.R
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
#' Prepare a list to query database for 'granule'
#' Query database for 'granule'
#'
#' Implements the query options for granule found in the wiki
#' @param atmCorr see wiki
#' @param broken see wiki
#' @param cloudCovMin see wiki
#' @param cloudCovMax see wiki
#' @param dateMax see wiki
#' @param dateMin see wiki
#' @param geometry see wiki
#' @param granule see wiki
#' @param granuleId see wiki
#' @param orbitNo see wiki
#' @param product see wiki
#' @param productId see wiki
#' @param retGeometry see wiki
#' @param utm see wiki
#' @param dateSingle see wiki
#' @param ... further arguments, none implemented
#' @return list of query arguments
#' Implements the query options for granule described in the wiki.
#' @param atmCorr logical if TRUE only results for atmospherically corrected
#' data are returned.
#' @param broken logical, TRUE if the granule is marked as broken
#' (almost for sure you want to use FALSE, the default).
#' @param cloudCovMin integer minimum cloud coverage from 0 to 100.
#' @param cloudCovMax integer maximum cloud coverage from 0 to 100.
#' @param dateMax character end date of format "YYYY-MM-DD".
#' @param dateMin character start date of format "YYYY-MM-DD".
#' @param geometry geometry which should intersect with granules. Can be a
#' geoJSON geometry string (e.g. {"type":"Point","coordinates":[16.5,48.5]}),
#' the path to a Point/Polygon shapefile, a SpatialPoints object or a
#' SpatialPolygons object.
#' @param granule character ESA granule id.
#' @param granuleId integer internal metadata database granule id.
#' @param orbitNo integer from 1 to 143.
#' @param product chracter ESA product id.
#' @param productId integer internal metadata database product id.
#' @param retGeometry logical should product geometry be included in the response?
#' @param utm character UTM zone, e.g. 33U, 01C.
#' @param dateSingle character date of format "YYYY-MM-DD", specifies a single
#' date and will override \code{dateMin} and \code{dateMax}.
#' @param ... further arguments, none implemented.
#' @return data.frame return of the database.
#' @export

S2_query_granule <- function(atmCorr = NULL,
broken = 0,
broken = FALSE,
cloudCovMin = 0,
cloudCovMax = 100,
dateMax = Sys.Date(),
Expand All @@ -32,7 +38,7 @@ S2_query_granule <- function(atmCorr = NULL,
orbitNo = NULL,
product = NULL,
productId = NULL,
retGeometry = 0,
retGeometry = FALSE,
utm = NULL,
dateSingle = NULL,
...){
Expand Down
54 changes: 31 additions & 23 deletions R/S2_query_image.R
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
#' Prepare a list to query database for 'image'
#'
#' Implements the query options for 'images' found in the wiki
#' Implements the query options for 'images' described in the wiki.
#'
#' @param atmCorr see wiki
#' @param broken see wiki
#' @param band see wiki
#' @param cloudCovMin see wiki
#' @param cloudCovMax see wiki
#' @param dateMax see wiki
#' @param dateMin see wiki
#' @param geometry see wiki
#' @param granule see wiki
#' @param granuleId see wiki
#' @param imageId see wiki
#' @param orbitNo see wiki
#' @param product see wiki
#' @param productId see wiki
#' @param resolution see wiki
#' @param retGeometry see wiki
#' @param utm see wiki
#' @param dateSingle see wiki
#' @param ... further arguments, none implemented
#' @return list of query arguments
#' @param atmCorr logical if TRUE only results for atmospherically corrected
#' data are returned.
#' @param broken logical, TRUE if the granule is marked as broken
#' (almost for sure you want to use FALSE, the default).
#' @param band chracter spectral band: B01/B02/B03/B04/B05/B06/B07/B08/B8A/B09/
#' B10/B11/B12/all/SCL/LAI/albedo - see sentinel2 documentation.
#' @param cloudCovMin integer minimum cloud coverage from 0 to 100.
#' @param cloudCovMax integer maximum cloud coverage from 0 to 100.
#' @param dateMax character end date of format "YYYY-MM-DD".
#' @param dateMin character start date of format "YYYY-MM-DD".
#' @param geometry geometry which should intersect with granules. Can be a
#' geoJSON geometry string (e.g. {"type":"Point","coordinates":[16.5,48.5]}),
#' the path to a Point/Polygon shapefile, a SpatialPoints object or a
#' SpatialPolygons object.
#' @param granule character ESA granule id.
#' @param granuleId integer internal metadata database granule id.
#' @param imageId integer internal metadata database image id.
#' @param orbitNo integer from 1 to 143.
#' @param product chracter ESA product id.
#' @param productId integer internal metadata database product id.
#' @param resolution integer spatial resolution [m]: 60/20/10
#' (resolution depends on the spectral band).
#' @param retGeometry logical should product geometry be included in the response?
#' @param utm character UTM zone, e.g. 33U, 01C.
#' @param dateSingle character date of format "YYYY-MM-DD", specifies a single
#' date and will override \code{dateMin} and \code{dateMax}.
#' @param ... further arguments, none implemented.
#' @return data.frame return of the database.
#' @export

S2_query_image <- function(atmCorr = NULL,
band = NULL,
broken = 0,
broken = FALSE,
cloudCovMin = 0,
cloudCovMax = 100,
dateMax = Sys.Date(),
Expand All @@ -39,7 +47,7 @@ S2_query_image <- function(atmCorr = NULL,
product = NULL,
productId = NULL,
resolution = NULL,
retGeometry = 0,
retGeometry = FALSE,
utm = NULL,
dateSingle = NULL,
...){
Expand Down
46 changes: 25 additions & 21 deletions R/S2_query_job.R
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
#' Prepare a list to query database for 'job'
#' Query database for 'job'
#'
#' Implements the query options for 'job' found in the wiki
#' @param dateMax see wiki
#' @param dateMin see wiki
#' @param ended see wiki
#' @param failed see wiki
#' @param geometry see wiki
#' @param jobId see wiki
#' @param granule see wiki
#' @param granuleId see wiki
#' @param product see wiki
#' @param productId see wiki
#' @param retGeometry see wiki
#' @param started see wiki
#' @param dateSingle see wiki
#' @param ... further arguments, none implemented
#' @return list of query arguments
#' Implements the query options for 'job' described in the wiki.
#' @param dateMax character end date of format "YYYY-MM-DD".
#' @param dateMin character start date of format "YYYY-MM-DD".
#' @param started logical, TRUE if job has started.
#' @param ended logical, TRUE if job has ended.
#' @param failed logical, TRUE if job has failed.
#' @param geometry geometry which should intersect with granules. Can be a
#' geoJSON geometry string (e.g. {"type":"Point","coordinates":[16.5,48.5]}),
#' the path to a Point/Polygon shapefile, a SpatialPoints object or a
#' SpatialPolygons object.
#' @param jobId character internal metadata database job id.
#' @param granule character ESA granule id.
#' @param granuleId integer internal metadata database granule id.
#' @param product chracter ESA product id.
#' @param productId integer internal metadata database product id.
#' @param retGeometry logical should product geometry be included in the response?
#' @param dateSingle character date of format "YYYY-MM-DD", specifies a single
#' date and will override \code{dateMin} and \code{dateMax}.
#' @param ... further arguments, none implemented.
#' @return data.frame return of the database.
#' @export

S2_query_job <- function(dateMax = Sys.Date(),
dateMin = as.Date(dateMax) - 365,
ended = 1,
failed = 0,
started = NULL,
ended = NULL,
failed = NULL,
geometry = NULL,
jobId = NULL,
granule = NULL,
granuleId = NULL,
product = NULL,
productId = NULL,
retGeometry = 0,
started = NULL,
retGeometry = FALSE,
dateSingle = NULL,
...){

Expand Down
38 changes: 23 additions & 15 deletions R/S2_query_product.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
#' Prepare a list to query database for 'product'
#' Query database for 'product'
#'
#' Implements the query options for 'product' found in the wiki
#' @param atmCorr see wiki
#' @param dateMax see wiki
#' @param dateMin see wiki
#' @param geometry see wiki
#' @param orbitDir see wiki
#' @param orbitNo see wiki
#' @param product see wiki
#' @param productId see wiki
#' @param retGeometry see wiki
#' @param dateSingle see wiki
#' @param ... further arguments, none implemented
#' @return list of query arguments
#' Implements the query options for 'product' described in the wiki.
#' @param atmCorr logical if TRUE only results for atmospherically corrected
#' data are returned.
#' @param dateMax character end date of format "YYYY-MM-DD".
#' @param dateMin character start date of format "YYYY-MM-DD".
#' @param geometry geometry which should intersect with granules. Can be a
#' geoJSON geometry string (e.g. {"type":"Point","coordinates":[16.5,48.5]}),
#' the path to a Point/Polygon shapefile, a SpatialPoints object or a
#' SpatialPolygons object.
#' @param orbitDir character NULL or one of c("DESCENDING", "ASCENDING").
#' @param orbitNo integer from 1 to 143.
#' @param product charactrer ESA product id.
#' @param productId internal metadata database product id.
#' @param retGeometry logical should product geometry be included in the response?
#' @param dateSingle character date of format "YYYY-MM-DD", specifies a single
#' date and will override \code{dateMin} and \code{dateMax}.
#' @param ... further arguments, none implemented.
#' @return data.frame return of the database.
#' @export

S2_query_product <- function(atmCorr = NULL,
Expand All @@ -23,11 +28,14 @@ S2_query_product <- function(atmCorr = NULL,
orbitNo = NULL,
product = NULL,
productId = NULL,
retGeometry = 0,
retGeometry = FALSE,
dateSingle = NULL,
...){


# check inputs ---------------------------------------------------------------
if (!is.null(orbitDir)) orbitDir <- match.arg(orbitDir)

if (!is.null(dateSingle)){
check_date(dateSingle)
dateMin <- dateSingle
Expand Down
51 changes: 29 additions & 22 deletions R/S2_query_qiData.R
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
#' Prepare a list to query database for 'qiData'
#' Query database for 'qiData'
#'
#' Implements the query options for qiData found in the wiki
#' @param atmCorr see wiki
#' @param band see wiki
#' @param broken see wiki
#' @param cloudCovMin see wiki
#' @param cloudCovMax see wiki
#' @param dateMax see wiki
#' @param dateMin see wiki
#' @param geometry see wiki
#' @param granule see wiki
#' @param granuleId see wiki
#' @param orbitNo see wiki
#' @param product see wiki
#' @param productId see wiki
#' @param retGeometry see wiki
#' @param utm see wiki
#' @param dateSingle see wiki
#' @param ... further arguments, none implemented
#' @return list of query arguments
#' Implements the query options for qiData described in the wiki.
#' @param atmCorr logical if TRUE only results for atmospherically corrected
#' data are returned.
#' @param broken logical, TRUE if the granule is marked as broken
#' (almost for sure you want to use FALSE, the default).
#' @param band chracter spectral band: B01/B02/B03/B04/B05/B06/B07/B08/B8A/B09/
#' B10/B11/B12/all/SCL/LAI/albedo - see sentinel2 documentation.
#' @param cloudCovMin integer minimum cloud coverage from 0 to 100.
#' @param cloudCovMax integer maximum cloud coverage from 0 to 100.
#' @param dateMax character end date of format "YYYY-MM-DD".
#' @param dateMin character start date of format "YYYY-MM-DD".
#' @param geometry geometry which should intersect with granules. Can be a
#' geoJSON geometry string (e.g. {"type":"Point","coordinates":[16.5,48.5]}),
#' the path to a Point/Polygon shapefile, a SpatialPoints object or a
#' SpatialPolygons object.
#' @param granule character ESA granule id.
#' @param granuleId integer internal metadata database granule id.
#' @param orbitNo integer from 1 to 143.
#' @param product chracter ESA product id.
#' @param productId integer internal metadata database product id.
#' @param retGeometry logical should product geometry be included in the response?
#' @param utm character UTM zone, e.g. 33U, 01C.
#' @param dateSingle character date of format "YYYY-MM-DD", specifies a single
#' date and will override \code{dateMin} and \code{dateMax}.
#' @param ... further arguments, none implemented.
#' @return data.frame return of the database.
#' @export

S2_query_qiData <- function(atmCorr = NULL,
band = NULL,
broken = 0,
broken = FALSE,
cloudCovMin = 0,
cloudCovMax = 100,
dateMax = Sys.Date(),
Expand All @@ -34,7 +41,7 @@ S2_query_qiData <- function(atmCorr = NULL,
orbitNo = NULL,
product = NULL,
productId = NULL,
retGeometry = 0,
retGeometry = FALSE,
utm = NULL,
dateSingle = NULL,
...){
Expand Down
24 changes: 14 additions & 10 deletions R/S2_query_roi.R
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#' Prepare a list to query database for 'roi'
#' Query database for 'roi'
#'
#' Implements the query options for roi found in the wiki
#' Implements the query options for roi described in the wiki.
#'
#' @param dateMax see wiki
#' @param dateMin see wiki
#' @param geometry see wiki
#' @param regionId see wiki
#' @param utm see wiki
#' @param dateSingle see wiki
#' @param ... further arguments, none implemented
#' @return list of query arguments
#' @param dateMax character end date of format "YYYY-MM-DD".
#' @param dateMin character start date of format "YYYY-MM-DD".
#' @param geometry geometry which should intersect with granules. Can be a
#' geoJSON geometry string (e.g. {"type":"Point","coordinates":[16.5,48.5]}),
#' the path to a Point/Polygon shapefile, a SpatialPoints object or a
#' SpatialPolygons object.
#' @param regionId chracter name of the 'roi'
#' @param utm character UTM zone, e.g. 33U, 01C.
#' @param dateSingle character date of format "YYYY-MM-DD", specifies a single
#' date and will override \code{dateMin} and \code{dateMax}.
#' @param ... further arguments, none implemented.
#' @return data.frame return of the database.
#' @export

S2_query_roi <- function(dateMax = Sys.Date(),
Expand Down
Loading

0 comments on commit 8871230

Please sign in to comment.