-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from OldLipe/b-0.9.0
rstac version 0.9.0
- Loading branch information
Showing
41 changed files
with
4,248 additions
and
397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
Package: rstac | ||
Title: R Client Library for SpatioTemporal Asset Catalog | ||
Version: 0.3.3 | ||
Version: 0.9.0 | ||
Authors@R: | ||
c(person("Brazil Data Cube Team", email = "[email protected]", | ||
role = c("cph", "cre", "aut"))) | ||
c(person("Brazil Data Cube Team", | ||
email = "[email protected]", | ||
role = c("cre", "aut")), | ||
person(given = "National Institute for Space Research (INPE)", | ||
role = c("cph"))) | ||
Description: | ||
R client library for STAC is a R package that interfaces STAC API | ||
endpoints. | ||
For more information about the STAC specification, please consult the | ||
specification page (<http://stacspec.org>). | ||
This package supports the version 0.8.1 of the STAC specification. | ||
This package supports the version 0.8.1 or higher of the STAC specification. | ||
License: MIT + file LICENSE | ||
URL: https://github.com/brazil-data-cube/rstac | ||
BugReports: https://github.com/brazil-data-cube/rstac/issues | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#' @title endpoints functions | ||
#' | ||
#' @param collection_id a \code{character} collection id to be retrieved. | ||
#' | ||
#' @return a \code{character} with the STAC endpoint of the required version. | ||
#' | ||
#' @noRd | ||
.OAFeat_collections_endpoint <- function(collection_id) { | ||
|
||
endpoint <- "/collections" | ||
|
||
if (!missing(collection_id)) | ||
endpoint <- paste(endpoint, collection_id, sep = "/") | ||
|
||
return(endpoint) | ||
} | ||
|
||
#' @title endpoints functions | ||
#' | ||
#' @param collection_id a \code{character} collection id to be retrieved. | ||
#' | ||
#' @param feature_id a \code{character} with item id to be fetched. | ||
#' Only works if the \code{collection_id} is informed. This is equivalent to | ||
#' the endpoint \code{/collections/\{collectionId\}/items/\{itemId\}}. | ||
#' | ||
#' @return a \code{character} with the STAC endpoint of the required version. | ||
#' | ||
#' @noRd | ||
.OAFeat_items_endpoint <- function(collection_id, feature_id) { | ||
|
||
endpoint <- paste("/collections", collection_id, "items", sep = "/") | ||
|
||
if (!missing(feature_id)) | ||
endpoint <- paste(endpoint, feature_id, sep = "/") | ||
|
||
return(endpoint) | ||
} | ||
|
||
#' @title endpoints functions | ||
#' | ||
#' @param version a \code{character} with the STAC version. | ||
#' | ||
#' @return a \code{character} with the STAC endpoint of the required version. | ||
#' | ||
#' @noRd | ||
.stac_landpage_endpoint <- function(version) { | ||
|
||
if (version < "0.9.0") | ||
return("/stac") | ||
|
||
return("/") # version >= "0.9.0" | ||
} | ||
|
||
#' @title endpoints functions | ||
#' | ||
#' @param version a \code{character} with the STAC version. | ||
#' | ||
#' @return a \code{character} with the STAC endpoint of the required version. | ||
#' | ||
#' @noRd | ||
.stac_search_endpoint <- function(version) { | ||
|
||
if (version < "0.9.0") | ||
return("/stac/search") | ||
|
||
return("/search") # version >= "0.9.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.