Changelog
Source:NEWS.md
version 0.7-0
st_extract()no longer stops when InterpolateAtPoint returns error value(s); #760add
st_as_stars()methods forCFVariableandCFDataset, provided by packagencdfCF; #756, #757 by @pvanlaaketry harder to convert
CFTimetimes toDatewhen they are dates.if set,
options("stars.regular")controls the threshold below which dimension coordinates are considered regular, with default 1.0e-4removed dependency on PCICt, added dependency on CFtime; #754 by @pvanlaake
handling of dimensions with a single value is now more consistent; #754
slice.stars_proxy()works (again) for single-file proxy objects; #751, #527[.stars()with acharacterselector selects on names of a dimension if it has names; #747handle “intervals” dimension in aggregate.stars() and
st_as_sf.stars(); #745fix
c.stars()for the case where some of the objects have a single slice on thealong=dimension; #743st_redimension()(and by that,merge.stars()) useabind()for numeric variables rather thanc(), reducing memory overhead.fix problem with reading HDF4 files; #741 by Alexys Rodriguez
use, by default,
normalizePath()onfilenameinread_mdim(); #735st_extract()accepts empty points as target; #734st_sfc2xy()passes...on tost_as_stars(); #733
version 0.6-7
CRAN release: 2024-11-07
st_extract()fix if points coincide with boundary grid cell centers and bilinear interpolation is used; #720st_extract()if used with GDAL 3.10.0 uses InterpolateAtPoints, allowing for cubic and cubicspline interpolators (requiring sf >= 1.0-19).Ops.stars()(math ops) now also recycle arrays in the first argument; #718c.stars()verifies semantic equivalence of objects’ CRS; #703initial support for
read_mdim()to work withproxy = TRUE; #659
version 0.6-6
CRAN release: 2024-07-16
skip
cubbletests for cubble version 0.3.1; https://github.com/huizezhang-sherry/cubble/issues/30st_transform.starstransforms geometries in array elementsmutate.stars(and others) handle attribute names with spaces in them; #689st_crop()gains an argumentnormalize; when set toTRUEst_normalize()is called on the returned value; #685, #686constrain reading full GEOLOCATION arrays to the case where they are 2-D; #678
version 0.6-5
CRAN release: 2024-04-04
fix
st_as_stars.Spatial()forSpatialgridded objects with non-square grid cells, see https://github.com/r-spatial/gstat/issues/123add
prcomp()methods forstarsandstars_proxyobjects, working on attributes or last dimensionst_rasterize()withalign=TRUEreturnsNAvalues where there are no data; #668read_mdim()reads tables with composity type, returning adata.framein that case; #659st_rotate()transforms a rotated grid back to a curvilinear grid in unrotated coordinates.aggregate.stars()deals with functions that return more than one number, putting these in a new dimension likest_apply()doesst_as_stars.data.frame()andst_as_stars.sf()better handle non-raster data cubesplot.stars()only resets layout when needed (more than one sub-plot, or key present)fixed
st_as_stars.im(); #648st_crs<-.stars()is less critical on existing CRS being of classcrsc.stars()with a single (valid) argument andalongspecified adds a dimension; #646st_join.stars()keeps attributes fromxcomplete; #643st_as_stars.list()requires a named list, and will set names of array dimensions if not present
version 0.6-4
CRAN release: 2023-09-11
plot.stars()has afillargument that shifts unused plotting space between sub-maps to the bottom or right side of the plotting areain
plot.stars(), thekey.widthdefault is sensitive topar("ps"), the pointsize graphics parameterplot.stars()andimage.stars()are sensitive tocex.axis, for axes and key (requires sf >= 1.0-14); #642move
lwgeomdependency to Suggests; usingst_transform_proj()on vector data cubes requires loadinglwgeomfirst
version 0.6-3
CRAN release: 2023-08-11
st_downsample()has argumentoffsetto pixel-shift downsampled imagesst_downsample()has argumentFUNto compute sub-tile aggregates; #604st_as_stars.bbox()retainsfactorvalues; #640fix CRAN error in test script
st_crop()works (and warns) for the case when the crop area does not overlap with the area of the object; #638
version 0.6-2
CRAN release: 2023-07-12
split.stars()acceptsstarsobjects with multiple attributes; #635[.stars()supportsNAvalues in dimension ranges for vector geometry (sfc) dimensions, resulting in empty geometriesst_extract()supports extracting points values from curvilinear grids (when not proxy); #632read_mdim()reads curvilinear rasters (geolocation arrays), so far only at full extent/resolutionst_as_stars.stars()accepts curvilinear argument with lon/lat array names present in.xconsistently use
OGC:CRS84instead ofEPSG:4326setting
values = NULLinst_set_dimensions()removes dimension valuesmore gracefully handle plotting of global coverage curvilinear grids; #632
image.stars()plots images (e.g. of cross sections) when x and/or y are singular or absent; #628st_as_stars.cubble_df()adds conversion from cubble;cubble::as_cubble()methods converts back[<-.stars()accepts forian indicator (numeric length character) to the array to be replaced; #626plot.stars()gains an argumentkey.labto set the legend key label (requires sf >= 1.0-13)
version 0.6-1
CRAN release: 2023-04-06
remove
rgdaldependencyread_stars()fixes combining bands with different block sizes; #623read_mdim()reads “raster” with single pixel (as a point)[.stars(), as inr[x]allowsxto be a logical stars object[<-.stars_proxy()clones environment, so that afterr[r > 100] = NAwe don’t get infinite recursion when realizingrread_stars()avoids reading a raster twice to determine how to chooseproxy;proxycan now be set as (and defaults to) the number of cells (bands * rows * columns) above which data will not be read in memory but returned asstars_proxyobject; #609fix using
RasterIOinread_stars()whenproxy=TRUE; #608plot.stars()hook function can handle argumentsrow,col,nrow,ncol,nr,valueandbbox; #600fix handling of categorical rasters with colors but without category labels; #595, fallout of #565
fix subsetting of proxy objects over a time range; #596
version 0.6-0
CRAN release: 2022-11-21
write_stars()writes scaled and/or shifted values when using argumentscale_offset; #589aggregate.stars_proxy()implements aggregation with non-spatialbyobjects (lazily)fix
[.stars_proxy()when selecting dimension 3 and higher; #561in
plot.stars(),colcan also be a palette functionst_res()returns spatial resolutions, and optionally all dimension resolutions; #557 thanks to Krzysztof Dybaread_stars()shortens band or array names that contain a common start or ending, unless names would become empty orshorten=FALSEwas set; e.g.shorten="B"puts aBbefore shortened array namesprinting
starsdimension tables omits fields with onlyNULLorNAvalues, unlessprint(..., all = TRUE)is givenimprove reading categorical rasters, which now avoids calling
factor(); #565 thanks to Krzysztof Dybaread_mdim()will read bounds arrays for coordinates using theboundsattribute, and accepts aboundsargument to specify them when that attribute is missingtime()returns time stamps of a time dimensionst_cells()returns the cell index for a set of point coordinates, provided assforsfcobject; #558reading & writing vector data cubes:
read_mdim()reads CF compliant vector geometries, and reconstructs them into ansfcdimension;write_mdim()writes them.write_mdim()uses GDAL multidimensional array API;read_mdim()uses argumentsoffset,countandstepto read sub-arrays or strided arrays (requires sf >= 1.0-9)
version 0.5-6
CRAN release: 2022-07-21
export
read_mdim(), a reader using GDAL’s multidimensional array API (for sf <= 1.0-8)remove
tos_O1_2001-2002.ncfrom packaged datasets to keep source package size below 5 Mbas.POSIXct.stars()convertsPCICtdimensions toPOSIXctvalues.improve handling of
PCICt360 or 365 day calendars; read them inread_mdim(requires sf >= 1.0-9)read_stars()reads factor levels better from attribute table; #484 thanks to @ailichread_stars()puts band names fromband_metaDESCRIPTION= tags intovalues;improve handling of categorical rasters, and their exchange with
terra; #484plot()handles auto colors better for factor arraysread_ncdf()handles units more formally in setting crs; #533print message that dimensions of proxy objects do not reflect unevaluated operations; #530
passing
na.action = na.omittogeom_stars()removesNAvalues; #532read_stars()detects curvilinear grids automatically; #513st_warp()warps curvilinear grids (using Euclidean distances only on coordinates); #513Ops.stars()errors when (common) dimension are not identical; #506guess_raster()accepts empty rows/columns and sparse grids; #509speed up
rgbplotting; #503Added a new helper function
st_tile()to specify the block parameters (nXOff,nYOff,nXsize,nYSize) required byRasterIOargument inread_stars(); #492 thanks to Krzysztof Dyba
version 0.5-5
CRAN release: 2021-12-19
st_as_stars.bbox()creates an empy raster file ifproxy = TRUE; #489st_rasterize()has optionalign = TRUEto use a template for aligning the new raster to; #489adrop.stars()with missing dimensions no longer drops x/y raster dimensions; #485aggregate.stars()propagates units of arrays; #477
version 0.5-4
CRAN release: 2021-11-19
c.stars()fails if it tries to merge arrays with different units; #475For NetCDF files,
read_stars()uses thelong_nameas array name; #475refresh CRS of packaged
L7_ETMs.tif; #466as.data.frame.stars()works for mixed regular and rectilinear dimension; #458plot.stars()plots curvilinear rasters with color table, or without table butcolargument passed; #456st_extract()accepts a matrix with points asatargument, for when performance is important; see e.g. https://github.com/rspatial/terra/issues/341fix bug in
st_crop()when cropping area is larger than grid; #455export
st_downsample(), e.g. to be used bytmap; https://github.com/r-tmap/tmap/issues/597argument
downsampleinplot.stars()andst_as_stars.stars_proxy()andst_downsample()has the same effect (removed a one-offset between them).st_redimension()works for curvilinear grids; #441downsampleis propagated to subexpressions liker[r < 50] = NApredict.stars()obtains an argumentdrop_dimensionsthat, ifTRUE, drops dimensions from the predictiondata.frame; #362allow subsetting with
[by using labels, e.g. of band names.
version 0.5-3
CRAN release: 2021-06-08
read_stars()accepts a function (or list with functions) as first argument, allowing for savingstarsobjects that read from package directories resolving platform-dependent paths at run-timehandle categorical rasters starting at value 0 (by adding 1, and warning); #428
add
%in%method; #424read_stars()gains an argumenttoleranceto control tolerance in dimension value comparisons; #414binary Ops (like
+,-,*etc.) work forstars_proxyobjects; #390st_rasterize()rasterizes multiple attributes, and handles factors (when sf >= 0.9-9)write_stars()deals better withstars_proxyobjects; #404fix regression in reading some
stars_proxyobjects; #379add
[<-(partially) andis.namethods forstars_proxyobjects; #402add
replace_na()methods; #402
version 0.5-2
CRAN release: 2021-03-17
read and write factor levels as GDAL category names; write color table; #392
handle
normalize_pathfor choosing toproxy; #391ignore units when there are different units across bands of a subdataset
speed up
st_rgb()using fasterst_apply()approach; #315, #390improve handling of crs in Spatial objects (avoid loss of wkt comments)
correctly write band subsets for smaller proxy objects; #291
write arbitrarily cropped proxy objects; #291
speed up
st_apply()when a function is provided that works on chunks at a time; #390warn when breaks = “quantile” results in a single class; #388
fix
[bug selecting bands in proxy objects; #388for
stars_proxyobjects,write_stars()writes all objects into a multi-layer file; #385multi-file proxy objects can be
st_warp()ed withuse_gdal = TRUE; #385
version 0.5-1
CRAN release: 2021-01-25
fix weird GDAL-related bug in stars2 vignette
read_ncdf()does not take time as mid-points of regular intervals, but as starting points; #378
version 0.5-0
CRAN release: 2021-01-19
fix handling of rasters with color tables; #375
st_apply()and other methods forstars_proxyobjects handle … ; #374add
st_bbox(),st_crs()methods for terra’sSpatVectorobjects; https://github.com/r-tmap/tmap/issues/536add
st_bbox(),st_crs()andst_as_stars()methods for terra’sSpatRasterobjects; https://github.com/r-tmap/tmap/issues/536allow for multi-resolution attributes in
stars_proxyobjects (e.g., all gray scale sentinel-2 bands); see vignettes 2 and 7 for examples.plot()defaults to a categorical color scale when plotting a factor variable; https://github.com/r-tmap/tmap/issues/526st_extract()extracts space-time points iftime_columnis specified, and handles time intervals; #352add
[[<-.starsmethod, which is now called by$<-.stars, so that array names can be set programmaticallyadd
transmute()methodsplot.stars()callsdroplevelsif a factor array has anyNAlevels; #339read_stars()readsNaNs asNA; #333improve
st_extract()method for bothstarsandstars_proxyobjects; interpolation options are reduced to bilinear; #322, #279, #290better handle categorical rasters that do not start at value 1; #329
plot layout can be controlled with
mfrow = c(nr, nc)argumentstars_proxyobjects have a normalized path; #331cropping or selecting with
bboxtreats cells always as small polygons; #330add faster
st_extract()method forstarsobjects; #322added vignette: “How
rasterfunctions map tostarsfunctions”, by Sebastien Rochette; #122, #325fix bug in dimension
valuesfield when downsampling; #324write_stars()also writes out band names; #323add
rgdalto Suggests:each
call_listentry of astars_proxyobject carries its proper calling environment; #309st_as_sf.stars()copes with zero attribute (empty) stars objectsadd
st_set_bbox()generic, to set raster extent, motivated by #315get rid of more
proj4strings for representing coordinate reference systems; #312as(x, “Spatial”) correctly handles
fromdimension values different from oneread_stars()now sets theBANDNAMEGDAL metadata item, or else the band’s GetDescription() as the band’s dimension valuesst_as_stars.data.frame()reads simple tables (non-raster data) ifdimshas length less than 2band descriptions are in the band dimension values
dimension tables are simpler, and are shown properly in Rstudio
st_rgb()gains aprobsargument, to cut off and stretch based on quantilesas(x, "Raster")merges multiple attributes before converting to raster brick
version 0.4-3
CRAN release: 2020-07-08
fix bug in
st_as_stars.Raster; set crs to the one assigned by raster; https://github.com/r-tmap/tmap/issues/471add
s2to Suggests:new function
st_rgb()collapses (reduces) a dimension to rgb hex value; #302
version 0.4-2
CRAN release: 2020-07-01
aggregate.stars()handles arrays with NA values now correctly; brought up in #299 by Thorsten Simonaggregate.stars()gains an argumentexactwhich, ifTRUE, callsexactextractrfor polygonal aggregation; #289read_stars()reads all subdatasets with dimensions equal to first, and warns when ignoring others; #296make copying over of dimensions somewhat easier; #295
st_as_stars.Raster()tries to read from file if the raster object is not an in-memory object.write_stars()normalizes path, asread_starsalready did; #293st_as_stars.Raster()returns a proxy object if the raster layer is on diskadd
st_extract()to extract e.g. time series from grids at point locations; #279; #290read_stars()chooses a value forproxythat depends on the data dimensions; #281x/y range subsetting of
stars_proxyobjects now only reads that range, similar to how crop already did this.st_warp()preserves levels and colors; https://github.com/r-tmap/tmap/issues/429st_crop()works with bounding boxes larger than the downsampled bounding box; #276st_crop()has a non-zero default forepsilon(bounding box shrinkage) to exclude cells touching the crop bounding box; #275image.stars()(and henceplot.stars) gains anextentargument for setting the extent of a plot; https://github.com/r-spatial/sf/issues/1193
version 0.4-1
CRAN release: 2020-04-07
st_warp()(stars native) flips longitudes a full cycle; #256, #264, #269handle axis order in
st_transform(requires sf >= 0.9-1)depend on sf 0.9-0
adapt to cubelyr split-off from dplyr; add cubelyr to Suggests:; https://github.com/hadley/cubelyr/issues/2
add
droplevels()methodhandle color tables, category tables and raster attribute tables read through GDAL; #128, #245; https://github.com/r-spatial/mapview/issues/208
handle dimension
crsspecially, for proxy objects now.handle new-style
crsobjects from upcoming sf, moving away from proj4stringshandle full
crsobjects asrefsyselement in a spatial dimensions, rather than proj4string onlyst_raster_type(x)reveals the raster type ofx; #248, https://github.com/r-tmap/tmap/issues/368add
st_as_stars.OpenStreetMap()method; #241 by @mtennekesadd
st_flip()to flip arrays along one or more dimensions without changing dimension propertiesadd
as.owin()method to convert (2D raster) stars objects to spatstatowin; https://github.com/r-spatial/sf/issues/1233for temporal aggregation,
aggregate.starsnow also takesbyarguments like “week”, “month”, or “5 days”add
st_as_stars()method forxtsobjects; improveas.xtsforstarsobjectsskip some tests on solaris
version 0.4-0
CRAN release: 2019-10-10
plot()now uses all data to figure out breaks, in order to also find extremes; #216st_mosaic()creates mosaics from spatially disjoint rasters; #210#205 large refactoring of
read_ncdf, by David Blodgett and Mike Sumner, affecting #199, #89, #30, #86, #175allow for funny units like
m s**-1; #201plot uses
rasterImageby default if available; #194the
xandyraster dimensions can be set and unset withxyargument inst_set_dimensions; #190retain
factorlevels with dimension values when set inst_set_dimensions; #188add conversion from
stars_proxytoRaster: #193make plotting of multiple curvilinear grids work
plot by default no cell borders in case of curvilinear, rotated or sheared grids
robustify handling of units
allow
read_ncdf()to ignore boundsscale was applied wrongly on multi-band images; #189, this requires sf >= 0.7-5
.ncis now recognized correctly bywrite_starsand will write a NetCDF file; #186[subset now works correctly with negative or logical indices; #184, #185NAvalues for float32 grids are now correctly detected; #182, this requires sf >= 0.7-5cropping of a
stars_proxyobject now works; #179st_apply()can now loop over Raster layers; examples in #176
version 0.3-1
CRAN release: 2019-04-23
st_as_stars.bboxnow has anncellsandprettyargument, to better choose default raster dimensionsgeom_starsnow works withstars_proxyobjects, but needsdownsampleto be set; #21NAvalues in Float32 rasters are now read correctly withread_stars; #182handle bounds, when given, in
read_ncdfprovide time parsing (POSIXct, PCICt) for
read_ncdf; #115
version 0.3-0
CRAN release: 2019-02-24
add
st_areamethod to return raster grid cell sizes; #99fix
st_warpwithuse_gdal=TRUE, allowing for multi-band warpsadd
st_get_dimension_valuesto get the values of a particular dimension (if meaningful); #100allow for setting intervals as dimension values; see examples of
st_dimensionsadd
st_contour, and clean upst_as_sf; #99experimental color table support; https://github.com/r-spatial/mapview/issues/208
rewrote vignettes, added vignettes; #99
deprecate
st_write.starsforwrite_stars; #96use “native” R array-factor support
support for
PCICt360- and 365-day calendars; #29remove import of
ncdf4in favor ofRNetCDF, now in line with practice inncmetapackage. Thanks to David Blodgett for motivation and testing (see #87, #94).st_as_sfuses date/time column names when appropriateallow missing trailing comma’s when subsetting:
a[1,,]anda[1,]now do the same.move
rlangto Imports: ; rewrite[subset using rlang.add conversion to and from
Spatial*classes, including the gridded ones, taking care offactorvariablesdepend on sf 0.7-2
add
logzsupport for log-scale keys toplotandimage
version 0.2-0
CRAN release: 2018-10-25
vignettes now use an external package,
starsdata, for larger dataset examplessupport
[<-.starse.g. to mask out values; supportis.na.starsto replace NA maskssupport
cutmethods and factor arrays (plot, subset); #56add
st_rasterize, which usesGDALRasterizeto rasterize an sf object; #13st_as_sf.starsnow usesGDAL(F)Polygonizewhen give a regular or sheared grid grid cells are not points, and returns contour bands usingGDALContourGenerateEx(requiring GDAL 2.4.0) in case cells are points; #13support curvilinear grids; see #54 and the
data_modelvignetteadd vignette about how
stars_proxyobjects workstars_proxyobjects defer processing ofst_applyjobs until after subsampling; #50allow reading sections of a raster, raster at a lower resolution, selected bands; #48
allow reading vectors (arrays) with more than 2^31 elements; #48
fold all higher dimensions into the third dimension before coercing to
Raster; #40
version 0.1-0
add
merge(merge attributes into array dimension) andsplit(split dimension over attributes)interface to sf, raster and spacetime
improve plotting
handle
logicalarrays in plotadd
st_apply, analogous toapplyadd cropping/masking when used as x[buf] with buf an
sf,sfcorbboxobject; masking whenx[buf, crop = FALSE]add Ops (+,-,/ etc) and Math (sqrt, pow, sin etc) methods
add
dimnamesanddimnames<-methods for stars objectsdownsample large grids to only plot pixels actually shown
can plot rectilinear grids (but will plot rgb images as regular grids)
rgbargument toimageworks[array-like subsetting works; first index is attribute selector
version 0.0
- interface the 9 C++ gdal utils through
gdal_utils()(now part ofsf)