Questions tagged [stars]

The R package providing classes and methods for reading, manipulating, plotting and writing spatiotemporal data cubes.

Filter by
Sorted by
Tagged with
1
vote
1answer
32 views

Convert large stars object to sf object

My ultimate goal is to convert landcover raster (.tif) objects to an sf object representing the raster's grid and the original values of each cell within each geometry. I have been able to do this for ...
0
votes
0answers
19 views

Extract all multiband pixel values inside the polygons from stars-proxy

I use stars and sf packages of R programming language for satelite image manipulation and data mining (with tidyverse packages). I try to extract all pixel values from stars proxy object inside the ...
0
votes
0answers
28 views

temporal rolling mean in stars

I need to find temporal rolling means (or other stats - max, min, etc) in stars spatial obects. For stars raster cubes, this would be directly analogous to the calc(rasterBrick, function(x) movingFun(...
1
vote
1answer
83 views

Error while converting raster to ploygon using stars package

I am trying to convert raster to polygon using stars package as suggested in this and this. I have used the following code library(raster) library(stars) library(sf) library(magrittr) #read raster r1&...
0
votes
1answer
53 views

Exporting ASCII file from 'stars' package

I'm playing around with the stars package (0.4-1) in R, but I can't get how to export a grid object in ASCII format, as the traditional writeRaster(r, filename=file.path(dir.list[j], 'test.asc'), ...
2
votes
1answer
83 views

Raster file statistics in R (stars and raster package) don't match gdalinfo

I'm trying to read a gridded binary file in R using read_stars. Comparing the stats from stars package to the stats from gdalinfo, I could see differences in min/max values. Below is the sample code. ...
0
votes
1answer
78 views

Read NetCDF file with read_stars in R

I am trying to work with cordex climatic data (curvelinear and rotated data) in the stars package, and I am having a lot of issues, so decided to simply reproduce online example, and I fail reading in ...
3
votes
1answer
67 views

Generate a stars object from tabular spatial temporal data?

I have tabular data with columns longitude, latitude, time, and intensity, like so: library(lubridate) ## mock example data ex <- tibble(longitude = 1:10, latitude = 10:1, ...
2
votes
1answer
59 views

r stars: calculate ndvi for every time step on stars proxy

I would like to calculate the ndvi on every time step of a 4d data cube (x, y, bands, time) in on an stars proxy object. Do you have any ideas of how to achieve this on the proxy object? My current ...
1
vote
0answers
66 views

Copernicus ERA5 crs/projecition for NetCDF

i'm trying to work from netCDF from this link: https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels?tab=form but i can't find the correct EPSG. In documentation page i ...
2
votes
1answer
330 views

stars package in R. How to add time dimension in a stars object?

I have a raster stack (my_stack) and I converted it into a stars object: mystar <- st_as_stars(my_stack) That results in: stars object with 3 dimensions and 1 attribute attribute(s), summary of ...
2
votes
0answers
110 views

Stratified ordinary kriging using gstat and stars packages

The gstat package supports stratified ordinary kriging using sp objects as shown at https://github.com/r-spatial/gstat/blob/master/demo/examples.R (the code below). This year (https://r-spatial.github....
1
vote
2answers
208 views

NetCDF time aggregation using R stars package

I have a monthly temperature netCDF dataset with aprox 20 years and I'd like to calculate a monthly climatology (average of all Jan, Feb, Mar...). I know I can do this with stackapply from package ...
4
votes
1answer
286 views

Convert XYZ to stars curvilinear grid and plot

I have data in XYZ format (long, lat, elevation) that does not fit on a rectangular grid, but I would like to plot it as grid cells of different sizes. To illustrate what I mean, the last two plots ...
1
vote
0answers
200 views

Creating map projection for net of geodesic dome?

I am working on a project that involves mapping the night sky's northern hemisphere onto the exterior surface of a small (16 cm radius) geodesic dome. The problem is, I don't know what map projection ...
1
vote
0answers
268 views

R stars package and set dimensions to a NetCDF file

Related: GDAL and reprojecting a NetCDF file Following above, I would like to reproject a NetCDF ( NOAA GOES-16 file ) using R stars package. However, I have been unsuccessful at the first step; I ...
2
votes
1answer
938 views

Error from aggregate function from the R package sf

I am currently reading the new (and free!) book by Edzer Pebesma and Roger Bivand (you can find it here). In chapter four they describe how one can aggregate all the measurement stations within one ...