version 1.0-23
-
st_as_sf.data.frame()setsz_rangeandm_range; https://github.com/geoarrow/geoarrow-r/issues/75
version 1.0-22
st_combine()onPOINTgeometries ignores empty points; #2551handle empty points better in
st_point(),st_as_sf.data.frame()andst_distance(); https://github.com/r-spatial/s2/issues/289for unprojected lines,
st_line_interpolate()requires distance values with degree units; #2542unique.sfc()added; #2546for geodetic coordinates,
st_perimeter()uses ellipsoidal computation ifsf_use_s2()isFALSE; #2541st_as_sf.owin()andst_as_sfc.owin()no longer ignorecrsargument; #2532clarify approximation errors in
st_buffer()and how they differ for the GEOS or S2 backends, with examples by David Kaplan @dmkaplan2000; #2528
version 1.0-21
CRAN release: 2025-05-15
st_crs(..., parameters = TRUE)returns base geographic CRS asgcs_crs; #2524loading
sfno longer initializes the RNG state; see https://github.com/r-quantities/units/issues/409fix
st_sample()on geodetic coordinates; #2515use
compareVersion()consistently to compare GDAL versions; #2512
version 1.0-20
CRAN release: 2025-03-24
st_buffer()on geodetic coordinates with negative buffer distance now automatically switches to using GEOS, while giving a warning; #1987st_interpolate_aw()fixes bug when a GEOMETRYCOLLECTION contains multiple POLYGON structures; found by @mtennekesst_buffer()for geodetic coordinates allowsmax_distandmin_levelto be specified by feature; #2488 and https://github.com/r-spatial/s2/pull/264distinct.sf()allows for comparing exact equality of geometries whenexact = TRUE; #2484st_minimum_bounding_circle()returns geometries representing the smallest circle that contains the input; #2473
version 1.0-19
CRAN release: 2024-11-05
fix type checks in C++ GDAL area and length computation functions, anticipating GDAL 3.10.0; #2466, #2468, #2469 by @rsbivand and @rouault
improve test on empty geometries, which changed in 1.0-18; #2463
gdal_utils()ogrinfohas an argumentread_onlywhich, whenTRUE(oroptionsincludes"-ro"), opens a datasource in read-only mode (#2460;sfdid this before 1.0-17); by default a datasource is opened in update (read-write) mode (since sf 1.0-17; #2420)the
sf->pppconversionas.ppp.sf()accepts a data.frame of marks instead of just 1 column #2450, by @agila5add flag for preservation of point order in
st_voronoi#1371 for GEOS >= 3.12
version 1.0-18
CRAN release: 2024-10-11
support
POLYGON FULLsimple feature geometry, representing the entire Earth surface, as used bys2geometry; see also https://r-spatial.org/r/2024/10/11/polygonfull.html for a longer introduction; #2441st_sfc()has an argumentorientedwhich, when set toTRUE, adds an attributeoriented=TRUEto ansfcobject, indicating that this object should not be reoriented in conversion tos2_geography(avoiding using the global options2_oriented);st_as_sfc.bbox()sets this toTRUE; #2441fix build failure with GDAL < 3.4.0 #2436
st_simplify()now accepts feature-wise tolerance values whens2is switched on #2442
version 1.0-17
CRAN release: 2024-09-06
add
st_transform()method forbboxobjects; this uses OGRCoordinateTransformation::TransformBounds(), densifying first and antemeridian proof; #2415st_filter.sf()correctly scopesxandyarguments using !! operator; #2416[.sfcand[<-.sfcuse matrix/array type subsetting forsfcobjects that have adimattributeadd
st_exterior_ring()to extract exterior rings (remove holes); #2406add
text.sf(),text.sfc(),points.sf(),points.sfc()to annotate base plots at geometry centroids; #2399st_layers()returns an object of classc("sf_layers", "data.frame"), with a dedicatedprintmethod.when
dimis notXYZM,sf_as_sf.data.frame()interprets a length 4coordsargument to specify the corners of a rectangular polygon; #2357st_interpolate_aw()gains anna.rmargument, for removing features withNAattributes before interpolating; #830merge.sf()no longer renames geometry column; #2334
version 1.0-16
CRAN release: 2024-03-24
st_sample()works when unprojected polygon geometry crosses the antemeridian; #2331clean up and modernization of S3 registration of methods and tests; #2285, #2288, #2316, #2341, #2342, by @olivroy
[.sfcworks when setting argumentop; #2320st_sample()for polygons is sensitive to settingoriented = TRUEto prevent wrongly correcting ring directions; #2308add support for the GDAL
footprintutility (requiring GDAL >= 3.8.0) togdal_utils; #2305, by @goergen95existing environment variables
PROJ_LIBandPROJ_DATAare (again) ignored onsfbinary CRAN installations (win + macos), effectively by overwriting them during the R session and restoring them on exit; this does not happen if environment variableR_SF_USE_PROJ_DATAis set totrue. #2298add
st_line_project()to find how far a point is when projected on a line; #2291add
st_line_interpolate()to obtain a point at a certain distance along a line; #2291
version 1.0-15
CRAN release: 2023-12-18
add
st_perimeter()generic to cover both geographic and projected coordinates; #268, #2279, by @JosiahParryadd
st_sample()method forbbox, with special provisions for ellipsoidal coordinates; #2283st_convex_hull()usess2::s2_convex_hull()for geodetic coordinates; #2250add
directedargument tost_line_merge(); #2264st_union.sfc()givenxandyworks consistently across geodetic and projected objects; #2262st_union.sf()givenxandyunions pairwise ifby_feature = TRUE; #2259st_read()work around issue with GPKG driver ifwkt_filteris set; #2248st_read()uses GDAL’s stream reading whenuse_stream = TRUE; #2238 by @paleolimbotst_transform()responds to in-session changes tosf_proj_network(); #2166plot.sf():key.widthis sensitive to pointsize graphics parameterpar("ps"); keys with factor levels suggest a proper size if they won’t fit.plot.sf():key.poscan hold a second value in [0, 1] determining the relative position of the key in the available space[<-.sffixes theagrattribute when it is broken; #2211if the env. variable
ADD_SF_NAMESPACEis set totrue,sfobjects get a new attribute,.sf_namespace, which forces loading thesfnamespace when it has not been loaded so far, e.g. for proper printing or plotting of ansfobject; #2212 by Mike Mahoneydistinct.sf()is type-safe forsfobjects with zero rows; #2204summarise.sf()raises an error if.byis given but noacross()on the geometry; #2207st_write()matches fields on name first, than on position; this matters for formats that have pre-defined names, such as GPX; #2202
version 1.0-13
CRAN release: 2023-05-24
gdal_utils()adds"ogrinfo"utility (requires GDAL >= 3.7.0); #2160st_as_sf()catches errors when setting invalid crs values, raised by Jon Skøienadd
rename_with.sf()method; #1472use GEOS’ overlayNG routines for (GEOS) Intersection, Difference, Union and SymDifference; #2143
select.sf()allows selecting the same column twice under different names; #1886st_as_sf.ppplist()is deprecated; #1926don’t repeat longlat messages in
summarise.sf(); #1519fix random sampling on the sphere; #2133
version 1.0-12
CRAN release: 2023-03-19
update NAMESPACE to
useDynLib(sf, .registration=TRUE); #2127 thanks to @eddelbuettelfix call in
gdal_addo(); #2124fix issues that came up with older GDAL version, use
GDAL_VERSION_NUMconsistently; #2123 #2121 #2119
version 1.0-11
CRAN release: 2023-03-15
st_make_grid()also accepts area units forcellsize, for square and hexagonal grids; #1505add
st_concave_hull(), for concave hulls, if GEOS >= 3.11.0; #1964add
st_triangulate_constrained(), for constrained Delaunay triangulation, if GEOS >= 3.10.0; #1964clean up the retrieval of length or angle units from WKT representations; https://lists.osgeo.org/pipermail/gdal-dev/2023-March/056994.html
conversion to GEOS uses the
GEOS_PREC_VALID_OUTPUTflag, which makes sure that the “[o]utput is always valid. Collapsed geometry elements (including both polygons and lines) are removed.”
version 1.0-10
CRAN release: 2023-03-12
gdal_utils()has aconfig_optionsargument to set further GDAL options, just likest_write(); #2003fix slow writing of logical vectors in
st_write(); #1409; #1689st_drivers()has an argumentregexto filter on driver (long) name; #2090drop C++11 as a system requirement
c.sfc()(and, consequently,dplyr::bind_rows()) gives an error if components have different CRS; #1884data imported from
mapsare associated with the Clark 1866 ellipsoid; #2080fix importing legacy
SpatialPolygonobjects without comments; #2063, #2069, https://github.com/rstudio/leaflet/issues/833st_read()no longer errors on mixes ofXYandXYZgeometries; #2046 #1592in
plot.sf(), when numericbreaksare given a legend key is always plotted; #2065st_crs()$axesreturns adata.framewith axes properties (name, orientation, conversion factor) when GDAL >= 3.0.0clean up unit handling for geometry measures (length, area, distance) and crs;
st_crs(x)$ud_unitreturnsNULLif units are unknown; #2049st_write()substitutes anNAcrs withENGCRS["Undefined Cartesian SRS with unknown unit"]; #2049, #2054st_can_transform()checks whether a transformation between two crs exists; see https://github.com/dieghernan/tidyterra/issues/64; #2049the matrix returned by
st_coordinates()has no row names, to reduce output size
version 1.0-9
CRAN release: 2022-11-08
adjust for changes how R-devel handles
POSIXlt; #2028add
st_break_antimeridian(); #1983, #1991 by Roger Bivandadd
Fibonaccias a spatial sampling type inst_sample()use the global
options("sf_use_s2")to determine whether to use s2, rather than a value in a local environment; #1977fix utils
mdiminfoandmdimtranslateingdal_utils()extend arguments of
gdal_read_mdim()needed bystars::read_mdim()ifstars>= 0.5-7; addgdal_write_mdim()
version 1.0-8
CRAN release: 2022-07-14
st_drop_geometry.default()returnsxunmodified;sf_project()accepts 3- or 4-column matrices, containing z and t values;optimization for
st_sfc()by @paleolimbot; #1938, #1925[<-.sfc()recomputes the bounding box;st_sfc()gets parametercompute_bbox; #1965add new algorithm and drop option to
st_make_valid()when using GEOS and GEOS >= 3.10.1; #1655add
st_minimum_rotated_rectangle(), available when GEOS >= 3.9.0; #1953fix
st_sample()withtype = "hexagonal"for corner case (n=1), add aprogressargument for a progress bar; #1945add package
pbapplyto Suggests; #1945add pdf driver to windows build; #1942
clarify
pipelineargument inst_transform()when axis order is ambiguous; #1934handle argument
xpdin calls toplot.sfc_POLYGON()andplot.sfc_MULTIPOLYGON()add
pivot_wider()method, by Henning Teickner; #1915add
gdal_addo()to add or remove overviews from raster images; #1921st_layers()returnscrsof each layer in acrslist ofcrsobjectsrestore
st_graticule()behaviour to pre-sf 1.0-0; https://github.com/tidyverse/ggplot2/issues/4571gdal_metadata()sets metadata item names properlyst_read()gains an argumentoptionalpassed on toas.data.frameto avoid changing column names; #1916unnecessary coordinate names are not returned in
st_sample(), making the output size smaller; #1879
version 1.0-7
CRAN release: 2022-03-07
st_drop_geometry()is a generic; #1914st_crs(x)$ud_unitreturns the unit of the coordinate reference system ofxgeometric predicates return
sgbpobjects omitting self-intersections etc. by passingremove_self = TRUEand unique symmetric relationship by passingretain_unique = TRUE(to...if needed); this simplifies identifying (and removing) duplicated geometries; duplicates are identified by e.g. byst_equals(x, retain_unique = TRUE) |> unlist() |> unique(); #1893fix compile issue against GDAL < 2.5.0 introduced in 1.0-6; #1899
version 1.0-6
CRAN release: 2022-02-04
adapt to new
spatstat.randompackage; #1892st_geometry<-()also allows to rename a geometry column in ansfobject; #1890for
sfobjects, thest_as_sfc()method is an alias forst_geometry(); #1882st_make_grid()speeded up; #1579 thanks to Krzysztof Dybaremove direct and indirect dependencies on
rgeosandrgdal; #1869use
stats::distrather than GEOS for symmetric point-point Euclidian distance computation; #1874
version 1.0-5
CRAN release: 2021-12-17
package startup message reports status of
sf_use_s2(); #1782sf_use_s2()usesmessage()to report a change; #1782st_sample()using regular sampling for ellipsoidal coordinates “works” as if coordinates were Cartesian; #1837
version 1.0-4
CRAN release: 2021-11-14
new function
st_delete()deletes a data source, or layer(s) within a data source; #1828fix memory leak in
WKT1_ESRIretrieval; #1690
version 1.0-3
CRAN release: 2021-10-07
cope with how GEOS >= 3.10.0 handles illegal geometries (e.g., non-closed rings); #1807
crsobjects have a$sridmethod to extract the SRID (as authority “name:code”); #1804st_as_grob()methods forsfc_*objects correctly handle empty geometries; #1789 with help from Hiroaki Yutaniwhen writing objects with
NAas CRS to GeoPackage, assign “Unknown Cartesian CRS” first - this is in line with using Cartesian geometry operations for objects withNAas CRS; #1776add coerce method from
sgbptosparseMatrix; #1750fix
st_cast()forGEOMETRYCOLLECTIONScontaining empty geometries; #1767fix
st_is_valid()for bogus polygons and projected coordinates; #1666, #1760; #1761
version 1.0-2
CRAN release: 2021-07-26
st_read()andst_write()using GDAL handle binary attributes (OFTBinary fields) ; #1721a
pivot_longermethod is added forsfobjects (thedata.framemethod works, but raises a warning)rbind.sfpreserves primary geometry column; #1717configureconstrains using--statictoDarwinplatform; #1702, #1712, #1713old-style
crsobjects created with sf < 0.9-0 generate a message, and will cause a warning in the future.when
st_crs()is called with a WKT2 as text input, itsinputfield will be replaced with the CRS name (if it has one).GEOS (>= 3.9.0) operations use
GEOSGeom_setPrecision_rto set precision of geometries; #1535st_read()with specifiedqueryignores argumentlayers, and warns if it is given; #1444
version 1.0-1
CRAN release: 2021-06-29
fix regression in
st_intersection(): when using s2 attributes were assigned wrongly; #1704crs(sf) toCRS(sp) conversion no longer needs validation byrgdal; https://github.com/edzer/sp/issues/107retrieve ESRI’s WKT version of CRS by
st_crs(id)$WKT1_ESRI; #1690
version 1.0-0
CRAN release: 2021-06-09
add
s2to Imports:add Dewey Dunnington to contributors
sf_use_s2()prints a message when using s2 has been switched to on or off.use
s2spherical geometry as default when coordinates are ellipsoidal. This can be switched off (defaulting to planar geometry, using GEOS, as in sf < 1.0-0) by setting environment variable_SF_USE_S2tofalsebefore packagesfis loaded, or bysf_use_s2(FALSE); #1649st_nearest_feature()with missingyreturns nearest features in the remaining set ofx; https://github.com/r-spatial/s2/issues/111st_write()gains an argumentconfig_optionsto set GDAL config options; #1618fix regression in
sf_project(..., keep = TRUE); #1635
version 0.9-8
CRAN release: 2021-03-17
add
st_as_sf()method for terra’sSpatVectorclass; #1567distinct.sf()works by default on all variables, and keeps active geometry active; #1613improve (fix?) polygonize/contour code; #1608
sf_proj_network()reports whether PROJ uses network (CDN) grids, can switch it on or off, and can set the CDN url.st_write()returns obj, invisibly; #1597fix regression in n-ary
st_intersection(), #1595, introduced at #1549st_inscribed_circle()computes the maximum inscribed circle for polygons (requires GEOS >= 3.9.0)allow to
st_cast()from COMPOUNDCURVE, MULTISURFACE or CURVEPOLYGON to GEOMETRYCOLLECTION, and back; #1573Fixed a bug in
st_as_grob()when plotting a mix of MULTI and non-MULTI geometries of the same base type
version 0.9-7
CRAN release: 2021-01-06
n-ary
st_intersection()skips failing geometries, rather than returning an error; #1549use
s2_centroid()for geographical coordinates ifsf_use_s2()isTRUE.st_as_text()method forcrsobjects can return projjson (if GDAL >= 3.1.0 and PROJ > 6.2.0)st_transform()no longer warns on conversions like"+proj=ob_tran +o_proj=longlat +o_lat_p=45 +o_lon_p=30"st_as_wkb()takessridfromwktfield ofcrswheninputfield doesn’t contain it; #1490plot.sf()addskey.pos=0option to run the logic behind the key without plotting it; #1487fix bug in
select.sf()when selected variables were renamed; #1483st_as_sf.stars(..., merge = TRUE)now works if CRS isNA; #1389add (dynamically loaded)
as_wkb()methods forsf,sfcandsfg, makingst_as_s2()unnecessaryst_as_s2()transforms non-longlat objects to EPSG:4326 first
version 0.9-6
CRAN release: 2020-09-13
gdal_utils()print (GDAL-style) progress bar ifquiet = FALSE(except forinfoandmdiminfo)fix
CPL_gdal_warperfor multi bands; https://github.com/r-spatial/stars/issues/320sf_proj_search_paths()retrieves and sets the proj search path (if GDAL > 3.0.3)when loading sf,
sf_use_s2()is set toFALSEunless environment variable_SF_USE_S2equalstrue(this changes toTRUEin sf 1.0-0)resolve GDAL/PROJ version vulnerabilities in CRS-crs conversion; #1479
st_sample()gains an argument,by_polygon, to more clevery sampleMULTIPOLYGONgeometries; #1480st_sample()accepts non-integer sample sizes, with a (suppressable) warning and handles values of sizes that would round to zero; #1480gdal_utils()adds utilsmdiminfoandmdimtranslate(requires GDAL >= 3.1)st_union()gains an argumentis_coverage, which, when set toTRUE, leads to much faster unioning in case features form a coverage (polygons don’t overlap); #1462 by Don Bastonfix
gdal_utils("translate")locking input file; #1452st_make_grid()no longer selects cells intersecting withx; #1447use
s2::s2_dwithin_matrix()inst_is_within_distance(); #1367
version 0.9-5
CRAN release: 2020-07-14
Only when package
s2>= 1.0.1 is available: support for spherical geometry operators (predicates, transformers, measures, nearest point/feature) for geographic coordinates in packages2is now by default switched off, and can be switched on bysf_use_s2(TRUE); see https://www.r-spatial.org/r/2020/06/17/s2.html and vignette sf7. It is planned to be switched on by default in sf 1.0-0.drop Z and/or M coordinate in
st_as_s2(), with messagegeometry predicates and transformers gain an … argument to pass
s2::s2_options()dplyr::select()now ensures the geometry column sticks to the back rather than the front of the data frame; #1425dplyr::rename()now preserves the active geometry column even when it is renamed; #1431proj units query adjusted to PROJ 7.1.0 release; #1434
version 0.9-4
CRAN release: 2020-06-12
empty geom generators take care of XYZ etc dim; #1400
write_sf()andread_sf()no longer warn when reading tables without geometriesst_write()writes non-spatial tables when given a plaindata.frameortbl_df; #1345the default for
stringsAsFactorsinst_readandst_sfisFALSEfor R version >= 4.1.0the sf method for
dplyr::select()supports renaming the geometry column; #1415
version 0.9-3
CRAN release: 2020-05-04
st_is_valid()is a genericWindows CRAN binaries use GDAL 3.0.4, PROJ 6.3.1 and GEOS 3.8.0, thanks to Jeroen Ooms’ rwinlib work; #1275
plot.sf()gains anextentargument to set the extent (xlim, ylim) of the plot;extentmust be an object with anst_bbox()method, such as ansfor astarsobject; #1193
version 0.9-2
CRAN release: 2020-04-14
st_axis_order(TRUE)gives and error if GDAL has version < 2.5.0loading PROJ units
link,us_in,ind_yd,ind_ft, andind_chinto the udunits database is no longer done at package load time, but when functionsf_add_proj_units()is called.fix line sampling for small densities; #1365
sf_project()handlescrsobjects when PROJ version is below 6 using proj.4 string representations.avoid using
isFALSEinst_write(); #1342fix regression in
gdal_utils("translate", ...); #1339
version 0.9-1
CRAN release: 2020-04-06
fix an invalid read bug in
st_m_range(); #1332st_crs(4326) == st_crs("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")returnsTRUEfor GDAL >= 3.0, irrespective authority compliance of axis order; see #1331 and https://github.com/ropensci/scrubr/issues/34sf_project()has a parameterauthority_compliantto return coordinates in “visualisation order”; whenTRUEit returns coordinates in authority compliant axis order (e.g. EPSG:4326 latitude longitude); default isst_axis_order().fix test for Solaris and certain GDAL/PROJ versions
fix error reading category table through GDAL; https://github.com/r-spatial/stars/issues/245
version 0.9-0
CRAN release: 2020-03-24
see r-spatial blog post: https://www.r-spatial.org/r/2020/03/17/wkt.html
modify
crsobjects to reflect our post-proj4string world (#1146; #1225): crs objects contain two fields,inputwith the user input (if any), andwktwith a well-known-text (or WKT2) representation of the coordinate reference system.crsobjects have a$method to dynamically retrieve theepsg(integer) orproj4stringrepresentation, using e.g.x$epsg.support for PostGIS 3 using WKT and the new-style
crsobjects; #1234, #1303, #1308 by @etiennebrst_write_db()andst_read_db()are defunct. Usest_writeandst_readinstead.st_write()usesappend, replacing (and deprecating) argumentupdate;st_writefails when a layer already exists andappendhas not been set explicitly toTRUE(append) orFALSE(overwrite); #1266st_proj_info()was renamed intosf_proj_info;sf_proj_infocan get and set the PROJ data search path and use of CDN; #1277adapt to new
dplyrversion; https://github.com/tidyverse/dplyr/issues/4917st_sample()is a genericwrite
starsrasters with wkt info, rather than proj4stringswhen GEOS >= 3.8.0,
st_make_validis provided bysfrather than bylwgeom#989allow for single-sided buffers for linear geometries; #1001
add
st_reverse()methods to reverse points in a linestring (requires GEOS >= 3.7.0); #1246st_make_grid()returns grid cells or points that intersect with the target geometry, not its bounding box; #1260allow for PROJ >= 7; #1254
st_geometry_type()acceptsby_geometryargument; #1264
version 0.8-1
CRAN release: 2020-01-28
st_as_sf.map()no longer requiresmaptoolsandsp; dropped dependency on maptools.work around a bug in 6.0.0 <= PROJ < 6.3.1: replace
+init=epsg:XXXX ...strings with theXXXXEPSG integer, to work around a bug in PROJ; see https://github.com/OSGeo/PROJ/pull/1875 and links therein. If...arguments are present, raise a warning that these are ignored.st_as_sf.map()no longer requiresmaptoolsandsp; drop dependency on maptools.conversion between
spatstatclassesowin,pppandpspandsfclasses no longer usemaptools; #1204gdal_utils()processes open options-ooand-dooproperly; https://github.com/ITSLeeds/geofabric/issues/12st_sample()directly interfacesspatstatsampling methods, e.g.type = "Thomas"callsspatstat::rThomasafter converting input arguments (window) and converts returnedpppobject tosf’sPOINTgeometries; #1204 with help from Ege Rubak and Jakub Nowosadsf_project()gains an optionkeep = TRUEto returnInfvalues for points not projectable; #1228support
vctrsmethods for geometry list columns; this makesunnestwork again (#1172); #1196 by Lionel Henryst_as_sf.pq_geometry()converts binary geom columns from RPostgres::dbGetQuery; #1195st_read()gains a parameterwkt_filterfor spatially filtering the features to be read; #1192st_area()andst_length()handle+to_meterargument in PROJ strings; #1170add
st_filter()generic for filtering on spatial features only; #1148new method
st_shift_longitude()to re-center data for a Pacific view. #1218output of
st_as_text()withMULTIPOINThas nested parentheses around points. E.g.,MULTIPOINT ((0 0), (1 1))instead ofMULTIPOINT (0 0, 1 1); #1219, #1221
version 0.8-0
CRAN release: 2019-09-17
fix tests for PROJ 6.2.0 not accepting +units=
fixes for tidyr 1.0-0 release; attempt to port
nest.sf()andunnest.sf(); #1068, #1145gdal_utils()better closes connections after use; #1143st_write()gains adriversoptions, to limit the drivers attempted; #1142rather than replacing,
st_write()andwrite_sf()append to an existing layer ifupdate=TRUE; #1126improve plotting of
POSIXctandDateattributes (Daterequiring classInt >= 0.4-2)NULLgeometries read by GDAL are returned as empty geometries; #1119gdal_utils('rasterize', ...)accepts non-existing destinations, defined by e.g. resolution and extent options (see #1116 for an example), and overwrites if needed (see #1136 for an example)add Dan Baston as contributor; #1120 and many others
in addition to
NULL,st_sfc()also convertsNAvalues into empty geometries; #1114.st_join()is a generic
version 0.7-7
CRAN release: 2019-07-24
plot()handlesPOSIXctvalues in legendconstructor functions like
st_linestring()check and break onNAcoordinates; #1101, #1102
version 0.7-6
CRAN release: 2019-07-05
- have examples of
st_writewrite only to the temporary R session directory
version 0.7-5
CRAN release: 2019-07-03
as(x, "Spatial")gives a proper error message on empty geometries; #1093st_nearest_*functions warn in case they are used with geographic coordinates; #1081st_union()no longer segfaults on zero rowsfobjects; #1077st_transform()no longer breaks on zero rowsfobjects; #1075when PROJ >= 6.1.0 is available and sf comes with datum files (as is the case with statically linked Windows and OSX CRAN binaries),
PROJ_LIBis no longer temporarily overwritten, but the PROJ C api is used to set the datum path; #1074, suggested by Jeroen Oomssf compiles against GDAL 3.x and PROJ 6.1.0, using the new
proj.hinterface; #1070st_distance()returnsNAfor empty geometries, rather than 0; #1055
version 0.7-4
CRAN release: 2019-04-25
add example on how voronoi polygons can be tied back to the points they contain; #1030
st_difference(x, y), withxansfcwith zero feature geometries, returnsx; #1024don’t reset (base) plot device when
add = TRUE==and!=returnNAwhen one of the operands is an empty geometry; #1013st_intersects()is a genericdrop requiring
proj_api.hin favor ofproj.h, this enables compatibility to PROJ 6.0.0 and GDAL 2.5.0-dev; #988fix regression in binary predicates introduced in #855; #999 reported by Barry Rowlingson
fix bug in
gdal_utilsutilwarperon certain GDAL/OS combinations; https://github.com/r-spatial/stars/issues/117c.sfc()ignores the type (class) of emptysfcobjects when choosing the result type; #985, #982rename the default value for
distanceto"Euclidean", rather than"distance"inst_distance()
version 0.7-3
CRAN release: 2019-02-21
add argument
exacttost_sample(), defaulting toFALSE; #896fixed n-ary
st_difference()for cases where geometries are entirely contained in others; #975, by Jonathan Marshallfaster
Ops.sfc(), addedst_normalize(); #973 by Thomas Lin Pedersennew grob constructor for sfc objects; #971 by Thomas Lin Pedersen; add Thomas as contributor
add
group_split()andgroup_map()methods forsfobjects (experimental); #969make
st_interpolate_aw()a generic;argument
colforplotofGEOMETRYsfc’s isNA(open) for (multi) polygon geometries
version 0.7-2
CRAN release: 2018-12-20
feature IDs are no longer returned as names on the geometry list column, but optionally returned by
st_readas attribute column; #812when plotting multiple attributes, plot.sf adds a (single, common) key if
key.posis setprecision can be specified in distance units; #901
support log-scale in color legend by setting
logztoTRUEinplot.sfst_intersects()etc. will prepareywhenyis polygons andxis points; #885 by Dan Bastonst_write()(andwrite_sf()) returns its first argument, invisibly; #889
version 0.7-1
CRAN release: 2018-10-24
- fix bug that broke n-ary
st_intersection()on platforms using clang; #867
version 0.7-0
CRAN release: 2018-10-17
adds several interfaces to GDAL functions, meant to be used by package
starsst_read()receives aqueryargument that can run queries against OGR datasets; #834, by Barry Rowlingson and Michael Sumnerread_sf()no longer first creates tibbles fromdata.frames, but creates them directly; #853, db propagation by Etienne Racinecheck difference between compile-time and run-time GEOS versions; #844
all GEOS routines are (more) robust against memory leaks, by using unique pointers; #822, #845, by Dan Baston
st_buffer()receives the buffer stylesendCapStyle,joinStyleandmitreLimit; #833, #842 by Michael Sumner
version 0.6-4
st_area()is a generic; https://github.com/r-spatial/stars/issues/32st_write()resolves~correctly; #456read and write feature IDs as sfc list column names; #812
st_centroid()works for empty geometries, returning an empty point #769add
st_nearest_points(), to obtain the (LINESTRINGconnecting the) two nearest points for pairs of geometries; #788add hexagonal tiling to
st_make_grid()add regular and hexagonal sampling to
st_sample()fixes for PROJ 5.0.1; #545
fixes for GDAL 2.3.0; #759
st_sample()supports regular sampling ofLINESTRING; #725 by @statnmapSupport reading and writing of database
Poolobjects; #756fix plotting of
sfobjects without attributes; #755add reference to the R Journal article in CITATION
version 0.6-3
CRAN release: 2018-05-17
move dependency
RPostgreSQLfrom Imports: back to Suggests:st_centroid.sf()andst_point_on_surface.sfalso warn if attributes are not constant over geometries.summarise()allows the user to define geometries for summaries; #714, by Kirill Muellerplot.sf()emits a warning ifcoldoes not have length 1 ornrow(x), and requirespal(rather thancol) to set a palette for factors.plot.sf()provides control over legend keys usingkey.lengthandkey.width, decrease default key length; #731sgbpobjects receive anas.data.framemethod; #715
version 0.6-2
CRAN release: 2018-04-25
GDAL read/write supports logical variables; #722
add
st_crop()to simplify cropping objects with a rectangular area; #720fix bug in
[<-when columns are added to ansfobject; #718use dynamic registration of S3 methods, similar to how hms does this; #710 by Kirill Mueller
(partially) address writing GPKG to network drive, writing to temp file first; #628
add Kirill Mueller as contributor
st_make_grid()is faster; #708, by Dan Bastonst_read()andst_write()are generic, with methods for directly reading from and writing to database connections;st_read_dbandst_write_dbare deprecated; #558, thanks to Etienne Racine @etiennebrPackage
RPostgreSQLmoved from Suggests to Importsrestore compatibility with GDAL 2.0.x versions (which won’t have
gdal_utils); #686read_sf()can also read tables without geometry; #684, by Andy Teucher
version 0.6-1
CRAN release: 2018-03-22
method
distinct()works; #669, #672+,-,*and/for pairs of geometries (sfg,sfc) return geometric union, difference, intersection and symmetric difference, respectively.st_cast()fromMULTIPOLYGONtoMULTILINESTRINGshould work properly; #660all Rcpp interfaces needed by package
starshave been moved intosf; pkgstarsis R-only, and onlysfneeds linking to GDAL.gdal_utils()interfaces the 9 gdal utils using the C++ APIimprove resetting (base) plots; add
reset = FALSEin a call toplotto enable adding to plots that have a legendst_read()returns adata.framewhen a table contains no geometries, rather than giving an error; it does emit a warning in this case. See https://stat.ethz.ch/pipermail/r-sig-geo/2018-February/026344.htmlmove
pillarfromImports:toSuggests:update to the new rwinlib distribution of gdal (adds JPG2000); #639
speed up computation of centroids for largest polygon; #623
add
st_as_sfc.rawmethodBugfix: binary operations (
st_intersection,st_difference, etc) no longer fail when operating on data frames of class"tbl_df"with common column names; #644
version 0.6-0
CRAN release: 2018-01-06
add
pillarto Imports: to provide method for printing WKT geometries in tibblesst_as_text, and subsequentlyformatandprint, use argumentdigits(oroptions(digits = n)) to control the number of digits used for printing coordinates; default isoptions("digits"), which is typically 7.st_is_within_distanceworks with geographic coordinatesst_castfromMULTIPOLYGONtoMULTILINESTRINGno longer changes the number of features/feature geometries, but conversion fromMULTIPOLYGONtoLINESTRING(typically) does; #596st_distancefor long/lat geographic coordinates useslwgeom, accepting all geometry types; argumentdist_funis deprecated as a consequence, and distance calculations are different from those in sf versions 0.5-5 or earlier; #593add package
lwgeomto Suggests;st_area,st_length,st_distance,st_segmentizefor long/lat CRS use packagelwgeominstead ofgeosphere; #593st_lengthreturns zero for polygon-type geometries; #593if present, add units of attribute to default plot title; #591
add
unnestmethod, which depends ontidyr> 0.7-2; #570 PR by @karldwadd
largestoption tost_jointo get largest intersection match only; #547, by @tiernanmartinchange default maximum number of feature to print to 10, controllable by
options(sf_max_print); #556add
Hausdorff(andFrechetfor those with GEOS 3.7.0) as options tost_distance; addparfor densified versionsadd
st_snap, for snapping geometries to other geometries, within a tolerancemake
st_wrap_datelinea generic, with methods forsf,sfcandsfg; #541plot.sfandst_as_grob(used by ggplot2) are robust against misspecified ring directions (holes that have the same direction as the exterior rings), by usingrule = "evenodd"; #540functions depending on
liblwgeom(st_make_valid,st_geohash,st_plit) have been moved to their own package, https://github.com/r-spatial/lwgeom; argumentuse_gdalofst_transformhas been deprecated, instead one can uselwgeom::st_transform_proj; sf no longer tries to link to liblwgeom; #509, #537, #487st_read,st_sfandst_sfcgain a parametercheck_ring_dir(default:FALSE) that checks ring directions and corrects to: exterior counter clockwise, holes clockwise, when seen from above.get rid of
classInt::classIntervalswarning if number of unique values is smaller than the number of breaks asked for
version 0.5-5
CRAN release: 2017-10-31
have
classIntin Imports:, to not break other package checksadd vignettes 5: plotting sf objects and 6: miscellaneous; #324
add (default) color key to
plot.sfif single map is plotted, contributed by @hughjonesd; #528st_as_sfccan read EWKT; #530argument
max.plottakes its default fromoptions(sf_max.plot=n), if present; #516plot.sfgets an argumentspalto specify a color palette function; #526plot.sfgets argumentsbreaksandnbreaks; add support forclassInt::classIntervalsstyles for finding class intervals (usingbreaks)add
st_as_sfmethods forppp,lppandpspobjects from spatstat.allow for direct route to proj.4 ignoring GDAL (requiring liblwgeom); #509, #511
add
printmethod forcrsobjects; #517sf_extSoftVersionreveals whether GDAL was linked to GEOS; #510better check input of
st_polygon; #514add
st_node, similar torgeos::gNodesupport for reading
OFTInteger64Listfields; #508sparse geometric binary predicate lists have a class,
sgbp, and attributesregion.idandpredicate; #234, #524prevent
st_splitfrom stopping the R session; #492st_intersection,st_unionand so on also print a message when used directly on long/lat coordinates; #496add
repmethod forsfcobjectscomparing two
crsobjects uses the GDAL functionIsSame; #180add
st_collection_extract, which, given an object with geometries of typeGEOMETRYorGEOMETRYCOLLECTION, returns an object consisting only of elements of the specified type; by Andy Teucher, #482st_writeexports GeoJSON with UTF-8 encoding on Windows; #444move package methods from Imports: to Depends: ; #478
deal better with precision setting and propagation; #476
fix bug in
st_layersin case layers have no geometry; #334clarify argument
envelopeinst_voronoi; #474change aggregate to make it return the same geometry as ‘by’, padding attributes with NA where needed; #453
version 0.5-4
CRAN release: 2017-08-28
fix compatibility problems introduced by
tidyr0.7-0 using rlang magicconvert path names to UTF-8 in
st_read,st_writeandst_layers; #471st_sfcconvertsNULLvalues into empty geometries, and correctly identifies emptyPOINTs; #466, #463st_writeabbreviates column names if driver isESRI Shapefile; #464add
of_largest_polygonargument tost_centroid, to get the centroid of the largest polygon; #450fix use of
st_relateas join predicate forst_join; #454fix bug where
st_intersectswith empty second argument would crash; #458produce better WKT; #463
change
st_readSRS assignment logic; corrects reading projected geojson with gdal 2.2.0; #449st_intersectionetc. ontblalso returntbl; #448[.sfpreserves class, e.g. oftbl; #448
version 0.5-3
CRAN release: 2017-07-30
support and propagate all Proj.4 +units=xx length units; #446
allow for arith ops on empty
sfcobjectshave
st_graticulereturn an empty graticule object when argumentdatumisNA;export
as_Spatial, to make it easier for packages to convertsfcobjects without importingsfst_distancegains a parameterby_elementto obtain pairwise distances; #437add the ability to
aggregateusing a simple featurebyargument; #429make the
opargument to[.sfworkspeed up
st_coordinatesforPOINTgeometries; #433fix performance regression for
st_bbox; #418correct bug in
st_union,st_differenceandst_sym_differenceintroduced in 0.5-2; #431inform gdal about the CRS always through the proj4string, never through the epsg; see #424
properly deal with kilometre units; #424 (fixed by Karl Dunkle Werner)
add
st_is_within_distance, only to return a sparse index matrix; #419have
st_graticulework with world2 (0,360); #421, #422, fixed by Ben Bestst_graticuleto return graticules in native crs; https://github.com/tidyverse/ggplot2/issues/2200 (WIP)st_graticuleto support data inNA_crs_; https://github.com/tidyverse/ggplot2/issues/2199fix bug when joining an sf-tibble with a
tibble; #414read gdal
StringList,RealList, andIntegerListfields into a list-column; #416
version 0.5-2
CRAN release: 2017-07-12
made ready for rwinlib/gdal2; #408
make
[.sffor selections includingNAvalues likex[c(1,NA,2)]; #403add a
[<-method forsfcobjects; automatically replacesNULLwith an empty geometry; #411add
st_point_on_surface()to return a point that is guaranteed to be on the surface (standard compliance)read_sfreturns an sf-tibble, an object of classc("sf", "tbl_df", "tbl", "data.frame")work around for
dplyr::filternot dispatching geometry column subsetting tosf::[.sfcallow
unitsobject asdistargument tost_buffer; these must be convertable toarc_degreefor geographic, and to a length unit for non-geographic data; #399prevent gdal from crashing when trying to
st_transforman empty geometry; #398add
st_as_sfcmethod forbbox, returning the bbox polygon; #377strip file name extension from default layer name in
st_write; #392have
st_sfreplaceNULLvalues in ansfclist-column with the appropriate empty geometry; #372allow setting
ndiscrthroughggplot2::coords_sfto improve graticule plotting ingeom_sf; #396
version 0.5-1
CRAN release: 2017-06-23
add spatial indexes to most binary geometry operations; #394 and http://r-spatial.org/r/2017/06/22/spatial-index.html
drastically reduce memory footprint of
st_intersectionand similar; #394support RSQLite 2.0 by providing an
st_as_sfcmethod for list columns of classblobdrop dependency on dbplyr
version 0.5-0
CRAN release: 2017-06-15
better handle empty/NULL geometries in shapefiles; #351
add
unite_.sfmethoddeprecate
FUNargument tost_join; #376improve graticule tic label placement in
ggplot2; #375 and https://github.com/tidyverse/ggplot2/issues/2119improve
configurelogic to deal with libraries installed in custom locations; #335fix bug where
geom_sfwouldn’t deal with Z and/or M geoms; #373return more conveniently typed empty geoms; #372
fix subsetting with
[ofsfusingdrop = TRUE, #370in addition to
m, allowradunits tost_segmentizeadd example how to
st_readGeoJSON from a string; #185add
separate_.sfmethodadd
st_splitto split geometries (only available if compiled against liblwgeom), #359fix bug reading and writing dates (months 1 off): #358
[.sf and [.sfc also select on i when i is an
sfgobject, and accept a geometric predicate function with optional arguments; #352on reading through GDAL, empty (NULL) geometries no longer result in an error; on creation, they no longer automatically give a
GEOMETRYobject; #351on plotting with
ggplot2::geom_sf, empty geometries no longer break; grid functions returnnullGrob()for them; #351arith operations on empty geometries no longer break or give warnings; #351
have
st_as_sf.data.frameby default break onNAvalues in coordinates; #342have
st_joinaccept further arguments, to be passed on to thejoinfunction (e.g. a pattern forst_relate)have WKB reader throw an error on (some) malformed inputs, and check for buffer bounds
version 0.4-3
CRAN release: 2017-05-15
back-port
do_unionargument to dplyr <= 0.5.0, using lazyevalall strings returned from OGR/GDAL get encoding set to
UTF-8, making them work on non-UTF-8 platforms; #5$.crsretrieves proj4string components, such asst_crs(4326)$datumin addition toepsgandproj4stringlet
st_geohashreturn geohash for (average) points (only when sf was linked to liblwgeom)
version 0.4-2
CRAN release: 2017-05-05
summarise.sfalways returns ansfobject, also for global (non-grouped) summaries.summarise.sfgains an argumentdo_unionwhich determines whether to union the geometries for which a summary is given, or tost_combinethem (not resolving boundaries); #331rename argument
unionofaggregate.sfintodo_union, for consistency withsummarise; #331add a
nest_method forsfobjectsst_relategets apatternparameter, same asrgeos::gRelate; add examples to get rook and queen neighbour lists using this; #234support for direct reading of spatialite and sqlite geometry wkb blobs
build proper support for
cbindandrbindmethods forsf, which work (as documented) when all arguments are of classsf;dplyr::bind_colsorst_sf(data.frame(sf, df))work for bindingdata.frames to ansfobject.st_segmentize()andst_line_sample()accept units argumentsdocument problem reading shapefiles from USB drives on OSX; #252
improve docs of
st_is_validandst_make_valid; #296coercing
sftodata.frameworks better; #298st_line_samplegains argumentsampleto specify the points t.b. sampled; #299 #300 thanks to @joethorleywrite GDAL fields by name, not by number, fixing a KML problem #308
st_writegains argumentsdelete_layeranddelete_dsnto allow overwrite capability #307 #274write_sfdefaults todelete_layer=TRUE, silently overwriting layers if they’re already presentreplace
st_write_dbwith a version that is fast for large datasets (#285), thanks to Josh Londontake out more memory leaking examples in tests
the
aggregatemethod forsfobjects assumes thebyargument to be identical to that ofstats::aggregatest_wrap_datelinewraps (cuts up) geometries crossing the antimeridian, such that they no longer cross it.
version 0.4-1
CRAN release: 2017-03-28
restore 3.3.0 and c++11 requirement
st_readrespects time that is read as UTCst_writewrites time always as UTC, since GDAL does not have a mechanism to define local timezones other than “unknown” or “local”st_lengthworks for POINT and MULTIPOINT (returning 0); POLYGON and MULTIPOLYGON are converted to MULTILINESTRING before computing length, thus giving polygon perimeter (#268)st_writehasupdatedepend on driver; for databases, the default isTRUE, otherwiseFALSE(it refers to update of the database, and not to overwriting the table in the database, this will by default not succeed); #274st_readsupports reading objects with multiple geometry columns #257 #255support writing (exporting) objects with non-standard columns, such as
unitsorPOSIXlt#264catch dependencies on GEOS 3.3.5 (hence no 0.4-0 CRAN binary for MacOSX) #260
version 0.4-0
CRAN release: 2017-03-21
have
st_is_validcatch corrupt geometries too, returningNAin that case (requiring GEOS 3.5.0)add
st_make_valid, only available when sf was linked toliblwgeomadd
st_coordinatesmethod, returning coordinates matrix with indexesremove
unlist.sfgadd
as.matrix.sfg; have as.matrix.sfg add indexes to coordinatesadd
st_bind_colsmethodimprove handling features that can’t be projected
support uniform sampling over polygons on the sphere
add
st_sample, for sampling points on multipoints, linestrings, or polygonsadd
cmethod forsfcobjectsimport and export
magrittr::%>%support ggplot’ing geometrycollections
drop C++11 requirement, allowing build for older R versions
add
st_proj_info, modelled afterrgdal::projInfooverwriting datasets with
st_write()is no longer allowed;update=TRUEappends to them, permitted the driver supports appending.st_writegains an argument,update, which whenTRUEwill try to append to existing datasets (#204)added list of corresponding function for migration from sp, rgdal and rgeos to sf at https://github.com/edzer/sfr/wiki/migrating
remove deprecated
st_listrename
st_makegridtost_make_grid, andst_linemergetost_line_mergeadd NEWS.md file (#207)
faster conversion of
data.frameintoPOINTsfobject, usingst_as_sf(Michael Sumner)rbindmethod forsfobjects keeps coordinate reference system
version 0.3-4, Feb 6, 2017
CRAN release: 2017-02-06
add
st_contains_properlyspatial predicateGEOS functions (geometry operations) accept XYZ geometries (and ignore Z)
make
prepared = TRUEthe default for all geometry binary operations
version 0.3-2, Feb 4, 2017
CRAN release: 2017-02-04
add user interrupt checks in all GEOS geometry operations
make
st_graticuledo something useful for polar projectionsmake
st_graticulereturnNAlabels when labels are uselessadd
merge.sfmethods to mergesfobject anddata.frame(#193)add
st_joinfor table joins based on (user-defined) spatial predicatesadd
dplyr-style non-spatial joins forsfobjects (left_join,full_joinetc.) (#193)allow for multiple non-gathered variables (#196)
add missing meridian to
st_graticule(#198)
version 0.3-1, Jan 31, 2017
CRAN release: 2017-01-31
add
mergemethod (#193)st_graticulefor laea (#198)allow
st_bufferwith feature-dependent buffer distance (#197)have
spreadreturn ansfobject (#196)clarify
overwrite = TRUEin write docsfix
st_as_sf.map(#194)add
preparedarg to spatial binary predicates, to speed up large intersectionsadd
st_voronoiinterface (requires that lib GEOS >= 3.5.0)add
st_as_sfmethods formapobjects (library maps)add RStudio project file
have
st_bboxreturn abboxobject which has anst_crsmethodrename
st_drop_zmintost_zm, for general more handling of Z and Mallow for 3D coordinates returned, when
+proj=geocent(#172; #103)fix
NA_integer_handling in shapefiles I/O (#184)add and fix
st_agrAPI, to set and get attribute-to-geometry relationships
