Questions tagged [r-stars]

Questions about the stars R package for spatiotemporal arrays.

stars is an R package for spatiotemporal arrays and raster and vector "data cubes".

58 questions
1
vote
0 answers

Is there a way to combine two stars object containing the same variable sets at different locations in r

I'm trying to combine different raster data sets at different locations into one raster object. I just found the stars package in r that may potentially do this, and I like this package a lot because a lot of the tidyverse methods are compatible.…
Miao Cai
  • 902
  • 9
  • 25
1
vote
1 answer

why can i plot my stars_proxy object but not write it out

I'm new to stars so hoping this is a simple answer and just me failing to understand the stars workflow properly. R Version: 4.1.1 Stars Version: 0.5-5 library(stars) library(starsdata) #install.packages("starsdata", repos =…
SIBeckers
  • 11
  • 4
1
vote
1 answer

Missing function "split" in the R package stars

I have a problem with package stars when trying to use split function to split a stars raster object. I use the stars version 0.5-4 (that one is automatically installed when asking for installing stars). According to the package documentation, there…
1
vote
1 answer

sf and stars: polygonize categorical raster

I'd like to draw the raster countour (l) just only for the "target" categorical in x raster without considering NA values. I try to do: # Packages library(stars) library(sf) #Vectorizing a raster object to an sf object tif =…
Leprechault
  • 1,531
  • 12
  • 28
1
vote
1 answer

Bbox of stars object smaller than stars object itself?

When I plot the bbox of a "stars" object, the bbox is smaller than the object itself. Probably an error in my code, but I don't know where... In fact, two issues in one, the second one being unexpected because it happened while I was preparing my…
lovalery
  • 4,524
  • 3
  • 14
  • 28
1
vote
0 answers

What can cause missing values aggregating polygon and raster data?

The aggregation (with sf::aggregate()) of polygon data with raster data generates a regular series of missing data. Please consider the following code: require(sf) require(stars) # Download here =>…
CptNemo
  • 6,455
  • 16
  • 58
  • 107
0
votes
1 answer

Convert raster to geodatabase (gdb) file

I am trying to convert a raster to geodatabase (gdb) file using R and then read this gdb file back into R. The gdb file contains a column (gridcode) that I need for other calculations within my R script. In ArcGIS this conversion can be done with…
Salvador
  • 1,229
  • 1
  • 11
  • 19
0
votes
0 answers

Is there a way to have a raster gradient through NA spaces? Aiming to mimic raster output from ArcGIS GWR

I'm trying to mimic the raster style output you get from ArcGIS Geographically Weighted Regression, where instead of simply plotting the coefficient/value in the raster cell that aligns with the coordinate point assigned the value leaving all…
ttalVlatt
  • 138
  • 6
0
votes
1 answer

Dealing with Sentinel-3 data with R

I'm struggling to deal with sentinel-3 data in R, of 300 meters resolution. I would like to extract TSM (Total Suspended Matter concentration) in each cell. Data are provided in a archive, with many different netcdf files (for example, one for…
0
votes
0 answers

st_extract in stars with bilinear = TRUE crashes R on mac with M1 chip

Apparently the bilinear extraction in st_extract from the stars package causes problems on a mac with the M1 chip. Does anybody found the problem and/or has a workaround? The function st_extract works perfectly with bilinear = FALSE. >…
SimeonL
  • 165
  • 6
0
votes
1 answer

Extracting points from a raster by matching in time and space

I have a spatrast with information on current velocities which I calculated from u and v components. How can I extract points from this SPATRAST to a dataframe based on time and spatial matches? code for recreating example…
Eileen04
  • 15
  • 4
0
votes
0 answers

assign attributes to stars object to plot rasters in a grid with ggplot/facet_grid

I have individual rasters for the modeled distribution of different species in different seasons. I'd like to plot the rasters using ggplot and facet_grid(), with each column representing a different season, and each row representing a different…
Jason
  • 892
  • 1
  • 8
  • 19
0
votes
0 answers

Reading multiple NetCDF time series

I like to read multiple NetCDF files, e.g. 90 files each contains 30 years of daily weather values for one of 3 parameter respectively (temperature, precipitation, radiation). l1 <- list("temperature_1991.nc", "temperature_1992.nc", ...,…
ckluss
  • 1,477
  • 4
  • 21
  • 33
0
votes
1 answer

R stars::st_as_sf( , merge = TRUE) not working properly with Raster - Points with same values are not all merged

I have been trying to polygonize a raster in R and ran into memory issues. Searching for solutions, I found this question with a routine using the stars package in R that I felt could solve my issues. I provide a reproducible example below that…
RobertoAS
  • 45
  • 6
0
votes
0 answers

How to create an interactive map of stars/raster object with arbitrary crs?

Problem I would like to create interactive maps of a regular grid that comes in a CRS which is not WGS84. In my case the CRS is EPSG:25833 which has unit metres. Given the comment here, it does not seem to be possible to "display rasters with…
chamaoskurumi
  • 2,271
  • 2
  • 23
  • 30