Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Sep 15, 2017
1 parent 5e5f0b6 commit edd78be
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
13 changes: 4 additions & 9 deletions DESCRIPTION
Expand Up @@ -14,18 +14,13 @@ Imports:
units,
sf
Suggests:
ggplot2,
ggthemes,
viridis,
testthat,
knitr,
covr,
tibble,
dplyr,
tidyr,
geosphere (>= 1.5-5),
maptools,
maps,
ggplot2,
ggthemes,
viridis
rmarkdown
LinkingTo: Rcpp
VignetteBuilder: knitr
SystemRequirements: GDAL (>= 2.1.0), PROJ.4 (>= 4.8.0)
Expand Down
9 changes: 7 additions & 2 deletions R/stars.R
Expand Up @@ -142,17 +142,22 @@ st_stars.list = function(x, ..., dimensions = NULL) {
#' image(x)
image.stars = function(x, ..., band = 1, attr = 1, asp = 1, rgb = NULL, maxColorValue = 1,
xlab = names(dims)[1], ylab = names(dims)[2]) {

if (any(dim(x) == 1))
x = adrop(x)

dims = expand_dimensions(x)
x = x[[attr]]
x = unclass(x[[ attr ]])
x = if (length(dim(x)) == 3) {
if (is.null(rgb))
x[ , rev(seq_len(dim(x)[2])), band]
else {
stop("not yet supported")
xy = dim(x)[1:2]
x = structure(x[ , , rgb], dim = c(prod(xy), 3)) # flattens x/y
x = rgb(x, maxColorValue = maxColorValue) # FIXME: deal with NAs
dim(x) = xy
return(rasterImage(x[ , rev(seq_len(dim(x)[2]))], 0, 0, 1, 1, interpolate = FALSE))
#return(rasterImage(x[ , rev(seq_len(dim(x)[2]))], 0, 0, 1, 1, interpolate = FALSE))
}
} else
x[ , rev(seq_len(dim(x)[2]))]
Expand Down
8 changes: 4 additions & 4 deletions documents/stars_data.md
@@ -1,14 +1,14 @@
# An Earth data processing backend for testing and evaluating stars

[Edzer Pebesma](https://github.com/edzer/),
[Michael Sumner](https://github.com/mdsumer/)
[Michael Sumner](https://github.com/mdsumner/)

## Summary

The amount of freely available data generated by either direct observation from satellites or from weather or climate model calculations exceeds our capacity to download and process locally. The only feasible approach to analyse such data is to send compute jobs to cloud servers with direct access to this data, and have the small summaries (maps, time series, numbers) returned. R lacks software to analyse such datasets on compute servers, and software to serve such processes.

The [stars](https://github.com/r-spatial/stars/) project foresees in
processing such data, and doing this from a client on a remote server, without
The [stars](https://github.com/r-spatial/stars/) project will enable the
processing such data, locally as well as on a remote server, without
downloading the data. This project, `stars:backend`, will (i) create software
to run a back-end, (ii) develop scripts and tutorials that explain how such
a data server and processing backend can be set up, and (iii) create an instance
Expand Down Expand Up @@ -42,7 +42,7 @@ The [rOpenSci](http://ropensci.org/) project has also developed several packages

As mentioned, [Google Earth Engine](https://earthengine.google.com/) provides remote processing on Tb-Pb sized dateset, but is not open source, and hence to some extent a black box. In addition, users have limited control over which data it serves, and which software it runs (e.g., it has a python interface but does not allow using numpy)

The Spatial data at the Australian Antarctic Division has [R tools](https://github.com/AustralianAntarcticDivision/raadtools) to organise large amounts of Earth science data and serve it to researchers.
The Australian Antarctic Division has [R tools](https://github.com/AustralianAntarcticDivision/raadtools) to organise large amounts of Earth science data and serve it to researchers.

## The Plan:

Expand Down
10 changes: 6 additions & 4 deletions vignettes/first.html

Large diffs are not rendered by default.

0 comments on commit edd78be

Please sign in to comment.