diff --git a/articles/introduction.html b/articles/introduction.html index b0d5adb..5d41764 100644 --- a/articles/introduction.html +++ b/articles/introduction.html @@ -313,7 +313,7 @@

Converting to and from data frames
 address_to_sf(x = c("350 Fifth Avenue, New York, NY 10118"))
 #> Passing 1 address to the Nominatim single address geocoder
-#> Query completed in: 1.2 seconds
+#> Query completed in: 1.4 seconds
 #> Simple feature collection with 1 feature and 3 fields
 #> Attribute-geometry relationships: constant (3)
 #> Geometry type: POINT
diff --git a/pkgdown.yml b/pkgdown.yml
index 0fa5eec..7c0d769 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -3,7 +3,7 @@ pkgdown: 2.1.1
 pkgdown_sha: ~
 articles:
   introduction: introduction.html
-last_built: 2024-10-09T01:54Z
+last_built: 2024-10-09T04:47Z
 urls:
   reference: https://elipousson.github.io/sfext/reference
   article: https://elipousson.github.io/sfext/articles
diff --git a/reference/bind_sf_coverage.html b/reference/bind_sf_coverage.html
index 58de6a3..aa3d6c1 100644
--- a/reference/bind_sf_coverage.html
+++ b/reference/bind_sf_coverage.html
@@ -125,7 +125,8 @@ 

Detailsst_make_valid_coverage() and st_make_valid_union() take a sf object and create a non-intersecting coverage area of a surrounding geography defined by a second sf, sfc, or bbox object. This was originally developed for the -getACS::make_area_xwalk() function.

+
make_area_xwalk() +function in the getACS package.

See also

diff --git a/reference/number_features.html b/reference/number_features.html index fcbeb32..568608e 100644 --- a/reference/number_features.html +++ b/reference/number_features.html @@ -1,5 +1,7 @@ -Sort and number features by coordinates or distance — number_features • sfext 1 limit = NULL set return_input FALSE. Refer api_parameter_reference details. return_addresses TRUE return input addresses. Defaults TRUE return_input FALSE FALSE return_input TRUE. argument passed geo() function. unique_only TRUE unique results returned return_input set FALSE. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/address_to_sf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Use tidygeocoder to convert an address or data frame with an address column to an sf object — address_to_sf","text":"sf object POINT geometry geocoded addresses valid coordinates.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/area_unit_options.html","id":null,"dir":"Reference","previous_headings":"","what":"Area units (vector) — area_unit_options","title":"Area units (vector) — area_unit_options","text":"vector supported area units derived dist_units units::valid_udunits().","code":""},{"path":"https://elipousson.github.io/sfext/reference/area_unit_options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Area units (vector) — area_unit_options","text":"","code":"area_unit_options"},{"path":"https://elipousson.github.io/sfext/reference/area_unit_options.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Area units (vector) — area_unit_options","text":"character vector 41 names, plural names, aliases area units.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_crs.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert object to coordinate reference system or check coordinate reference system — as_crs","title":"Convert object to coordinate reference system or check coordinate reference system — as_crs","text":"as_crs: coerce x CRS object (optionally) error NA value returned. is_same_crs: x y coordinate reference system?","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_crs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert object to coordinate reference system or check coordinate reference system — as_crs","text":"","code":"as_crs(x = NULL, allow_na = TRUE, arg = caller_arg(x), call = caller_env()) is_same_crs(x, y) is_wgs84(x)"},{"path":"https://elipousson.github.io/sfext/reference/as_crs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert object to coordinate reference system or check coordinate reference system — as_crs","text":"x as_crs(), object convert coordinate reference system. is_same_crs() is_wgs84(), object check. as_wgs84(), object convert EPSG:4326. allow_na as_crs(), TRUE, return NA_crs_ x converted valid coordinate reference system. FALSE, error instead returning invalid CRS. arg argument name string. argument mentioned error messages input origin problem. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. y is_same_crs(), object compare x.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_crs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert object to coordinate reference system or check coordinate reference system — as_crs","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc[[\"category\"]] <- sample(c(\"A\", \"B\", \"C\"), nrow(nc), replace = TRUE) as_sf(nc$geometry) #> Simple feature collection with 100 features and 0 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965 #> Geodetic CRS: NAD27 #> # A tibble: 100 × 1 #> geometry #> #> 1 (((-81.47276 36.23436, -81.54084 36.27251, -81.56198 36.27359, -81.63306 36.… #> 2 (((-81.23989 36.36536, -81.24069 36.37942, -81.26284 36.40504, -81.26624 36.… #> 3 (((-80.45634 36.24256, -80.47639 36.25473, -80.53688 36.25674, -80.54501 36.… #> 4 (((-76.00897 36.3196, -76.01735 36.33773, -76.03288 36.33598, -76.04395 36.3… #> 5 (((-77.21767 36.24098, -77.23461 36.2146, -77.29861 36.21153, -77.29351 36.1… #> 6 (((-76.74506 36.23392, -76.98069 36.23024, -76.99475 36.23558, -77.13007 36.… #> 7 (((-76.00897 36.3196, -75.95718 36.19377, -75.98134 36.16973, -76.18317 36.3… #> 8 (((-76.56251 36.34057, -76.60424 36.31498, -76.64822 36.31532, -76.68874 36.… #> 9 (((-78.30876 36.26004, -78.28293 36.29188, -78.32125 36.54553, -78.05167 36.… #> 10 (((-80.02567 36.25023, -80.45301 36.25709, -80.43531 36.55104, -80.0481 36.5… #> # ℹ 90 more rows nc_bbox <- as_bbox(nc) nc_bbox #> xmin ymin xmax ymax #> -84.32385 33.88199 -75.45698 36.58965 as_sfc(nc_bbox) #> Geometry set for 1 feature #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965 #> Geodetic CRS: NAD27 #> POLYGON ((-84.32385 33.88199, -75.45698 33.8819... as_xy(nc[1,]) #> x y #> 1 -81.49823 36.4314 as_sf_list(nc, col = \"category\") #> #> $a #> Simple feature collection with 33 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -83.98855 ymin: 33.94867 xmax: -75.45698 ymax: 36.58965 #> Geodetic CRS: NAD27 #> # A tibble: 33 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.114 1.44 1825 1825 Ashe 37009 37009 5 1091 1 10 #> 2 0.07 2.97 1831 1831 Curr… 37053 37053 27 508 1 123 #> 3 0.124 1.43 1837 1837 Stok… 37169 37169 85 1612 1 160 #> 4 0.114 1.35 1838 1838 Casw… 37033 37033 17 1035 2 550 #> 5 0.153 1.62 1839 1839 Rock… 37157 37157 79 4449 16 1243 #> 6 0.072 1.08 1842 1842 Vance 37181 37181 91 2180 4 1179 #> 7 0.064 1.21 1892 1892 Avery 37011 37011 6 781 0 4 #> 8 0.086 1.27 1893 1893 Yadk… 37197 37197 99 1269 1 65 #> 9 0.128 1.55 1897 1897 Fran… 37069 37069 35 1399 2 736 #> 10 0.142 1.64 1913 1913 Nash 37127 37127 64 4021 8 1851 #> # ℹ 23 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry #> #> $b #> Simple feature collection with 32 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -83.9547 ymin: 33.88199 xmax: -75.7637 ymax: 36.57286 #> Geodetic CRS: NAD27 #> # A tibble: 32 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.061 1.23 1827 1827 Alle… 37005 37005 3 487 0 10 #> 2 0.143 1.63 1828 1828 Surry 37171 37171 86 3188 5 208 #> 3 0.097 1.67 1833 1833 Hert… 37091 37091 46 1452 7 954 #> 4 0.062 1.55 1834 1834 Camd… 37029 37029 15 286 0 115 #> 5 0.091 1.28 1835 1835 Gates 37073 37073 37 420 0 254 #> 6 0.143 1.66 1840 1840 Gran… 37077 37077 39 1671 4 930 #> 7 0.109 1.32 1841 1841 Pers… 37145 37145 73 1556 4 613 #> 8 0.199 1.98 1874 1874 Wilk… 37193 37193 97 3146 4 200 #> 9 0.081 1.29 1880 1880 Wata… 37189 37189 95 1323 1 17 #> 10 0.044 1.16 1887 1887 Chow… 37041 37041 21 751 1 368 #> # ℹ 22 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry #> #> $c #> Simple feature collection with 35 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 34.30505 xmax: -76.11271 ymax: 36.55629 #> Geodetic CRS: NAD27 #> # A tibble: 35 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.153 2.21 1832 1832 Nort… 37131 37131 66 1421 9 1066 #> 2 0.118 1.42 1836 1836 Warr… 37185 37185 93 968 4 748 #> 3 0.19 2.20 1846 1846 Hali… 37083 37083 42 3608 18 2365 #> 4 0.053 1.17 1848 1848 Pasq… 37139 37139 70 1638 3 622 #> 5 0.063 1 1881 1881 Perq… 37143 37143 72 484 1 230 #> 6 0.108 1.48 1900 1900 Fors… 37067 37067 34 11858 10 3919 #> 7 0.17 1.68 1903 1903 Guil… 37081 37081 41 16184 23 5483 #> 8 0.104 1.29 1907 1907 Oran… 37135 37135 68 3164 4 776 #> 9 0.059 1.32 1927 1927 Mitc… 37121 37121 61 671 0 1 #> 10 0.118 1.90 1937 1937 Mart… 37117 37117 59 1549 2 883 #> # ℹ 25 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry #>"},{"path":"https://elipousson.github.io/sfext/reference/as_point.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an sf, numeric, or other object to a POINT (sfg) or POINT, MULTIPOINT, LINESTRING, or MULTILINESTRING (sfc) object — as_points","title":"Convert an sf, numeric, or other object to a POINT (sfg) or POINT, MULTIPOINT, LINESTRING, or MULTILINESTRING (sfc) object — as_points","text":"Works sf, sfc, bbox objects using sf::st_centroid(). Works sf_bbox_point()","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_point.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an sf, numeric, or other object to a POINT (sfg) or POINT, MULTIPOINT, LINESTRING, or MULTILINESTRING (sfc) object — as_points","text":"","code":"as_point(..., to = \"POINT\") as_points(..., to = \"POINT\", call = caller_env()) as_startpoint(x) as_endpoint(x) as_line(..., to = \"LINESTRING\", call = caller_env()) as_lines(..., to = \"LINESTRING\") as_polygons(..., to = \"POLYGON\") as_centroid(x, ...)"},{"path":"https://elipousson.github.io/sfext/reference/as_point.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an sf, numeric, or other object to a POINT (sfg) or POINT, MULTIPOINT, LINESTRING, or MULTILINESTRING (sfc) object — as_points","text":"... See details. geometry type return, either POINT MULTIPOINT LINESTRING MULTILINESTRING. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. x sf, sfc, bbox object.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_point.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert an sf, numeric, or other object to a POINT (sfg) or POINT, MULTIPOINT, LINESTRING, or MULTILINESTRING (sfc) object — as_points","text":"Using as_point: as_point() always returns single point sfg object. ... parameter passed sf::st_centroid() ... sf, sfc, bbox object, sf_bbox_point() includes bbox object string indicating requested point position, sf::st_point() ... includes numeric vector. Using as_points: as_points() always returns sfc object. parameters passed as_point using purrr::map() converted sfc using sf::st_as_sfc(). ... parameters must include crs, otherwise crs NA resulting sfc object. Using as_startpoint as_endpoint: as_startpoint() as_endpoint() require LINESTRING MULTILINESTRING geometry type sf sfc object passed lwgeom::st_startpoint() lwgeom::st_endpoint() respectively. functions always return sfc object matching CRS input geometry. Using as_lines: params POINT MULTIPOINT geometry, passed as_points() convert sfc object. parameters POINT geometry, combined create MULTIPOINT geometry. as_lines() ... parameters passed as_points() /sf::st_cast(). as_line as_lines consistently retain coordinate reference system original object improved future. Using as_centroid() as_centroid() always returns sfc object length crs input object.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_point.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert an sf, numeric, or other object to a POINT (sfg) or POINT, MULTIPOINT, LINESTRING, or MULTILINESTRING (sfc) object — as_points","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) as_point(nc) #> POINT (-79.40065 35.55937) as_point(c(\"xmax\", \"ymax\"), bbox = as_bbox(nc)) #> POINT (-75.45698 36.58965) as_points(nc) #> Geometry set for 1 feature #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -79.40065 ymin: 35.55937 xmax: -79.40065 ymax: 35.55937 #> Geodetic CRS: NAD27 #> POINT (-79.40065 35.55937) as_points(nc[1, ], nc[2, ]) #> Geometry set for 2 features #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -81.49823 ymin: 36.4314 xmax: -81.12513 ymax: 36.49111 #> Geodetic CRS: NAD27 #> POINT (-81.49823 36.4314) #> POINT (-81.12513 36.49111) nc_line <- as_line(c(as_points(nc[1, ]), as_points(nc[10, ]))) as_startpoint(nc_line) #> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE #> Geometry set for 1 feature #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -81.49823 ymin: 36.4314 xmax: -81.49823 ymax: 36.4314 #> Geodetic CRS: NAD27 #> POINT (-81.49823 36.4314) as_endpoint(nc_line) #> Geometry set for 1 feature #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -80.23429 ymin: 36.40042 xmax: -80.23429 ymax: 36.40042 #> Geodetic CRS: NAD27 #> POINT (-80.23429 36.40042) as_centroid(nc) #> Geometry set for 100 features #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -84.05986 ymin: 34.07671 xmax: -75.8095 ymax: 36.49111 #> Geodetic CRS: NAD27 #> First 5 geometries: #> POINT (-81.49823 36.4314) #> POINT (-81.12513 36.49111) #> POINT (-80.68573 36.41252) #> POINT (-76.02719 36.40714) #> POINT (-77.41046 36.42236)"},{"path":"https://elipousson.github.io/sfext/reference/as_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an object to a simple feature or bounding box object — as_sf","title":"Convert an object to a simple feature or bounding box object — as_sf","text":"functions pass NULL value without returning error. POINT MULTIPOINT object passed as_bbox() 0.00000001 meter buffer applied. character object passed as_bbox() passed osmdata::getbb() using format_out = \"matrix\" converted bounding box.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an object to a simple feature or bounding box object — as_sf","text":"","code":"as_sf( x, crs = NULL, sf_col = \"geometry\", ext = TRUE, ..., as_tibble = TRUE, call = caller_env() ) as_bbox(x, crs = NULL, ext = TRUE, ..., call = caller_env()) as_sfc(x, crs = NULL, ext = TRUE, ..., call = caller_env()) as_sf_class(x, class = NULL, allow_null = TRUE, ..., call = caller_env())"},{"path":"https://elipousson.github.io/sfext/reference/as_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an object to a simple feature or bounding box object — as_sf","text":"x Object convert sf, sfc, bbox sf list object. crs Coordinate reference system sf, bbox, sfc sf list object return. sf_col column name use geometry column created as_sf; defaults \"geometry\". ext TRUE, as_sf convert data frame character vector addresses sf object using df_to_sf address_to_sf. FALSE, spatial objects (bbox, sfg, sfc, sf list, raster, sp objects) can converted. Defaults TRUE. ... Additional parameters passed as_sf, as_sfc, as_bbox, as_sf_list as_tibble TRUE, always return sf object tibble. FALSE, conversions may still return tibble object. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. class class convert data ; defaults NULL (returns \"sf\") allow_null as_sf_class, class NULL allow_null TRUE, return x without class conversion checks. Defaults TRUE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_sf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert an object to a simple feature or bounding box object — as_sf","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc[[\"category\"]] <- sample(c(\"A\", \"B\", \"C\"), nrow(nc), replace = TRUE) as_sf(nc$geometry) #> Simple feature collection with 100 features and 0 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965 #> Geodetic CRS: NAD27 #> # A tibble: 100 × 1 #> geometry #> #> 1 (((-81.47276 36.23436, -81.54084 36.27251, -81.56198 36.27359, -81.63306 36.… #> 2 (((-81.23989 36.36536, -81.24069 36.37942, -81.26284 36.40504, -81.26624 36.… #> 3 (((-80.45634 36.24256, -80.47639 36.25473, -80.53688 36.25674, -80.54501 36.… #> 4 (((-76.00897 36.3196, -76.01735 36.33773, -76.03288 36.33598, -76.04395 36.3… #> 5 (((-77.21767 36.24098, -77.23461 36.2146, -77.29861 36.21153, -77.29351 36.1… #> 6 (((-76.74506 36.23392, -76.98069 36.23024, -76.99475 36.23558, -77.13007 36.… #> 7 (((-76.00897 36.3196, -75.95718 36.19377, -75.98134 36.16973, -76.18317 36.3… #> 8 (((-76.56251 36.34057, -76.60424 36.31498, -76.64822 36.31532, -76.68874 36.… #> 9 (((-78.30876 36.26004, -78.28293 36.29188, -78.32125 36.54553, -78.05167 36.… #> 10 (((-80.02567 36.25023, -80.45301 36.25709, -80.43531 36.55104, -80.0481 36.5… #> # ℹ 90 more rows nc_bbox <- as_bbox(nc) nc_bbox #> xmin ymin xmax ymax #> -84.32385 33.88199 -75.45698 36.58965 as_sfc(nc_bbox) #> Geometry set for 1 feature #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965 #> Geodetic CRS: NAD27 #> POLYGON ((-84.32385 33.88199, -75.45698 33.8819... as_xy(nc[1,]) #> x y #> 1 -81.49823 36.4314 as_sf_list(nc, col = \"category\") #> #> $a #> Simple feature collection with 37 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -84.03086 ymin: 33.88199 xmax: -75.7637 ymax: 36.58965 #> Geodetic CRS: NAD27 #> # A tibble: 37 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.114 1.44 1825 1825 Ashe 37009 37009 5 1091 1 10 #> 2 0.061 1.23 1827 1827 Alle… 37005 37005 3 487 0 10 #> 3 0.153 2.21 1832 1832 Nort… 37131 37131 66 1421 9 1066 #> 4 0.062 1.55 1834 1834 Camd… 37029 37029 15 286 0 115 #> 5 0.109 1.32 1841 1841 Pers… 37145 37145 73 1556 4 613 #> 6 0.053 1.17 1848 1848 Pasq… 37139 37139 70 1638 3 622 #> 7 0.199 1.98 1874 1874 Wilk… 37193 37193 97 3146 4 200 #> 8 0.086 1.27 1893 1893 Yadk… 37197 37197 99 1269 1 65 #> 9 0.128 1.55 1897 1897 Fran… 37069 37069 35 1399 2 736 #> 10 0.18 2.15 1905 1905 Bert… 37015 37015 8 1324 6 921 #> # ℹ 27 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry #> #> $b #> Simple feature collection with 27 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -83.98855 ymin: 34.30505 xmax: -75.45698 ymax: 36.56521 #> Geodetic CRS: NAD27 #> # A tibble: 27 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.143 1.63 1828 1828 Surry 37171 37171 86 3188 5 208 #> 2 0.118 1.42 1836 1836 Warr… 37185 37185 93 968 4 748 #> 3 0.19 2.20 1846 1846 Hali… 37083 37083 42 3608 18 2365 #> 4 0.081 1.29 1880 1880 Wata… 37189 37189 95 1323 1 17 #> 5 0.044 1.16 1887 1887 Chow… 37041 37041 21 751 1 368 #> 6 0.064 1.21 1892 1892 Avery 37011 37011 6 781 0 4 #> 7 0.17 1.68 1903 1903 Guil… 37081 37081 41 16184 23 5483 #> 8 0.122 1.52 1932 1932 Cald… 37027 37027 14 3609 6 309 #> 9 0.118 1.60 1946 1946 Madi… 37115 37115 58 765 2 5 #> 10 0.155 1.78 1947 1947 Ired… 37097 37097 49 4139 4 1144 #> # ℹ 17 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry #> #> $c #> Simple feature collection with 36 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 33.94867 xmax: -75.77316 ymax: 36.55716 #> Geodetic CRS: NAD27 #> # A tibble: 36 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.07 2.97 1831 1831 Curr… 37053 37053 27 508 1 123 #> 2 0.097 1.67 1833 1833 Hert… 37091 37091 46 1452 7 954 #> 3 0.091 1.28 1835 1835 Gates 37073 37073 37 420 0 254 #> 4 0.124 1.43 1837 1837 Stok… 37169 37169 85 1612 1 160 #> 5 0.114 1.35 1838 1838 Casw… 37033 37033 17 1035 2 550 #> 6 0.153 1.62 1839 1839 Rock… 37157 37157 79 4449 16 1243 #> 7 0.143 1.66 1840 1840 Gran… 37077 37077 39 1671 4 930 #> 8 0.072 1.08 1842 1842 Vance 37181 37181 91 2180 4 1179 #> 9 0.063 1 1881 1881 Perq… 37143 37143 72 484 1 230 #> 10 0.108 1.48 1900 1900 Fors… 37067 37067 34 11858 10 3919 #> # ℹ 26 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry #>"},{"path":"https://elipousson.github.io/sfext/reference/as_xy.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert data to a data frame with X/Y coordinate pairs — as_xy","title":"Convert data to a data frame with X/Y coordinate pairs — as_xy","text":"Wraps as_points(), as_sfc(), sf_bbox_point() allow conversion sf, sfc, sfg objects simple data frame X Y columns matching provided nm parameter.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_xy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert data to a data frame with X/Y coordinate pairs — as_xy","text":"","code":"as_xy(x, bbox = NULL, crs = NULL, nm = c(\"x\", \"y\"), ...)"},{"path":"https://elipousson.github.io/sfext/reference/as_xy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert data to a data frame with X/Y coordinate pairs — as_xy","text":"x length 2 character string numeric coordinate pair sf, sfc, bbox object. x character string (e.g. c(\"xmin\", \"ymax\")), sf, sfc, bbox object must provided data argument. bbox bbox object object can converted as_bbox() passed bbox sf_bbox_point() x passed point parameter. crs character numeric reference coordinate reference system supported sf::st_crs() another sf, sfc, bbox object used provide crs. nm Column names use X Y columns. ... Additional parameters passed sf_bbox_point(), as_points(), as_sfc().","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/bind_sf_coverage.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Row bind coverage for a feature based on a coverage feature — bind_sf_coverage","text":"","code":"bind_sf_coverage( x, coverage, coverage_nm = NULL, .id = \"name\", x_arg = caller_arg(x), coverage_arg = caller_arg(coverage), id_arg = caller_arg(.id), combine = FALSE, error_call = caller_env() ) st_make_valid_coverage( x, y, combine = FALSE, is_coverage = TRUE, .fn = sf::st_difference ) st_make_valid_union(x, combine = FALSE, is_coverage = TRUE)"},{"path":"https://elipousson.github.io/sfext/reference/bind_sf_coverage.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Row bind coverage for a feature based on a coverage feature — bind_sf_coverage","text":"x input sf object coverage sf, sfc, bbox object covers x. coverage_nm Name use coverage feature assigned value .id column, Default: NULL .id .id column name, must present x Default: 'name' x_arg, coverage_arg, id_arg Argument names error messages bind_sf_coverage() used wrapper function. combine TRUE, use sf::st_combine() passing x sf::st_union() error_call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. y Second parameter st_make_valid_coverage() is_coverage logical; TRUE, use optimized algorithm features form polygonal coverage (overlaps) .fn Defaults sf::st_difference","code":""},{"path":"https://elipousson.github.io/sfext/reference/bind_sf_coverage.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Row bind coverage for a feature based on a coverage feature — bind_sf_coverage","text":"sf object sfc object","code":""},{"path":"https://elipousson.github.io/sfext/reference/bind_sf_coverage.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Row bind coverage for a feature based on a coverage feature — bind_sf_coverage","text":"bind_sf_coverage() related helper functions st_make_valid_coverage() st_make_valid_union() take sf object create non-intersecting coverage area surrounding geography defined second sf, sfc, bbox object. originally developed getACS::make_area_xwalk() function.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/bind_units_col.html","id":null,"dir":"Reference","previous_headings":"","what":"Bind units column to data frame — bind_units_col","title":"Bind units column to data frame — bind_units_col","text":"Utility function supporting get_area, get_dist, get_bearing.","code":""},{"path":"https://elipousson.github.io/sfext/reference/bind_units_col.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bind units column to data frame — bind_units_col","text":"","code":"bind_units_col( x, y, units = NULL, drop = FALSE, keep_all = TRUE, .id = NULL, call = caller_env() )"},{"path":"https://elipousson.github.io/sfext/reference/bind_units_col.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bind units column to data frame — bind_units_col","text":"x Data frame sf object. y Vector numeric units values bind x. units Units use y (numeric) convert (y units class); defaults NULL. drop TRUE, apply units::drop_units function column units class values return numeric values instead; defaults FALSE. keep_all FALSE, keep columns. FALSE, return named .id column. .id Name use vector units provided \"y\" parameter, \"y\" bound \"x\" data frame tibble new column. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/check_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if x is an sf object — check_sf","title":"Check if x is an sf object — check_sf","text":"x sf object invisibly return TRUE. , return error cli::cli_abort","code":""},{"path":"https://elipousson.github.io/sfext/reference/check_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if x is an sf object — check_sf","text":"","code":"check_sf( x, ..., ext = FALSE, allow_list = FALSE, allow_null = FALSE, arg = caller_arg(x), call = caller_env() )"},{"path":"https://elipousson.github.io/sfext/reference/check_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if x is an sf object — check_sf","text":"x sf, sfc, bbox object. ... Additional parameters passed rlang::abort(). ext TRUE, check x sf, sfc, bbox class object ; defaults FALSE. (used is_sf) allow_list TRUE, return TRUE x sf list , ext also TRUE, list sf, sfc, bbox objects. Defaults FALSE. allow_null TRUE x NULL, return TRUE; defaults FALSE. arg argument name string. argument mentioned error messages input origin problem. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/cli_format.sf.html","id":null,"dir":"Reference","previous_headings":"","what":"cli_format style for sf objects — cli_format.sf","title":"cli_format style for sf objects — cli_format.sf","text":"cli_format style sf objects","code":""},{"path":"https://elipousson.github.io/sfext/reference/cli_format.sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"cli_format style for sf objects — cli_format.sf","text":"","code":"# S3 method for class 'sf' cli_format(x, style = NULL, ...)"},{"path":"https://elipousson.github.io/sfext/reference/cli_format.sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"cli_format style for sf objects — cli_format.sf","text":"x sf object format cli_format.sf method. style use 'sf' class method. ... use 'sf' class method.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/cli_format.sf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"cli_format style for sf objects — cli_format.sf","text":"","code":"if (FALSE) { # \\dontrun{ if (interactive()) { library(cli) library(sf) cliExtras::register_cli_format(\"sf\", cli_format.sf) nc <- read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) cli_text(\"`nc` is a {.val {nc}}\") } } # }"},{"path":"https://elipousson.github.io/sfext/reference/compare_dist.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare a distance to the dimension of a bounding box or another distance value — compare_dist","title":"Compare a distance to the dimension of a bounding box or another distance value — compare_dist","text":"Compare dist distance based x. \"xdist\" (default), \"ydist\", \"diagdist\", length 2 character vector supported sf_bbox_dist() dist compared resulting distance. sf sfc object, comparison distance results sf::st_distance() x first parameter second. x can also numeric value without units class. Use \"\" argument determine type comparison: \"ratio\" (dist divided comparison distance) \"fit\" (many lengths dist can fit wholly within comparison distance) \"longer\", \"shorter\", \"\" (uses tolerance parameter).","code":""},{"path":"https://elipousson.github.io/sfext/reference/compare_dist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare a distance to the dimension of a bounding box or another distance value — compare_dist","text":"","code":"compare_dist( dist, x, units = NULL, to = \"xdist\", how = \"ratio\", tolerance = 1.5e-08, ... )"},{"path":"https://elipousson.github.io/sfext/reference/compare_dist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare a distance to the dimension of a bounding box or another distance value — compare_dist","text":"dist Distance check units class numeric vector x sf, sfc, bbox object numeric vector. units Units compare. dist x numeric assumed provided units units coordinate reference system (CRS) x (x sf, sfc, bbox object). Distance compare dist . Standard options include \"xdist\" (default), \"ydist\", \"diagdist\" compare sf_bbox_xdist(), sf_bbox_ydist(), sf_bbox_diagdist(). length 2 character vector, x, , ... parameters passed sf_bbox_dist(). sf sfc object, additional ... parameters passed sf::st_distance() using x first argument second. x numeric vector value ignored. \"ratio\", dist divided comparison distance. \"fit\", return number times dist fits comparison distance without remainder. \"longer\", \"shorter\", \"\", return logical vector. tolerance passed .equal() = \"\" ... Additional parameters passed sf::st_distance() sf sfc object sf_bbox_dist() length 2 character vector.","code":""},{"path":"https://elipousson.github.io/sfext/reference/compare_dist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare a distance to the dimension of a bounding box or another distance value — compare_dist","text":"logical numeric vector.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_scale.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert distance from scale to actual units — convert_dist_scale","title":"Convert distance from scale to actual units — convert_dist_scale","text":"function converts scale distances actual units based named standard_scales.","code":""},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_scale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert distance from scale to actual units — convert_dist_scale","text":"","code":"convert_dist_scale( dist = NULL, scale = NULL, scale_standard = NULL, scale_series = NULL, scale_unit = \"in\", scale_factor = NULL, actual_unit = NULL, dpi = 120, paper = NULL, orientation = NULL, ... )"},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_scale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert distance from scale to actual units — convert_dist_scale","text":"dist distance convert. paper provided, dist optional paper width height used dist. scale Scale name standard_scales[[\"scale\"]]. scale_standard, scale_series Passed standard scale parameters get_scale(). scale_unit \"mm\" (converted cm dividing 10), \"cm\", \"px\" (converted inches dividing dpi), \"\". scale_factor factor converting scale_unit actual_unit, e.g. 1\" = 1', scale factor 12. optional scale provided; defaults NULL. actual_unit unit supported convert_dist_units() dpi dots per square inch (used conversion factor \"px\" \"\") paper Paper, Default: 'letter'. orientation Orientation \"portrait\", \"landscape\", \"square\", Default: 'portrait'. ... Arguments passed get_paper standard Size standard, \"ANSI\", \"ISO\", \"British Imperial\", \"JIS\", \"USPS\", \"Facebook\", \"Instagram\", \"Twitter\". series Size series (e.g. ), Default: NULL size Size number (used \"ISO\" \"JIS\" series). Standard, series, size may required return single paper using parameters. width,height Width height units, Default: NULL. units Paper size units, either \"\", \"mm\", \"px\"; defaults NULL (using \"\" width height provided). ncol,nrow Number expected columns rows paper; used determine row_height section_asp paper data frame returned get_paper nrow ncol greater 1; defaults NULL. gutter Gutter distance units. Gutter used spacing nrow columns (variable spacing currently supported); defaults 0. margin numeric vector ggplot2 margin object. bbox bounding box use get orientation using sf_bbox_asp() orientation = TRUE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_scale.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert distance from scale to actual units — convert_dist_scale","text":"paper provided, return vector dist values converted scale_unit actual_unit based scale_factor information standard_scales data. paper provided, return data.frame converted distances appends columns named actual_width actual_height.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_units.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert distance (and area) values between different units — convert_dist_units","title":"Convert distance (and area) values between different units — convert_dist_units","text":"Convert distance (area) values different units","code":""},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_units.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert distance (and area) values between different units — convert_dist_units","text":"","code":"convert_dist_units( dist, from = NULL, to = \"meter\", drop = FALSE, digits = NULL )"},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_units.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert distance (and area) values between different units — convert_dist_units","text":"dist Numeric units object Existing unit dist, Default: NULL. dist units object, numerator used \"\" Unit convert distance , Default: 'meter' drop TRUE, return numeric. FALSE, return class units object. digits Number digits include result; defaults NULL.","code":""},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_units.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert distance (and area) values between different units — convert_dist_units","text":"Object created units::set_units()","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/coords_to_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a data.frame with one or more coordinate columns to an sf object — coords_to_sf","title":"Convert a data.frame with one or more coordinate columns to an sf object — coords_to_sf","text":"coords_to_sf(): Convert data frame coordinates simple feature object check_coords(): Check provided vector coordinate column names valid provided data frame separate_coords(): Separate coordinates single combined column two columns format_coords(): Format coordinates numeric values remove missing coordinates data.frame has_coords(): Suggests coordinate pair comparing common values column names provided data.frame rev_coords(): Reverse vector coordinate names text \"lat\" \"y\" appears first position","code":""},{"path":"https://elipousson.github.io/sfext/reference/coords_to_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a data.frame with one or more coordinate columns to an sf object — coords_to_sf","text":"","code":"coords_to_sf( x, coords = c(\"lon\", \"lat\"), into = NULL, sep = \",\", rev = FALSE, remove_coords = FALSE, crs = 4326, call = caller_env() ) check_coords( x = NULL, coords = NULL, default = c(\"lon\", \"lat\"), rev = FALSE, call = caller_env() ) rev_coords(coords, pattern = c(\"lat\", \"^y\"), ignore.case = TRUE) has_coords(x, coords = NULL, value = TRUE) format_coords( x, coords = c(\"lon\", \"lat\"), keep_missing = FALSE, call = caller_env() ) separate_coords(x, coords, into = c(\"lon\", \"lat\"), sep = \",\")"},{"path":"https://elipousson.github.io/sfext/reference/coords_to_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a data.frame with one or more coordinate columns to an sf object — coords_to_sf","text":"x data.frame one coordinate columns. coordinates contained within single column, coord must length 1 length 2 parameter must provided. coords Coordinate columns input data.frame output sf object (geometry 'centroid' 'point') Default: c(\"lon\", \"lat\"). coords single column name longitude latitude, used names new columns coords separated . Passed tidyr::separate(). sep coords single column name longitude latitude, sep used separator coordinate values. Passed tidyr::separate(). rev TRUE, reverse c(\"lat\", \"lon\") coords c(\"lon\", \"lat\"). check_coords() . remove_coords df_to_sf(), TRUE, remove coordinate columns converting data frame simple feature object; defaults FALSE. crs Coordinate reference system used coordinates provided data frame. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. default Default coordinate values; defaults c(\"lon\", \"lat\"). pattern Pattern passed rev_coords() grepl() used match vectors reversed. Defaults c(\"lat\", \"^y\"). ignore.case TRUE, pattern matching case sensitive. value TRUE, return value coordinate column names. Used has_coords(). keep_missing TRUE, keep rows missing coordinate values. Defaults FALSE filters rows missing coordinates.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/count_features.html","id":null,"dir":"Reference","previous_headings":"","what":"Count simple features based on relationship with a second simple feature object — count_features","title":"Count simple features based on relationship with a second simple feature object — count_features","text":"Use st_join_ext() dplyr::count() count features x based spatial relationship y. similar count_sf_ext() may merged future.","code":""},{"path":"https://elipousson.github.io/sfext/reference/count_features.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count simple features based on relationship with a second simple feature object — count_features","text":"","code":"count_features( x = NULL, y = NULL, nm = \"data\", join = NULL, .id = \"name\", by = NULL, count = NULL, sort = FALSE, name = NULL, geometry = \"y\", ... )"},{"path":"https://elipousson.github.io/sfext/reference/count_features.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count simple features based on relationship with a second simple feature object — count_features","text":"x Data frame sf object, Default: NULL y Length 1 named sf list (name y used count count NULL) sf object nm NULL. y must include column name matching value .id. y NULL, count required. Default: NULL nm Vector names use as_sf_list() convert y sf list (y already sf list). Defaults \"data\". join geometry predicate function; defaults NULL, set sf::st_intersects() y contains POLYGON MULTIPOLYGON objects sf::st_nearest_feature() y contains types. .id Column name values added column input sf object. character vector variables join passed dplyr::left_join(). count Name column count. NULL, count set names(y) (assuming y length 1 named sf list). sort TRUE, show largest groups top. name name new column output. omitted, default n. already column called n, use nn. column called n nn, 'll use nnn, , adding ns gets new name. geometry \"y\", replace x geometry y geometry joining based . NULL, set value count. ... Additional parameters passed st_join_ext()","code":""},{"path":"https://elipousson.github.io/sfext/reference/count_sf_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Count extended for working with sf objects — count_sf_ext","title":"Count extended for working with sf objects — count_sf_ext","text":"extended version dplyr::count() makes easier count occurrences features data intersect features second sf object (set y) created passing x data st_make_grid_ext(). Similar count_features() two functions may combined future.","code":""},{"path":"https://elipousson.github.io/sfext/reference/count_sf_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count extended for working with sf objects — count_sf_ext","text":"","code":"count_sf_ext( data, x = NULL, y = NULL, join = sf::st_intersects, largest = TRUE, wt = NULL, sort = FALSE, replace_na = FALSE, keep_na = FALSE, lims = NULL, geometry = TRUE, .id = \"id\", name = NULL, ... )"},{"path":"https://elipousson.github.io/sfext/reference/count_sf_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count extended for working with sf objects — count_sf_ext","text":"data Data count relationship y x Optional sf object passed st_make_grid_ext(). Defaults NULL. y NULL (default), y defaults sf object created st_make_grid_ext() using x data (x NULL) x parameter st_make_grid_ext(). NULL, y must sf object column name .id (defaults \"id\"). join geometry predicate function profile st_intersects; see details largest logical; TRUE, return x features augmented fields y largest overlap features x; see https://github.com/r-spatial/sf/issues/578 wt Frequency weights. Can NULL variable: NULL (default), counts number rows group. variable, computes sum(wt) group. sort TRUE, show largest groups top. replace_na TRUE, replace NA values count 0. keep_na TRUE, filter NA values count. Ignored replace_na TRUE. lims Optional numeric vector minimum minimum maximum count values. provided, values minimum set minimum values maximum set maximum. one value provided, assumed minimum limit. geometry TRUE (default) return sf object. FALSE, return data frame. .id name use cell id column. Defaults \"id\". name name new column output. omitted, default n. already column called n, use nn. column called n nn, 'll use nnn, , adding ns gets new name. ... Arguments passed st_make_grid_ext ncol,nrow Used set n either NULL; defaults NULL. row id added columns grid provided. gutter Distance units column cell; gutter effectively serves margin negative buffer applied cells (including edges grid). desc TRUE, reverse standard order cell id numbering; defaults FALSE n n NULL square TRUE, grid set automatically 10 cells wide, Default: NULL \"polygons\", \"corners\", \"centers\"; set centers automatically style \"circle\", \"circle_offset\" buffer applied return circular polygons. style Style cell return options including \"rect\", \"square\", \"hex\", \"flat_top_hex\", \"circle\", \"circle_offset\" filter TRUE (trim TRUE) filter grid geometry x using st_filter_ext crs Coordinate reference system bounding box return; defaults NULL maintains crs input object. unit Units buffer. Supported options include \"meter\", \"foot\", \"kilometer\", \"mile\", \"nautical mile\" Common abbreviations (e.g. \"km\" instead \"kilometer\") also supported. Distance units converted units matching GDAL units x; defaults \"meter\" cellsize numeric length 1 2 target cellsize: square rectangular cells width height, hexagonal cells distance opposite edges (edge length cellsize/sqrt(3)). length units object can passed, area unit object area size square hexagonal cell. trim TRUE, x trimmed y st_trim().","code":""},{"path":"https://elipousson.github.io/sfext/reference/count_sf_ext.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count extended for working with sf objects — count_sf_ext","text":"sf object tibble (geometry = FALSE) column counting occurrences features data.","code":""},{"path":"https://elipousson.github.io/sfext/reference/count_sf_ext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Count extended for working with sf objects — count_sf_ext","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) data <- sf::st_sample(nc, size = 75) # Count data based on nc count <- count_sf_ext(data = data, y = nc, .id = \"FIPS\") #> Warning: attribute variables are assumed to be spatially constant throughout all geometries plot(count[, \"n\"], reset = FALSE) plot(data, col = \"gray60\", pch = 3, add = TRUE) # Count data based grid created by passing nc to st_make_grid_ext count_grid <- count_sf_ext(data = data, x = nc, .id = \"FIPS\") #> Warning: attribute variables are assumed to be spatially constant throughout all geometries plot(count_grid[, \"n\"], reset = FALSE) plot(data, col = \"gray60\", pch = 3, add = TRUE)"},{"path":"https://elipousson.github.io/sfext/reference/dist_unit_options.html","id":null,"dir":"Reference","previous_headings":"","what":"Distance units (vector) — dist_unit_options","title":"Distance units (vector) — dist_unit_options","text":"vector supported distance units pulled dist_units.","code":""},{"path":"https://elipousson.github.io/sfext/reference/dist_unit_options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distance units (vector) — dist_unit_options","text":"","code":"dist_unit_options"},{"path":"https://elipousson.github.io/sfext/reference/dist_unit_options.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Distance units (vector) — dist_unit_options","text":"character vector 86 names, plural names, aliases, symbols distance units.","code":""},{"path":"https://elipousson.github.io/sfext/reference/dist_units.html","id":null,"dir":"Reference","previous_headings":"","what":"Distance units (data frame) — dist_units","title":"Distance units (data frame) — dist_units","text":"subset units supported units package accessible units::valid_udunits() function.","code":""},{"path":"https://elipousson.github.io/sfext/reference/dist_units.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distance units (data frame) — dist_units","text":"","code":"dist_units"},{"path":"https://elipousson.github.io/sfext/reference/dist_units.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Distance units (data frame) — dist_units","text":"data frame 33 rows 12 variables: symbol symbols symbol_aliases symbol aliases name_singular singular names name_singular_aliases singular name aliases name_plural character plural names name_plural_aliases plural name aliases def short definition definition definition comment comment dimensionless logical indicator dimensionless units source_xml source XML unit_opts character vector symbols, singular, plural names unit","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_asp.html","id":null,"dir":"Reference","previous_headings":"","what":"Get aspect ratio from string or based on specific paper and margins — get_asp","title":"Get aspect ratio from string or based on specific paper and margins — get_asp","text":"Get aspect ratio string based specific paper margins","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_asp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get aspect ratio from string or based on specific paper and margins — get_asp","text":"","code":"get_asp( asp = NULL, paper = NULL, orientation = NULL, bbox = NULL, margin = NULL, block_asp = FALSE, allow_null = TRUE, ... )"},{"path":"https://elipousson.github.io/sfext/reference/get_asp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get aspect ratio from string or based on specific paper and margins — get_asp","text":"asp Aspect ratio width height numeric value (e.g. 0.33) character (e.g. \"1:3\"). numeric, get_asp() returns value without modification. paper Paper, Default: 'letter'. orientation Orientation \"portrait\", \"landscape\", \"square\", Default: 'portrait'. bbox bounding box use get orientation using sf_bbox_asp() orientation = TRUE. margin numeric vector ggplot2 margin object. block_asp TRUE, margin NULL, return aspect ratio text content block inside page margins. allow_null TRUE asp paper NULL, return NULL without error. ... Arguments passed get_paper standard Size standard, \"ANSI\", \"ISO\", \"British Imperial\", \"JIS\", \"USPS\", \"Facebook\", \"Instagram\", \"Twitter\". series Size series (e.g. ), Default: NULL size Size number (used \"ISO\" \"JIS\" series). Standard, series, size may required return single paper using parameters. width,height Width height units, Default: NULL. units Paper size units, either \"\", \"mm\", \"px\"; defaults NULL (using \"\" width height provided). ncol,nrow Number expected columns rows paper; used determine row_height section_asp paper data frame returned get_paper nrow ncol greater 1; defaults NULL. gutter Gutter distance units. Gutter used spacing nrow columns (variable spacing currently supported); defaults 0.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_asp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get aspect ratio from string or based on specific paper and margins — get_asp","text":"numeric aspect ratio.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_coords.html","id":null,"dir":"Reference","previous_headings":"","what":"Get coordinates for a simple feature or bounding box object — get_coords","title":"Get coordinates for a simple feature or bounding box object — get_coords","text":"extended version sf::st_coordinates() supports binding coordinates object, optionally dropping geometry, returning wkt point surface (geometry = \"surface point\") instead centroid.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_coords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get coordinates for a simple feature or bounding box object — get_coords","text":"","code":"get_coords( x, coords = NULL, geometry = \"centroid\", crs = NULL, keep_all = TRUE, drop = TRUE, call = caller_env() ) get_minmax(x, crs = NULL, keep_all = TRUE, drop = TRUE)"},{"path":"https://elipousson.github.io/sfext/reference/get_coords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get coordinates for a simple feature or bounding box object — get_coords","text":"x sf, bbox, sfc object. coords Column names use coordinates results, Default: NULL; set c(\"lon\", \"lat\") check_coords(). geometry geometry use coordinates \"centroid\", \"surface point\", alternatively \"wkt\"; defaults NULL (\"centroid\"). crs Coordinate reference system use coordinates; defaults NULL. keep_all TRUE, bind coordinates columns provided object x; defaults TRUE. drop TRUE x sf object, drop geometry Default: TRUE. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_coords.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get coordinates for a simple feature or bounding box object — get_coords","text":"get_minmax() get bounding box feature (group features) appends xmin, ymin, xmax, ymax values feature simple feature object.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_data_dir.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if data directory exists and create a new directory if needed — get_data_dir","title":"Check if data directory exists and create a new directory if needed — get_data_dir","text":"Get path package-specific cache directory rappdirs::user_cache_dir(), check existence data directory, optionally create new directory provided path location.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_data_dir.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if data directory exists and create a new directory if needed — get_data_dir","text":"","code":"get_data_dir( path = NULL, cache = FALSE, create = TRUE, pkg = \"sfext\", allow_null = TRUE ) list_data_files( path = NULL, pkg = \"sfext\", cache = FALSE, fileext = NULL, pattern = NULL, full.names = TRUE, ignore.case = TRUE, ... )"},{"path":"https://elipousson.github.io/sfext/reference/get_data_dir.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if data directory exists and create a new directory if needed — get_data_dir","text":"path Path directory use data directory. cache TRUE, path NULL set path rappdirs::user_cache_dir (using value pkg appname). path NULL, path returned even cache TRUE. create FALSE path exist, return path warning. TRUE rlang::is_interactive TRUE, ask user directory created. session interactive create TRUE, new directory created. pkg Package name; defaults \"sfext\" allow_null TRUE, path NULL, cache FALSE, return NULL path value; defaults TRUE. fileext pattern NULL, fileext used set pattern filter listed files matching file extension. pattern optional regular expression. file names match regular expression returned. full.names logical value. TRUE, directory path prepended file names give relative file path. FALSE, file names (rather paths) returned. ignore.case logical. pattern-matching case-insensitive? ... Additional parameters passed list.files()","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_margin.html","id":null,"dir":"Reference","previous_headings":"","what":"Get margins for a ggplot2 plot or map based on style or distance — get_margin","title":"Get margins for a ggplot2 plot or map based on style or distance — get_margin","text":"function works combination get_paper() function make easier position map page saving file. primarily useful using map plot created ggplot2 part print document format composed outside R using page layout application Adobe InDesign.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_margin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get margins for a ggplot2 plot or map based on style or distance — get_margin","text":"","code":"get_margin( margin = NULL, paper = NULL, orientation = NULL, dist = NULL, unit = \"in\", block_width = NULL, header = 0, footer = 0 )"},{"path":"https://elipousson.github.io/sfext/reference/get_margin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get margins for a ggplot2 plot or map based on style or distance — get_margin","text":"margin Margin style (options include \"extrawide\", \"wide\", \"standard\", \"narrow\", \"none\"), Additional \"auto\" option generate margin based line length planned yet implemented. Default: NULL (equivalent \"none\"). paper Paper, Default: 'letter'. orientation Orientation \"portrait\", \"landscape\", \"square\", Default: 'portrait'. dist Margin distance (single value used sides), Default: NULL unit Unit margin distance, Default: ''. block_width Plot map width units. paper block_width provided, margins half distance two evenly distributed. sets margin distance height well width work well header footers improved future. header, footer Header footer height units; defaults 0. Please note: headers footers currently supported \"px\" units.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_margin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get margins for a ggplot2 plot or map based on style or distance — get_margin","text":"ggplot2::margin() element intended use ggplot2::element_rect() plot.background theme element.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/get_margin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get margins for a ggplot2 plot or map based on style or distance — get_margin","text":"","code":"get_margin(\"standard\") #> [1] 1inches 1inches 1inches 1inches get_margin(\"none\") #> [1] 0inches 0inches 0inches 0inches get_margin(dist = 25, unit = \"mm\") #> [1] 25mm 25mm 25mm 25mm get_margin(paper = \"letter\", block_width = 5.5) #> [1] 1.5inches 1.5inches 1.5inches 1.5inches"},{"path":"https://elipousson.github.io/sfext/reference/get_measurements.html","id":null,"dir":"Reference","previous_headings":"","what":"Get measurements for simple feature objects — get_measurements","title":"Get measurements for simple feature objects — get_measurements","text":"Get measurements simple feature objects","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_measurements.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get measurements for simple feature objects — get_measurements","text":"","code":"get_area(x, units = NULL, keep_all = TRUE, drop = FALSE, .id = \"area\") st_area_ext(x, units = NULL, keep_all = TRUE, drop = FALSE, .id = \"area\") get_length(x, units = NULL, keep_all = TRUE, drop = FALSE, .id = \"length\") st_length_ext(x, units = NULL, keep_all = TRUE, drop = FALSE, .id = \"length\") get_dist( x, to, by_element = TRUE, units = NULL, drop = FALSE, keep_all = TRUE, .id = \"dist\", ... ) st_distance_ext( x, to, by_element = TRUE, units = NULL, drop = FALSE, keep_all = TRUE, .id = \"dist\", ... ) get_bearing(x, to = NULL, dir = FALSE, keep_all = TRUE, .id = \"bearing\") st_bearing(x, to = NULL, dir = FALSE, keep_all = TRUE, .id = \"bearing\")"},{"path":"https://elipousson.github.io/sfext/reference/get_measurements.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get measurements for simple feature objects — get_measurements","text":"x sf sfc object measure. units Units return area, length, perimeter, distance; Default: NULL keep_all TRUE, return columns original object, Default: TRUE drop TRUE, drop units line lengths, Default: FALSE .id Column name use area, line length/perimeter, distance, bearing. sf, sfc, bbox object length 2 character vector. \"\" sf sfc object, must either single feature number features x (by_element TRUE). \"\" character vector must represent valid xy pair using following options: \"xmin\", \"ymin\", \"xmax\", \"ymax\", \"xmid\", \"ymid\". by_element logical; TRUE, return vector distance first elements x y, second, etc; error raised x y length. FALSE, return dense matrix pairwise distances. ... passed s2_distance, s2_distance_matrix, s2_perimeter dir Logical indicator whether include direction bearing; FALSE, return absolute (positive) bearing value. TRUE, return negative positive bearing values. Default: FALSE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_measurements.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get measurements for simple feature objects — get_measurements","text":"Wrapper functions sf::geos_measures: get_area(): Wraps sf::st_area() MULTIPOINT MULTILINESTRING geometry converted polygon using sf::st_polygonize() used determine coverage area. get_length(): Wraps sf::st_length() POINT MULTIPOINT geometry converted LINESTRING using as_lines(). x POLYGON geometry, lwgeom::st_perimeter() used return perimeter instead length. get_dist(): Wraps sf::st_distance() x converted POINT using st_center() \"\" can POINT, sf object can converted POINT, character vector indicating point overall bounding box x. Additional measurement functions: get_bearing(): Wraps geosphere::bearing().","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/get_measurements.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get measurements for simple feature objects — get_measurements","text":"","code":"nc <- read_sf_path(system.file(\"shape/nc.shp\", package = \"sf\")) # Get area for North Caroline counties get_area(nc[1:2,])$area #> Units: [m^2] #> [1] 1137107793 610916077 get_area(nc[1:2,], units = \"acres\")$area #> Units: [acres] #> [1] 280984.3 150960.0 get_area(nc[1:2,], units = \"acres\", .id = \"acreage\")$acreage #> Units: [acres] #> [1] 280984.3 150960.0 # Get distances for North Caroline counties get_dist(nc[1,], to = c(\"xmax\", \"ymax\"), units = \"mile\")$dist #> Units: [mile] #> [,1] #> [1,] 18.03826 get_dist(nc[1,], to = nc[30,], units = \"km\")$dist #> 239.2365 [km] # Create a line between two counties nc_line <- as_line(c(as_point(nc[1,]), as_point(nc[30,])), crs = sf::st_crs(nc)) # Get length and bearing of the line get_length(nc_line) #> Simple feature collection with 1 feature and 1 field #> Geometry type: LINESTRING #> Dimension: XY #> Bounding box: xmin: -81.49823 ymin: 36.02862 xmax: -78.87809 ymax: 36.4314 #> Geodetic CRS: NAD27 #> # A tibble: 1 × 2 #> length geometry #> [m] #> 1 239236. (-81.49823 36.4314, -78.87809 36.02862) get_bearing(nc_line) #> Simple feature collection with 1 feature and 1 field #> Geometry type: LINESTRING #> Dimension: XY #> Bounding box: xmin: -81.49823 ymin: 36.02862 xmax: -78.87809 ymax: 36.4314 #> Geodetic CRS: NAD27 #> # A tibble: 1 × 2 #> bearing geometry #> #> 1 100. (-81.49823 36.4314, -78.87809 36.02862)"},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/get_paper.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get standard paper and image sizes — get_paper","text":"","code":"get_paper( paper = \"letter\", orientation = \"portrait\", standard = NULL, series = NULL, size = NULL, width = NULL, height = NULL, units = NULL, ncol = 1, nrow = 1, gutter = 0, bbox = NULL, margin = NULL, ... )"},{"path":"https://elipousson.github.io/sfext/reference/get_paper.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get standard paper and image sizes — get_paper","text":"paper Paper, Default: 'letter'. orientation Orientation \"portrait\", \"landscape\", \"square\", Default: 'portrait'. standard Size standard, \"ANSI\", \"ISO\", \"British Imperial\", \"JIS\", \"USPS\", \"Facebook\", \"Instagram\", \"Twitter\". series Size series (e.g. ), Default: NULL size Size number (used \"ISO\" \"JIS\" series). Standard, series, size may required return single paper using parameters. width, height Width height units, Default: NULL. units Paper size units, either \"\", \"mm\", \"px\"; defaults NULL (using \"\" width height provided). ncol, nrow Number expected columns rows paper; used determine row_height section_asp paper data frame returned get_paper nrow ncol greater 1; defaults NULL. gutter Gutter distance units. Gutter used spacing nrow columns (variable spacing currently supported); defaults 0. bbox bounding box use get orientation using sf_bbox_asp() orientation = TRUE. margin numeric vector ggplot2 margin object. ... Additional parameters passed get_margin. plot_width can passed parameters paper single row. margin returned list column.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_paper.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get standard paper and image sizes — get_paper","text":"Data frame one paper/image sizes.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_paper.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get standard paper and image sizes — get_paper","text":"Use \"paper\" parameter (matching name paper_sizes), standard (optionally including series size) parameter, width, height units. May return multiple paper sizes depending parameters. margin provided, block_width, block_height, block_asp calculated included columns returned data frame. Paper can also data frame \"width\", \"height\", \"orientation\", \"units\" columns.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_paper.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get standard paper and image sizes — get_paper","text":"","code":"get_paper(\"letter\") #> # A tibble: 1 × 16 #> name series size standard units width height asp ncol nrow col_width #> #> 1 Letter NA ANSI in 8.5 11 0.773 1 1 8.5 #> # ℹ 5 more variables: row_height , gutter , section_asp , #> # orientation , type get_paper(paper = NULL, standard = \"ISO\", series = \"A\", size = 4) #> # A tibble: 1 × 16 #> name series size standard units width height asp ncol nrow col_width #> #> 1 A4 A ISO mm 210 297 0.707 1 1 210 #> # ℹ 5 more variables: row_height , gutter , section_asp , #> # orientation , type get_paper(width = 11, height = 17) #> # A tibble: 1 × 16 #> name series size standard units width height asp ncol nrow col_width #> #> 1 Letter NA ANSI in 8.5 11 0.773 1 1 8.5 #> # ℹ 5 more variables: row_height , gutter , section_asp , #> # orientation , type "},{"path":"https://elipousson.github.io/sfext/reference/get_scale.html","id":null,"dir":"Reference","previous_headings":"","what":"Get standard scales and convert to scale distances — get_scale","title":"Get standard scales and convert to scale distances — get_scale","text":"function returns scale standard_scales based provided name, standard, /series.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_scale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get standard scales and convert to scale distances — get_scale","text":"","code":"get_scale(scale = NULL, standard = NULL, series = NULL)"},{"path":"https://elipousson.github.io/sfext/reference/get_scale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get standard scales and convert to scale distances — get_scale","text":"scale Scale name standard_scales[[\"scale\"]]. standard Scale standard. Options include \"USGS\", \"Engineering\", \"Architectural\". series Map series standard_scales[[\"series\"]]. Series available USGS scales.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_scale.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get standard scales and convert to scale distances — get_scale","text":"tibble based standard_scales rows filtered values match parameters.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_social_image.html","id":null,"dir":"Reference","previous_headings":"","what":"Get social media image size to match platform and format — get_social_image","title":"Get social media image size to match platform and format — get_social_image","text":"See paper_sizes[paper_sizes$type == \"social\",]$name support image options.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_social_image.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get social media image size to match platform and format — get_social_image","text":"","code":"get_social_image( image = NULL, platform = NULL, format = NULL, orientation = NULL )"},{"path":"https://elipousson.github.io/sfext/reference/get_social_image.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get social media image size to match platform and format — get_social_image","text":"image Image size name, Default: NULL platform Social media platform, \"Instagram\", \"Facebook\", \"Twitter\", Default: NULL format Image format, \"post\", \"story\", \"cover\", Default: NULL orientation Image orientation, Default: NULL.","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_dist_units.html","id":null,"dir":"Reference","previous_headings":"","what":"General utility functions for working with distance units objects — is_dist_units","title":"General utility functions for working with distance units objects — is_dist_units","text":"is_dist_units(): x distance unit object? is_diff_dist(): difference x y distance? is_same_dist(): x distance y? bbox x bbox y x, y, diagonal distance? is_shorter(), is_longer(): x shorter longer y? is_same_area(): x y area? is_same_units(): x y character strings represent units objects use units?","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_dist_units.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"General utility functions for working with distance units objects — is_dist_units","text":"","code":"is_dist_units(x) is_diff_dist(x, y, units = NULL) is_same_dist(x, y, dist = NULL, diff = FALSE, call = caller_env(), ...) is_longer(x, y) is_shorter(x, y) get_dist_units(x, allow_null = TRUE, multiple = TRUE, quiet = FALSE) as_dist_units(x, units = NULL, allow_null = FALSE, call = caller_env()) is_diff_area(x, y, units = NULL, combine = TRUE) is_same_area(x, y, units = NULL, combine = TRUE, diff = FALSE, ...) is_same_units(x, y = NULL)"},{"path":"https://elipousson.github.io/sfext/reference/is_dist_units.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"General utility functions for working with distance units objects — is_dist_units","text":"x, y objects check units is_diff_dist, x y units objects, use units; default NULL. dist type distance compare x y sf, sfc, bbox objects; \"diagdist\", \"xdist\", \"ydist\". defaults NULL. diff TRUE, return results is_diff_dist is_diff_area; FALSE, return logical indicator; defaults FALSE call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. ... Additional parameters passed .equal() allow_null allow_null TRUE, allow x return NULL value; FALSE, error NULL values. multiple TRUE x character vector distance/area units, get_dist_units may return multiple units. Passed rlang::arg_match. quiet TRUE, suppress warning messages. combine TRUE, combine objects sf::st_combine() comparing area is_diff_area() is_same_area(), defaults TRUE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_dist_units.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"General utility functions for working with distance units objects — is_dist_units","text":"two additional functions support utility functions: get_dist_units(): Get distance units x (x sf units objects character string dist_unit_options) as_dist_units(): Convert x units using units::as_units","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/is_geom_type.html","id":null,"dir":"Reference","previous_headings":"","what":"What geometry type is this feature? — is_geom_type","title":"What geometry type is this feature? — is_geom_type","text":"is_geom_type() extends sf::st_geometry_type() return list standard output (\"TYPES\") additional list values logical vectors sf::st_is() \"POINTS\" (passing \"POINT\" \"MULTIPOINT\" type), \"POLYGONS\" (passing \"POLYGON\", \"MULTIPOLYGON\"), \"LINESTRINGS\" (\"LINESTRING\" \"MULTILINESTRING\"), \"GEOMETRYCOLLECTION\" \"\". st_is_ext() adds by_geometry argument passes results sf::st_is() () by_geometry FALSE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_geom_type.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"What geometry type is this feature? — is_geom_type","text":"","code":"is_geom_type(x, type = NULL, by_geometry = FALSE, ext = TRUE) is_point(x, by_geometry = FALSE) is_multipoint(x, by_geometry = FALSE) is_line(x, by_geometry = FALSE) is_multiline(x, by_geometry = FALSE) is_polygon(x, by_geometry = FALSE) is_multipolygon(x, by_geometry = FALSE) st_is_ext(x, type = NULL, by_geometry = FALSE)"},{"path":"https://elipousson.github.io/sfext/reference/is_geom_type.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"What geometry type is this feature? — is_geom_type","text":"x sf sfc object passed sf::st_geometry_type() type \"POINT\", check geometry type POINT. available geometry types; case sensitive; Default: NULL by_geometry Passed sf::st_geometry_type(); defaults FALSE ext is_geom_type(), ext TRUE check NULL, return list checks POINTS, POLYGONS, LINESTRING, returned types.","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_geom_type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"What geometry type is this feature? — is_geom_type","text":"ext FALSE type NULL, returns vector geometry types identical sf::st_geometry_type(). ext TRUE, returns list , type NULL, returns logical vector.","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"What is the class or spatial attributes of this feature? — is_sf","title":"What is the class or spatial attributes of this feature? — is_sf","text":"class spatial attributes feature?","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"What is the class or spatial attributes of this feature? — is_sf","text":"","code":"is_sf(x, ext = FALSE, allow_null = FALSE, allow_list = FALSE) is_sfg(x, allow_null = FALSE) is_sfc(x, allow_null = FALSE) is_bbox(x, allow_null = FALSE, allow_na = FALSE) is_raster(x, allow_null = FALSE) is_sp(x, allow_null = FALSE) is_geo_coords(x, allow_null = FALSE)"},{"path":"https://elipousson.github.io/sfext/reference/is_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"What is the class or spatial attributes of this feature? — is_sf","text":"x sf, sfc, bbox object. ext TRUE, check x sf, sfc, bbox class object ; defaults FALSE. (used is_sf) allow_null TRUE x NULL, return TRUE; defaults FALSE. allow_list TRUE, is_sf return TRUE x list sf objects. allow_na TRUE, is_bbox() ignores NA values. Defaults FALSE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_sf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"What is the class or spatial attributes of this feature? — is_sf","text":"is_sf: x sf class object? is_sfc: x sfc class object? is_bbox: x bbox class object? is_sf_list: x list sf class objects (without names)? is_raster: x Raster class object? is_sp: x Spatial class object type? is_geo_coords: x likely geodetic coordinate pair (length 2 numeric vector, max absolute value less equal 180)? is_wgs84: x using WSG84 coordinate reference system?","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_sf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"What is the class or spatial attributes of this feature? — is_sf","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) is_sf(nc) #> [1] TRUE is_sfc(nc$geometry) #> [1] TRUE is_sf_list(list(nc[1, ], nc[2, ])) #> [1] TRUE is_bbox(sf::st_bbox(nc)) #> [1] TRUE is_wgs84(sf::st_transform(nc, 4326)) #> [1] TRUE is_same_crs(nc, 4267) #> [1] TRUE"},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/lonlat_to_sfc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a lon/lat or lat/lon coordinate pair to a sfc object — lonlat_to_sfc","text":"","code":"lonlat_to_sfc( x, range = getOption(\"sfext.coord_range\", c(xmin = -180, ymin = -50, xmax = 180, ymax = 60)), quiet = FALSE, call = parent.frame(), ... )"},{"path":"https://elipousson.github.io/sfext/reference/lonlat_to_sfc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a lon/lat or lat/lon coordinate pair to a sfc object — lonlat_to_sfc","text":"x length 2 numeric vector geodetic coordinates EPSG:4326 coordinate reference system. range lonlat_to_sfc(), object coercible bbox object length 4 vector names xmin, xmax, ymin, ymax. coordinate pair falls outside latitude/longitude range defined vector inside range reversed, coordinates assumed lat/lon order switched lon/lat order converted point. Defaults c(\"xmin\" = -180, \"ymin\" = -50, \"xmax\" = 180, \"ymax\" = 60). Note default setting reverse valid coordinates north Anchorage, Alaska south New Zealand. quiet TRUE, suppress alert messages converting lat/lon coordinate pair lon/lat pair. Defaults FALSE. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. ... Arguments passed sf::st_sfc precision numeric; see st_as_binary check_ring_dir see st_read dim character; function called without valid geometries, argument may carry right dimension set empty geometries recompute_bbox logical; use TRUE force recomputation bounding box","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/make_sf_grid_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a sf list by grid position — make_sf_grid_list","title":"Make a sf list by grid position — make_sf_grid_list","text":"Create grid st_make_grid_ext() ","code":""},{"path":"https://elipousson.github.io/sfext/reference/make_sf_grid_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a sf list by grid position — make_sf_grid_list","text":"","code":"make_sf_grid_list( x, style = \"rect\", ncol = 2, nrow = 2, .id = \"grid_id\", crs = NULL, ... )"},{"path":"https://elipousson.github.io/sfext/reference/make_sf_grid_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a sf list by grid position — make_sf_grid_list","text":"x sf, sfc, bbox object, Default: NULL. Required. style Style cell return options including \"rect\", \"square\", \"hex\", \"flat_top_hex\", \"circle\", \"circle_offset\" ncol, nrow Used set n either NULL; defaults NULL. row id added columns grid provided. .id name use cell id column. Defaults \"id\". crs Coordinate reference system bounding box return; defaults NULL maintains crs input object. ... Arguments passed st_make_grid_ext ncol,nrow Used set n either NULL; defaults NULL. row id added columns grid provided. gutter Distance units column cell; gutter effectively serves margin negative buffer applied cells (including edges grid). desc TRUE, reverse standard order cell id numbering; defaults FALSE n n NULL square TRUE, grid set automatically 10 cells wide, Default: NULL \"polygons\", \"corners\", \"centers\"; set centers automatically style \"circle\", \"circle_offset\" buffer applied return circular polygons. filter TRUE (trim TRUE) filter grid geometry x using st_filter_ext unit Units buffer. Supported options include \"meter\", \"foot\", \"kilometer\", \"mile\", \"nautical mile\" Common abbreviations (e.g. \"km\" instead \"kilometer\") also supported. Distance units converted units matching GDAL units x; defaults \"meter\" cellsize numeric length 1 2 target cellsize: square rectangular cells width height, hexagonal cells distance opposite edges (edge length cellsize/sqrt(3)). length units object can passed, area unit object area size square hexagonal cell. trim TRUE, x trimmed y st_trim().","code":""},{"path":"https://elipousson.github.io/sfext/reference/mapview_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Use mapview to interactively explore spatial data — mapview_ext","title":"Use mapview to interactively explore spatial data — mapview_ext","text":"wrapper mapview::mapview() drops list columns makes easier quickly specify zcol value.","code":""},{"path":"https://elipousson.github.io/sfext/reference/mapview_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use mapview to interactively explore spatial data — mapview_ext","text":"","code":"mapview_ext(x, zcol = NULL, remove_na = FALSE, ...) mapview_exif( path = NULL, fileext = \"jpeg\", popup = TRUE, tooltip = FALSE, images = NULL, width = 320, ... ) mapview_popup_img( images, popup = TRUE, tooltip = FALSE, map = NULL, width = 320, ..., call = caller_env() )"},{"path":"https://elipousson.github.io/sfext/reference/mapview_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use mapview to interactively explore spatial data — mapview_ext","text":"x Raster* Spatial* Satellite sf stars object list combination . Furthermore, can also data.frame, numeric vector character string pointing tile image folder file disk. missing, blank map drawn. value NULL return NULL. zcol attribute name(s) column number(s) attribute table column(s) rendered. See also Details. remove_na TRUE zcol NULL, filter NA values data frame column defined zcol passing mapview::mapview() ... Arguments passed mapview::mapview path path folder file. fileext File extension. Defaults \"jpeg\". popup TRUE, add popup image leaflet map; defaults TRUE. tooltip logical, whether show image(s) popup(s) (click) tooltip(s) (hover). images simple feature object columns image path/url, image width, image height. width width image(s) pixels. map optional existing map updated/added . call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/misc_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"Additional utility functions for sf objects — misc_sf","title":"Additional utility functions for sf objects — misc_sf","text":"transform_sf() similar sf::st_transform() supports sf, sfc, bbox objects crs parameter, supports sfg objects (transformed sfc), uses sf::st_set_crs() CRS provided object NA. function support bounding box transformations. relocate_sf_col() relocates sf geometry column specified column (default everything). rename_sf_col() wrapper sf::st_set_geometry() renames sf column. get_sf_col() returns \"sf_column\" attribute. get_sf_colnames() returns column names file can read sf::read_sf() allow use column names build query (provide value name_col) without reading whole file.","code":""},{"path":"https://elipousson.github.io/sfext/reference/misc_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Additional utility functions for sf objects — misc_sf","text":"","code":"transform_sf(x, crs = NULL, allow_null = TRUE, ...) relocate_sf_col(x, .after = dplyr::everything()) rename_sf_col(x, sf_col = \"geometry\") get_sf_col(x = NULL) get_sf_colnames(x = NULL, dsn = NULL, layer = NULL, ...)"},{"path":"https://elipousson.github.io/sfext/reference/misc_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Additional utility functions for sf objects — misc_sf","text":"x sf sfc object. x missing crs, crs set provided value. crs coordinate reference system identifier (numeric character) sf, sfc, bbox, crs class object supported sf::st_crs(). allow_null TRUE crs NULL, return x. ... Additional parameters passed sf::st_transform() transform_sf() sf::read_sf() get_sf_colnames() x NULL. .location place sf column ; defaults dplyr::everything(). sf_col Name use sf column renaming; defaults \"geometry\". dsn data source name (interpretation varies driver - drivers, dsn file name, may also folder, contain name access credentials database); case GeoJSON, dsn may character string holding geojson data. can also open database connection. layer layer name (varies driver, may file name without extension); case layer missing, st_read read first layer dsn, give warning (unless quiet = TRUE) print message multiple layers, give error layers dsn. dsn database connection, layer can table name database identifier (see Id). also possible omit layer rather use query argument.","code":""},{"path":"https://elipousson.github.io/sfext/reference/number_features.html","id":null,"dir":"Reference","previous_headings":"","what":"Sort and number features by coordinates or distance — number_features","title":"Sort and number features by coordinates or distance — number_features","text":"Used maplayer::layer_numbers(). Supports multiple types sorting including sorting: centroid coordinates (\"lon\", \"lat\") appended get_coords() one bounding box min max values (\"xmin\", \"ymin\", \"xmax\", \"ymax\") appended get_minmax() distance corner, side midpoint, center bounding box (\"dist_xmin_ymin\", \"dist_xmax_ymax\", \"dist_xmin_ymax\", \"dist_xmax_ymin\", \"dist_xmin_ymid\", \"dist_xmax_ymid\", \"dist_xmid_ymin\", \"dist_xmid_ymax\", \"dist_xmid_ymid\") distance point (sf, sfc, bbox object) passed parameter example, eastern United States, can sort number features top-left corner map bottom right setting sort \"dist_xmin_ymax\" (default). number_features also supports range different numbering styles designed match standard enumeration options available LaTeX.","code":""},{"path":"https://elipousson.github.io/sfext/reference/number_features.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sort and number features by coordinates or distance — number_features","text":"","code":"number_features( x, col = NULL, sort = \"dist_xmin_ymax\", to = NULL, desc = FALSE, crs = NULL, num_style = \"arabic\", num_start = 1, suffix = NULL, .id = \"number\" ) number_sf( x, col = NULL, sort = \"dist_xmin_ymax\", to = NULL, desc = FALSE, crs = NULL, num_style = \"arabic\", num_start = 1, suffix = NULL, .id = \"number\" ) sort_features( x, col = NULL, sort = c(\"lon\", \"lat\"), to = NULL, desc = FALSE, crs = NULL ) sort_sf( x, col = NULL, sort = c(\"lon\", \"lat\"), to = NULL, desc = FALSE, crs = NULL )"},{"path":"https://elipousson.github.io/sfext/reference/number_features.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sort and number features by coordinates or distance — number_features","text":"x sf sfc object. col Group column name, Default: NULL sort Sort column name, Default: \"dist_xmin_ymax\". sf object used determine sort order based distance feature center \"\" object. desc TRUE, sort descending; default FALSE. crs Coordinate reference use get_coords() get_minmax() \"sort\" following: \"lon\", \"lat\", \"longitude\", \"latitude\", \"xmin\", \"ymin\", \"xmax\", \"ymax\" num_style Style enumeration, either \"arabic\", \"alph\", \"Alph\", \"roman\", \"Roman\". num_start Starting number; defaults 1. suffix Character appended \"number\" column. (e.g. \".\" \"1.\" \":\" \"1:\"). Can also character vector length number column. .id Name column use feature numbers; defaults \"number\".","code":""},{"path":"https://elipousson.github.io/sfext/reference/number_features.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sort and number features by coordinates or distance — number_features","text":"sf object number column ordered sort values.","code":""},{"path":"https://elipousson.github.io/sfext/reference/paper_sizes.html","id":null,"dir":"Reference","previous_headings":"","what":"Standard paper and image sizes — paper_sizes","title":"Standard paper and image sizes — paper_sizes","text":"Reference table standard paper, postcard, photo print, social media image sizes, playing card sizes get_paper() get_social_image() functions. Derived visioguy/PaperSizes repo, Adobe UK guide photo sizes sources.","code":""},{"path":"https://elipousson.github.io/sfext/reference/paper_sizes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standard paper and image sizes — paper_sizes","text":"","code":"paper_sizes"},{"path":"https://elipousson.github.io/sfext/reference/paper_sizes.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Standard paper and image sizes — paper_sizes","text":"data frame 123 rows 9 variables: name Name paper series Series standard Standard size Size series units Units (\"\", \"mm\", \"px\") dimensions width Width units height Height units orientation Portrait (width less height), landscape, square type Type (paper, postcard, print, social)","code":""},{"path":"https://elipousson.github.io/sfext/reference/rdeck_edit.html","id":null,"dir":"Reference","previous_headings":"","what":"rdeck editor — rdeck_edit","title":"rdeck editor — rdeck_edit","text":"wrapper rdeck::editor_options() automatically converts features WGS84.","code":""},{"path":"https://elipousson.github.io/sfext/reference/rdeck_edit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"rdeck editor — rdeck_edit","text":"","code":"rdeck_edit(features, mode = rdeck::cur_value(), initial_bounds = NULL, ...) rdeck_select(features, ..., mode = \"select\") editor_options(mode = rdeck::cur_value(), features = rdeck::cur_value())"},{"path":"https://elipousson.github.io/sfext/reference/rdeck_edit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"rdeck editor — rdeck_edit","text":"features Features initialise editor. Requires CRS EPSG:4326. mode polygon editor mode. One : view: editor readonly mode select: select/unselect features modify: add/move/delete vertices transform: move/scale/rotate selected features point: draw points linestring: draw linestrings clicking vertex polygon: draw polygons clicking vertex lasso: freehand polygon draw click-dragging initial_bounds Sets initial bounds map NULL. Takes priority initial_view_state. Accepts bounding box, geometry bounding box can computed. Requires CRS EPSG:4326. ... Arguments passed rdeck::rdeck map_style mapbox basemap style url. See https://docs.mapbox.com/api/maps/#mapbox-styles theme <\"kepler\" | \"light\"> widget theme alters style legend tooltips. initial_view_state Defines map position, zoom, bearing pitch. controller NULL FALSE, map interactive. picking_radius Extra pixels around pointer include picking; useful rendering objects difficult hover, e.g. thin lines, small points, etc. use_device_pixels Controls resolution drawing buffer used rendering. TRUE: Resolution defined window.devicePixelRatio. Retina/HD displays, resolution usually twice big CSS pixels resolution. FALSE: CSS pixels resolution used rendering. number: Custom ratio (drawing buffer resolution CSS pixel) determine drawing buffer size. value less 1 uses resolution smaller CSS pixels, improving rendering performance expense image quality; value greater 1 improves image quality expense rendering performance. blending_mode <\"normal\" | \"additive\" | \"subtractive\"> Sets blending mode. Blending modes: normal: Normal blending alter colours overlapping objects. additive: Additive blending adds colours overlapping objects. Useful highlighting dot density dark maps. subtractive: Subtractive blending darkens overlapping objects. Useful highlighting dot density light maps. layer_selector TRUE, layer selector control enabled layers visibility_toggle = TRUE may toggled. FALSE, layer selector control rendered. editor Whether render polygon editor. TRUE, renders default editor_options(). FALSE, polygon editor rendered. lazy_load . Maps always eagerly rendered. width width map canvas. height height map canvas. id map element id. used shiny applications.","code":""},{"path":"https://elipousson.github.io/sfext/reference/read_sf_exif.html","id":null,"dir":"Reference","previous_headings":"","what":"Read EXIF metadata to create a simple feature object or write EXIF metadata to image files — read_sf_exif","title":"Read EXIF metadata to create a simple feature object or write EXIF metadata to image files — read_sf_exif","text":"read_sf_exif() read EXIF data folder files , geometry TRUE coordinate metadata available, convert data sf object. function also assigns cardinal direction based direction metadata recodes orientation metadata. write_exif() parameters used multiple tags values: title: Title, IPTC:Headline, IPTC:ObjectName, XMP-dc:Title description: ImageDescription, XMP-dc:Description, IPTC:Caption-Abstract keywords: Keywords, IPTC:Keywords, XMP-dc:Subject","code":""},{"path":"https://elipousson.github.io/sfext/reference/read_sf_exif.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read EXIF metadata to create a simple feature object or write EXIF metadata to image files — read_sf_exif","text":"","code":"read_sf_exif( path = NULL, fileext = NULL, filetype = NULL, bbox = NULL, sort = NULL, tags = NULL, geometry = TRUE, quiet = TRUE, ... )"},{"path":"https://elipousson.github.io/sfext/reference/read_sf_exif.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read EXIF metadata to create a simple feature object or write EXIF metadata to image files — read_sf_exif","text":"path path folder file. fileext, filetype File extension file type. filetype used fileext NULL. bbox Bounding box filter . sort Column name variable sort passed sort_features(). Currently supports \"lon\", \"lat\", \"filename\". Defaults NULL. tags Optional list EXIF tags read files. Must include GPS tags create sf object. geometry TRUE (default), return simple feature object. FALSE, return data.frame. quiet TRUE (default), suppress function messages. ... Additional parameters pass exiftoolr::exif_read()","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/read_sf_exif.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read EXIF metadata to create a simple feature object or write EXIF metadata to image files — read_sf_exif","text":"","code":"if (FALSE) { # \\dontrun{ read_sf_exif( path = system.file(\"extdata/photos\", package = \"overedge\"), filetype = \"jpeg\" ) } # }"},{"path":"https://elipousson.github.io/sfext/reference/read_sf_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","title":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","text":"extended version sf::read_sf() support reading spatial data based file path, URL, data name associated package. RDS, RDA, RData file Optionally provide bounding box filter data (data filtered download reading memory possible).","code":""},{"path":"https://elipousson.github.io/sfext/reference/read_sf_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","text":"","code":"read_sf_ext(...) read_sf_pkg( data, bbox = NULL, package = NULL, pkg = NULL, fileext = \"gpkg\", filetype = NULL, ... ) read_sf_path(path, bbox = NULL, ...) read_sf_zip( path, bbox = NULL, exdir = NULL, overwrite = TRUE, unzip = \"internal\", ... ) read_sf_rdata( path, file = NULL, refhook = NULL, bbox = NULL, .name_repair = \"check_unique\", ... ) read_sf_query( path, dsn = NULL, bbox = NULL, query = NULL, table = NULL, name = NULL, name_col = NULL, wkt_filter = NULL, zm_drop = FALSE, .name_repair = \"check_unique\", ... ) read_sf_excel( path, sheet = NULL, combine_sheets = FALSE, bbox = NULL, coords = c(\"lon\", \"lat\"), from_crs = 4326, geo = FALSE, address = \"address\", .name_repair = \"check_unique\", ... ) read_sf_csv( path, url = NULL, bbox = NULL, coords = c(\"lon\", \"lat\"), from_crs = 4326, geo = FALSE, address = \"address\", wkt = NULL, .name_repair = \"check_unique\", show_col_types = FALSE, ... ) read_sf_url(url, bbox = NULL, coords = c(\"lon\", \"lat\"), ...) read_sf_esri( url, bbox = NULL, where = NULL, name = NULL, name_col = NULL, coords = c(\"lon\", \"lat\"), from_crs = 4326, .name_repair = \"check_unique\", ... ) read_sf_felt( url = NULL, bbox = NULL, map_id = NULL, .name_repair = \"check_unique\", ... ) read_sf_gist(url, id = NULL, bbox = NULL, nth = 1, ...) read_sf_gmap( url, bbox = NULL, layer = NULL, combine_layers = FALSE, zm_drop = TRUE, .name_repair = \"check_unique\" ) read_sf_download( url, filename, bbox = NULL, path = NULL, filetype = \"geojson\", prefix = \"date\", method = \"auto\", unzip = FALSE, .name_repair = \"check_unique\", ... ) read_sf_gsheet( url, sheet = NULL, ss = NULL, bbox = NULL, ask = FALSE, coords = c(\"lon\", \"lat\"), from_crs = 4326, geo = FALSE, address = \"address\", .name_repair = \"check_unique\", ... )"},{"path":"https://elipousson.github.io/sfext/reference/read_sf_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","text":"... Additional parameters passed multiple functions; see details. data Name package dataset; used read_sf_pkg() . bbox bounding box object; defaults NULL. \"bbox\" provided, returns features intersecting bounding box. package, pkg Package name; used read_sf_pkg() . pkg used package NULL. fileext File extension. supplied list_path_filenames() pattern NULL, return file names matching extension. filetype File type supported sf::read_sf(); Default: 'gpkg'; used read_sf_pkg() required data package cache directory extdata system files. path file path. exdir directory extract files (equivalent unzip -d). created necessary. overwrite TRUE, overwrite existing files (equivalent unzip -o), otherwise ignore files (equivalent unzip -n). unzip TRUE, url must zip file downloaded cache folder, unzipped temporary directory (created tempdir()), read file using specified file type. file file path read /write . refhook function handle reference objects. .name_repair Passed repair parameter vctrs::vec_as_names() dsn data source name (interpretation varies driver - drivers, dsn file name, may also folder, contain name access credentials database); case GeoJSON, dsn may character string holding geojson data. can also open database connection. query SQL query select records; see details table table can usually inferred basename data source. table used generate custom query name name_col provided. Use sf::st_layers(dsn = dsn)[[\"name\"]] see list available table names. name, name_col Name value name column use generated query sources read read_sf_query() read_sf_esri(). wkt_filter character; WKT representation spatial filter (may used bounding box, selecting overlapping geometries); see examples zm_drop TRUE, drop Z /M dimensions using sf::st_zm sheet Sheet read. Either string (name sheet), integer (position sheet). Ignored sheet specified via range. neither argument specifies sheet, defaults first sheet. coords Character vector coordinate values. Coordinates must use crs from_crs parameter. from_crs df_to_sf(), coordinate reference system used coordinates well known text data frame. geo TRUE, use address_to_sf() geocode address column; defaults FALSE. address Address column name, Default: 'address' url url spatial data file, tabular data coordinates, ArcGIS FeatureServer MapServer access esri2sf::esri2sf() wkt Name column well-known text geometry. Used read_sf_csv(). show_col_types FALSE, show guessed column types. TRUE always show column types, even supplied. NULL (default) show column types explicitly supplied col_types argument. string condition. Default NULL (equivalent 1=1) return rows. map_id Felt map URL, map ID string, named list id type element. map_id list, must equivalent output get_felt_map() list includes \"id\" string \"type\" string value \"map\". id name column store file path. useful reading multiple input files data file paths, data collection date. NULL (default) extra column created. nth read_sf_gist(), file return gist, e.g. 1 first, 2 second. Defaults 1. layer layer name (varies driver, may file name without extension); case layer missing, st_read read first layer dsn, give warning (unless quiet = TRUE) print message multiple layers, give error layers dsn. dsn database connection, layer can table name database identifier (see Id). also possible omit layer rather use query argument. combine_layers, combine_sheets FALSE (default), return list sf object layer sheet separate item. TRUE, use purrr::map_dfr() combine layers sheets single sf object using layer sheet name additional column. filename File name; filename NULL path include file extension, name file extension required. prefix File name prefix. \"date\" adds date prefix, \"time\" adds date/time prefix; defaults NULL. method Method used downloading files. Current download methods \"internal\", \"libcurl\", \"wget\", \"curl\" \"wininet\" (Windows ), value \"auto\": see ‘Details’ ‘Note’. method can also set option \"download.file.method\": see options(). ss Something identifies Google Sheet: file id string drive_id URL can recover id one-row dribble, googledrive represents Drive files instance googlesheets4_spreadsheet, gs4_get() returns Processed as_sheets_id(). ask TRUE, ask name Google Sheet read ss provided read_sf_gsheet.","code":""},{"path":"https://elipousson.github.io/sfext/reference/read_sf_ext.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","text":"Reading data url: read_sf_url() supports multiple types urls: MapServer FeatureServer URL URL GitHub gist single spatial data file (first file used gist contains multiple) URL spatial data file, CSV file, Excel file, RDS file (RDA RData files supported read_sf_path()) Google Sheets URL public Google Maps URL","code":""},{"path":"https://elipousson.github.io/sfext/reference/read_sf_ext.html","id":"reading-data-from-a-package","dir":"Reference","previous_headings":"","what":"Reading data from a package","title":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","text":"read_sf_pkg() looks three types package data: Data loaded package External data extdata system files folder. Cached data cache directory returned rappdirs::user_cache_dir()","code":""},{"path":"https://elipousson.github.io/sfext/reference/read_sf_ext.html","id":"additional-parameters","dir":"Reference","previous_headings":"","what":"Additional ... parameters","title":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","text":"read_sf_ext() flexible function ... passed one read functions depending provided parameters. using one parameter, parameters must named. read_sf_pkg() read_sf_download() pass additional parameters read_sf_path() supports query, name_col, name, table. name name_col ignored query parameter provided. table provided, expected layer name created based file path. read_sf_url() pass , name_col, name ArcGIS FeatureServer MapServer url (passed read_sf_esri()) sheet url Google Sheet (passed googlesheets4::read_sheet()), query wkt filter parameter url type (passed sf::read_sf()).","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. filenamr make_filename","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_corners.html","id":null,"dir":"Reference","previous_headings":"","what":"Get bounding box corner points from a bbox, sfc, or sf object — sf_bbox_corners","title":"Get bounding box corner points from a bbox, sfc, or sf object — sf_bbox_corners","text":"x sf object, results include column name matching .id containing values \"SW\", \"SE\", \"NE\", \"NW\" corresponding cardinal position corner.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_corners.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get bounding box corner points from a bbox, sfc, or sf object — sf_bbox_corners","text":"","code":"sf_bbox_corners(x, .id = \"corner\", class = \"sf\")"},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_corners.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get bounding box corner points from a bbox, sfc, or sf object — sf_bbox_corners","text":"x bbox, length 1 sfc object, sf object single feature .id name use added column cardinal position points, Default: 'corner' class Class object return. Must \"sf\" (default) \"sfc\".","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_corners.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get bounding box corner points from a bbox, sfc, or sf object — sf_bbox_corners","text":"sf four features (duplicating input feature new geometry derived bounding box) length 4 sfc object POINT geometry.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_dist.html","id":null,"dir":"Reference","previous_headings":"","what":"Measure a bounding box using x, y, or diagonal distance — sf_bbox_dist","title":"Measure a bounding box using x, y, or diagonal distance — sf_bbox_dist","text":"Measure distances (sf_bbox_dist(), sf_bbox_xdist(), sf_bbox_ydist(), sf_bbox_diagdist()) Convert diag_ratio value distance value bbox diag_ratio provided (sf_bbox_diag_ratio_to_dist()); return NULL bbox diag_ratio NULL Get aspect ratio orientation (sf_bbox_asp()) (counts asp 0.9 1.1 \"square\" tolerance 0.1) (sf_bbox_orientation())","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_dist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Measure a bounding box using x, y, or diagonal distance — sf_bbox_dist","text":"","code":"sf_bbox_dist( bbox, from, to, units = NULL, drop = TRUE, by_element = TRUE, call = caller_env(), ... ) sf_bbox_xdist(bbox, units = NULL, drop = TRUE) sf_bbox_ydist(bbox, units = NULL, drop = TRUE) sf_bbox_diagdist(bbox, units = NULL, drop = TRUE) sf_bbox_diag_ratio_to_dist(bbox, diag_ratio, units = NULL, drop = TRUE) sf_bbox_asp(bbox) sf_bbox_orientation(bbox, tolerance = 0.1, call = caller_env()) sf_bbox_check_fit(bbox, dist)"},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_dist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Measure a bounding box using x, y, or diagonal distance — sf_bbox_dist","text":"bbox bbox object. , Length 2 character vectors xy pairs (e.g. c(\"xmax\", \"ymax) defining points measure distance . units units return sf_bbox_dist. Defaults NULL. drop FALSE, distance functions return units. FALSE (default), distance functions return numeric values. by_element logical; TRUE, return vector distance first elements x y, second, etc; error raised x y length. FALSE, return dense matrix pairwise distances. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. ... passed s2_distance, s2_distance_matrix, s2_perimeter diag_ratio Proportion diagonal distance (ratio distance full diagonal distance) across bounding box. tolerance Numeric value 1 used sf_bbox_orientation() describe aspect ratio landscape portrait; defaults 0.1. dist Distance compare bounding box sf_bbox_check_fit(). dist length 1 compare bounding box diagonal distance. dist length 2, compare bounding box x y distances. Return TRUE dist fits within bounding box FALSE dist exceeds bounding box limits.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_misc.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert and tranform bounding boxes — sf_bbox_misc","title":"Convert and tranform bounding boxes — sf_bbox_misc","text":"Simple bounding box functions can use : Convert bounding box simple feature object (sf_bbox_to_sf()) simple feature collection (sf_bbox_to_sfc()) Transform coordinate reference system (sf_bbox_transform()) Return point corners, center, midpoints (sf_bbox_point()) Convert bounding box SQL style query (sf_bbox_to_lonlat_query()), well known text (sf_bbox_to_wkt()) Convert point corresponding bounding box npc (normalised parent coordinates) value sf_bbox_to_npc() sf (>=1.0-17) installed, sf_bbox_transform() uses sf::st_transform() without converting sfc object back bbox.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_misc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert and tranform bounding boxes — sf_bbox_misc","text":"","code":"sf_bbox_to_sf(bbox, sf_col = \"geometry\") sf_bbox_to_sfc(bbox) sf_bbox_transform(bbox, crs = NULL) sf_bbox_point(bbox, point = NULL, crs = NULL, call = caller_env()) sf_bbox_to_wkt(bbox, crs = NULL) sf_bbox_to_lonlat_query(bbox, coords = c(\"longitude\", \"latitude\"), crs = 4326) sf_bbox_to_npc(bbox, point)"},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_misc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert and tranform bounding boxes — sf_bbox_misc","text":"bbox bbox object. sf_col name use geometry column converting simple feature object; defaults \"geometry\". crs coordinate reference system use sf_bbox_to_lonlat_query() (defaults 4326) resulting bounding box (sf_bbox_transform()) sfc object (sf_bbox_point()) (defaults NULL). point point find npc coords center call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. coords Column names coordinates query. e.g. c(\"X\", \"Y\") c(\"longitude\", \"latitude\") (default). Used sf_bbox_to_lonlat_query() .","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_misc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert and tranform bounding boxes — sf_bbox_misc","text":"sf object","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_shift.html","id":null,"dir":"Reference","previous_headings":"","what":"Shift sides, contract, or expand a bounding box — sf_bbox_shift","title":"Shift sides, contract, or expand a bounding box — sf_bbox_shift","text":"Shift, expand, contract bounding box (sf_bbox_shift(), sf_bbox_expand(), sf_bbox_contract())","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_shift.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shift sides, contract, or expand a bounding box — sf_bbox_shift","text":"","code":"sf_bbox_shift( bbox, nudge_x = 0, nudge_y = 0, side = c(\"all\", \"top\", \"bottom\", \"left\", \"right\"), dir = NULL, call = caller_env() ) sf_bbox_contract(bbox, nudge_x = 0, nudge_y = 0) sf_bbox_expand(bbox, nudge_x = 0, nudge_y = 0)"},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_shift.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shift sides, contract, or expand a bounding box — sf_bbox_shift","text":"bbox bbox object. nudge_x, nudge_y Length 1 2 numeric vector; unitless. Used passed sf_bbox_shift(). Required sf_bbox_shift(). side one sides shift: \"top\", \"bottom\", \"left\", \"right\", \"\". Required sf_bbox_shift(). dir \"\", contract bbox nudge_x nudge_y. \"\", expand bbox nudge_x nudge_y. dir NULL; absolute values used nudge_x nudge_y. Defaults NULL. Optional sf_bbox_shift(). call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating and checking sf lists — sf_list","title":"Creating and checking sf lists — sf_list","text":"Functions coercing object sf_list class objects created vctrs::new_list_of() checking lists sf objects. function allow_list parameter supports type input.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating and checking sf lists — sf_list","text":"","code":"as_sf_list( x, nm = \"data\", col = NULL, crs = NULL, clean_names = TRUE, .name_repair = \"check_unique\", call = caller_env() ) new_sf_list( x, nm = \"data\", col = NULL, clean_names = TRUE, .name_repair = \"check_unique\", call = caller_env() ) is_sf_list(x, ext = TRUE, allow_null = FALSE) sf_list_rbind(x, ...) map_as_sf_list(x, .f, ...) map_as_sf(x, .f, ...)"},{"path":"https://elipousson.github.io/sfext/reference/sf_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating and checking sf lists — sf_list","text":"x sf, sfc, bbox object. nm as_sf_list, name(s) sf list; defaults \"data\". col provided, values grouping column used names. col as_sf_list, name column used group data x sf object used group nest data passing x. crs character numeric reference coordinate reference system supported sf::st_crs() another sf, sfc, bbox object used provide crs. clean_names TRUE, clean names provided nm created based value col using janitor::clean_names. FALSE, use names provided. .name_repair One \"unique\", \"universal\", \"check_unique\". See vctrs::vec_as_names() meaning options. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. ext TRUE, check x sf, sfc, bbox class object ; defaults FALSE. (used is_sf) allow_null TRUE x NULL, return TRUE; defaults FALSE. ... sf_list_rbind(), additional parameters passed purrr::list_rbind(). map_as_sf(), additional parameters passed map. .f function, specified one following ways: named function, e.g. mean. anonymous function, e.g. \\(x) x + 1 function(x) x + 1. formula, e.g. ~ .x + 1. must use .x refer first argument. recommended require backward compatibility older versions R. string, integer, list, e.g. \"idx\", 1, list(\"idx\", 1) shorthand \\(x) pluck(x, \"idx\"), \\(x) pluck(x, 1), \\(x) pluck(x, \"idx\", 1) respectively. Optionally supply .default set default value indexed element NULL exist.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/sf_to_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert between simple feature and data frame objects — sf_to_df","title":"Convert between simple feature and data frame objects — sf_to_df","text":"sf_to_df() converts simple feature object data.frame dropping geometry , using get_coords(), converting geometry well known text, (geometry type POINT) getting coordinates centroid point surface. sfc object provided,\"drop\" geometry option supported. df_to_sf() converts data.frame simple feature object using geometry column (named \"geometry\"), address column (name matching address parameter), well known text column (named \"wkt\"), coords (must columns matching coords values). Related helper functions include check_coords() suggest appropriate coordinate column names based column names provided data frame; has_coords() check data frame specified coordinates.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_to_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert between simple feature and data frame objects — sf_to_df","text":"","code":"sf_to_df( x, crs = 4326, coords = c(\"lon\", \"lat\"), geometry = \"centroid\", keep_all = TRUE ) df_to_sf( x, crs = NULL, coords = c(\"lon\", \"lat\"), from_crs = 4326, into = NULL, sep = \",\", rev = TRUE, remove_coords = FALSE, geo = FALSE, address = \"address\", y = NULL, by = NULL, ..., as_tibble = TRUE, .name_repair = \"unique\", call = caller_env() )"},{"path":"https://elipousson.github.io/sfext/reference/sf_to_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert between simple feature and data frame objects — sf_to_df","text":"x sf sfc object data frame lat/lon coordinates single column two separated columns. crs Cordinate reference system return, Default: 4326 sf_to_df() NULL df_to_sf(). coords Coordinate columns input data.frame output sf object (geometry 'centroid' 'point') Default: c(\"lon\", \"lat\"). geometry Type geometry include data frame. options include \"drop\", \"wkt\", \"centroid\", \"point\", Default: 'centroid'. keep_all FALSE, drop columns named coords, Default: TRUE. from_crs df_to_sf(), coordinate reference system used coordinates well known text data frame. coords single column name longitude latitude, used names new columns coords separated . Passed tidyr::separate(). sep coords single column name longitude latitude, sep used separator coordinate values. Passed tidyr::separate(). rev TRUE, reverse c(\"lat\", \"lon\") coords c(\"lon\", \"lat\"). check_coords() . remove_coords df_to_sf(), TRUE, remove coordinate columns converting data frame simple feature object; defaults FALSE. geo TRUE, use address_to_sf() geocode address column; defaults FALSE. address Address column name passed tidygeocoder::geocode() tidygeocoder::geo y sf object passed y argument dplyr::left_join(). character vector variables join passed dplyr::left_join(). ... parameters passed onto methods. as_tibble TRUE, use tibble::as_tibble() make sure sf tibble returned. .name_repair Passed tibble::as_tibble(). call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_to_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert between simple feature and data frame objects — sf_to_df","text":"sf_to_df() returns data frame geometry dropped converted wkt coordinates centroid point surface; df_to_sf() returns simple feature object POINT geometry.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/sf_to_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert between simple feature and data frame objects — sf_to_df","text":"","code":"nc <- read_sf_path(system.file(\"shape/nc.shp\", package = \"sf\")) # Convert a sf object to a data frame nc_df <- sf_to_df(nc) # Convert a data frame to a sf object df_to_sf(nc_df, coords = c(\"lon\", \"lat\"), remove_coords = TRUE) #> Simple feature collection with 100 features and 14 fields #> Attribute-geometry relationships: constant (14) #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -84.05977 ymin: 34.07688 xmax: -75.80913 ymax: 36.49124 #> Geodetic CRS: WGS 84 #> # A tibble: 100 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> * #> 1 0.114 1.44 1825 1825 Ashe 37009 37009 5 1091 1 10 #> 2 0.061 1.23 1827 1827 Alle… 37005 37005 3 487 0 10 #> 3 0.143 1.63 1828 1828 Surry 37171 37171 86 3188 5 208 #> 4 0.07 2.97 1831 1831 Curr… 37053 37053 27 508 1 123 #> 5 0.153 2.21 1832 1832 Nort… 37131 37131 66 1421 9 1066 #> 6 0.097 1.67 1833 1833 Hert… 37091 37091 46 1452 7 954 #> 7 0.062 1.55 1834 1834 Camd… 37029 37029 15 286 0 115 #> 8 0.091 1.28 1835 1835 Gates 37073 37073 37 420 0 254 #> 9 0.118 1.42 1836 1836 Warr… 37185 37185 93 968 4 748 #> 10 0.124 1.43 1837 1837 Stok… 37169 37169 85 1612 1 160 #> # ℹ 90 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry # If lon and lat values are present in a single column, use the into parameter # to split the values back into separate columns nc_df$xy <- paste(nc_df$lon, nc_df$lat, sep = \",\") df_to_sf(nc_df, coords = \"xy\", into = c(\"lon\", \"lat\")) #> Simple feature collection with 100 features and 16 fields #> Attribute-geometry relationships: constant (16) #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -84.05977 ymin: 34.07688 xmax: -75.80913 ymax: 36.49124 #> Geodetic CRS: WGS 84 #> # A tibble: 100 × 17 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> * #> 1 0.114 1.44 1825 1825 Ashe 37009 37009 5 1091 1 10 #> 2 0.061 1.23 1827 1827 Alle… 37005 37005 3 487 0 10 #> 3 0.143 1.63 1828 1828 Surry 37171 37171 86 3188 5 208 #> 4 0.07 2.97 1831 1831 Curr… 37053 37053 27 508 1 123 #> 5 0.153 2.21 1832 1832 Nort… 37131 37131 66 1421 9 1066 #> 6 0.097 1.67 1833 1833 Hert… 37091 37091 46 1452 7 954 #> 7 0.062 1.55 1834 1834 Camd… 37029 37029 15 286 0 115 #> 8 0.091 1.28 1835 1835 Gates 37073 37073 37 420 0 254 #> 9 0.118 1.42 1836 1836 Warr… 37185 37185 93 968 4 748 #> 10 0.124 1.43 1837 1837 Stok… 37169 37169 85 1612 1 160 #> # ℹ 90 more rows #> # ℹ 6 more variables: BIR79 , SID79 , NWBIR79 , lon , #> # lat , geometry "},{"path":"https://elipousson.github.io/sfext/reference/sfext-package.html","id":null,"dir":"Reference","previous_headings":"","what":"sfext: Extra Functions for Simple Feature Data — sfext-package","title":"sfext: Extra Functions for Simple Feature Data — sfext-package","text":"Extra functions additional options reading, writing, transforming spatial data. Includes variety utility functions working tabular data coordinates distance area units.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/sfext-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"sfext: Extra Functions for Simple Feature Data — sfext-package","text":"Maintainer: Eli Pousson eli.pousson@gmail.com (ORCID) [copyright holder]","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_bbox_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a bounding box buffered a set distance or to match an aspect ratio — st_bbox_ext","title":"Get a bounding box buffered a set distance or to match an aspect ratio — st_bbox_ext","text":"st_bbox_ext() converts input bounding box as_bbox(), applies buffer (based specified distance proportion diagonal distance across bounding box) adjusts bounding box aspect ratio returning bounding box (another class specified class parameter). input object list sf_list object, function always returns list sf_list.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_bbox_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a bounding box buffered a set distance or to match an aspect ratio — st_bbox_ext","text":"","code":"st_bbox_ext( x, dist = NULL, diag_ratio = NULL, asp = NULL, unit = NULL, crs = NULL, class = \"bbox\", nudge = NULL, allow_null = TRUE, allow_list = TRUE ) st_bbox_asp( x, asp = NULL, class = \"bbox\", allow_null = TRUE, allow_list = TRUE )"},{"path":"https://elipousson.github.io/sfext/reference/st_bbox_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get a bounding box buffered a set distance or to match an aspect ratio — st_bbox_ext","text":"x sf, sfc, bbox, sfg, Raster, Spatial, Extent, numeric, character object (place name passed osmdata::getbb()). See as_bbox() details. dist buffer distance units. Optional. diag_ratio ratio diagonal distance area's bounding box used buffer distance. e.g. diagonal distance 3000 meters \"diag_ratio = 0.1\" 300 meter used. Ignored dist provided. asp Aspect ratio width height numeric value (e.g. 0.33) character (e.g. \"1:3\"). numeric, get_asp() returns value without modification. unit Units buffer. Supported options include \"meter\", \"foot\", \"kilometer\", \"mile\", \"nautical mile\" Common abbreviations (e.g. \"km\" instead \"kilometer\") also supported. Distance units converted units matching GDAL units x; defaults \"meter\" crs Coordinate reference system bounding box return; defaults NULL maintains crs input object. class Class object return passed as_sf_class(); defaults \"bbox\". nudge Passed parameter st_nudge() NULL. numeric vector, sf object, object can converted simple feature collection as_sfc().. allow_null TRUE (default) x NULL, return NULL , FALSE, abort function. allow_list TRUE (default), allow sf list objects input use purrr::map() apply provided parameters object within list return new sf list object.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_bbox_ext.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a bounding box buffered a set distance or to match an aspect ratio — st_bbox_ext","text":"bbox object converted match class class parameter.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_bbox_ext.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get a bounding box buffered a set distance or to match an aspect ratio — st_bbox_ext","text":"st_bbox_asp() supports aspect ratio adjustments without applying buffer. asp can supplied number string matching format \"width:height\". Common aspect ratios include \"1:1\" (1), \"4:6\" (0.666), \"8.5:11\", \"16:9\" (1.777).","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_buffer_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Buffer a simple feature or bounding box object — st_buffer_ext","title":"Buffer a simple feature or bounding box object — st_buffer_ext","text":"Return sf object buffer based dist proportion diagonal distance defined diag_ratio. x uses geographic coordinates, coordinate reference system transformed EPSG:3857 transformed back original CRS buffer applied.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_buffer_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Buffer a simple feature or bounding box object — st_buffer_ext","text":"","code":"st_buffer_ext( x, dist = NULL, diag_ratio = NULL, unit = \"meter\", dist_limits = NULL, end_style = NULL, join_style = NULL, single_side = FALSE, allow_null = TRUE, allow_list = TRUE, ... ) # Default S3 method st_buffer_ext( x, dist = NULL, diag_ratio = NULL, unit = \"meter\", dist_limits = NULL, end_style = NULL, join_style = NULL, single_side = FALSE, allow_null = TRUE, ... ) # S3 method for class 'bbox' st_buffer_ext( x, dist = NULL, diag_ratio = NULL, unit = \"meter\", dist_limits = NULL, end_style = NULL, join_style = NULL, single_side = FALSE, ... ) # S3 method for class 'list' st_buffer_ext( x, dist = NULL, diag_ratio = NULL, unit = \"meter\", dist_limits = NULL, end_style = NULL, join_style = NULL, single_side = FALSE, allow_null = TRUE, allow_list = TRUE, ... ) # S3 method for class 'sf_list' st_buffer_ext( x, dist = NULL, diag_ratio = NULL, unit = \"meter\", dist_limits = NULL, end_style = NULL, join_style = NULL, single_side = FALSE, allow_null = TRUE, allow_list = TRUE, ... ) st_edge(x, dist = NULL, diag_ratio = NULL, unit = \"meter\", ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_buffer_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Buffer a simple feature or bounding box object — st_buffer_ext","text":"x sf, sfc, bbox object list sf objects. dist buffer distance units. Optional. diag_ratio ratio diagonal distance area's bounding box used buffer distance. e.g. diagonal distance 3000 meters \"diag_ratio = 0.1\" 300 meter used. Ignored dist provided. unit Units buffer. Supported options include \"meter\", \"foot\", \"kilometer\", \"mile\", \"nautical mile\" Common abbreviations (e.g. \"km\" instead \"kilometer\") also supported. Distance units converted units matching GDAL units x; defaults \"meter\" dist_limits Numeric vector length (minimum maximum values used lower upper limits distance buffer). Units must match provided units; defaults NULL. end_style \"round\" (default), \"flat\", \"square\" passed endCapStyle parameter sf::st_buffer(). join_style \"round\" (default), \"mitre\", \"bevel\" passed joinStyle parameter sf::st_buffer(). single_side TRUE, single-sided buffers returned linear geometries, case negative dist values give buffers right-hand side, positive left. allow_null TRUE (default) x NULL, NULL value returned error. allow_list TRUE (default), allow sf list objects input use purrr::map() apply provided parameters object within list return new sf list object. ... Additional parameters passed sf::st_buffer()","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_buffer_ext.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Buffer a simple feature or bounding box object — st_buffer_ext","text":"st_edge() variation st_buffer_ext() dist diag_ratio used define width edge return either outside existing geometry (positive dist values) inside existing geometry (negative dist values).","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_cast_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Cast geometry of a simple feature object or simple feature collection to another type — st_cast_ext","title":"Cast geometry of a simple feature object or simple feature collection to another type — st_cast_ext","text":"Wrapper sf::st_cast() currently supports casting MULTIPOLYGON POLYGON MULTIPOLYGON POLYGON POINT , simplify = FALSE, can cast MULTIPOINT LINESTRING. different basic functionality st_cast development may improve utility function.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_cast_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cast geometry of a simple feature object or simple feature collection to another type — st_cast_ext","text":"","code":"st_cast_ext(x, to = \"POINT\", simplify = TRUE, ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_cast_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cast geometry of a simple feature object or simple feature collection to another type — st_cast_ext","text":"x sf sfc object cast another type. character; target type, missing, simplification tried; x type sfg (.e., single geometry) needs specified. simplify TRUE, simplify geometry type; defaults TRUE. ... Arguments passed sf::st_cast","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_clip.html","id":null,"dir":"Reference","previous_headings":"","what":"Clip the side or corner of a simple feature or bounding box object — st_clip","title":"Clip the side or corner of a simple feature or bounding box object — st_clip","text":"Clip based corner object bounding box.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_clip.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clip the side or corner of a simple feature or bounding box object — st_clip","text":"","code":"st_clip( x, clip = NULL, keep = NULL, flip = FALSE, dist = NULL, diag_ratio = NULL, unit = \"meter\" )"},{"path":"https://elipousson.github.io/sfext/reference/st_clip.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clip the side or corner of a simple feature or bounding box object — st_clip","text":"x sf bbox object clip clip Character string describing part area clip remove. Options include c(\"top\", \"right\", \"bottom\", \"left\", \"topright\", \"bottomright\", \"bottomleft\", \"topleft\"). NULL, area clipped full edge can returned. keep Alternate way defining clip (naming section keep). flip Logical. Default FALSE. TRUE, clip area kept instead removed. keep provided, flip automatically set TRUE. dist Numeric. Distance use edge. Default NULL meters. Use negative values inside edge positive numbers outside edge. diag_ratio Alternate way define edge distance. unit Units buffer. Supported options include \"meter\", \"foot\", \"kilometer\", \"mile\", \"nautical mile\" Common abbreviations (e.g. \"km\" instead \"kilometer\") also supported. Distance units converted units matching GDAL units x; defaults \"meter\"","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_clip.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clip the side or corner of a simple feature or bounding box object — st_clip","text":"sf object clipped based parameters","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_concave_hull_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a concave hull around simple feature object by attribute — st_concave_hull_ext","title":"Make a concave hull around simple feature object by attribute — st_concave_hull_ext","text":"Make concave hull around simple feature object attribute","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_concave_hull_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a concave hull around simple feature object by attribute — st_concave_hull_ext","text":"","code":"st_concave_hull_ext( x, by = NULL, centroid = FALSE, ratio = 0.5, allow_holes = FALSE )"},{"path":"https://elipousson.github.io/sfext/reference/st_concave_hull_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a concave hull around simple feature object by attribute — st_concave_hull_ext","text":"x sf object. Column name use grouping combining geometry, Default: NULL centroid TRUE, use centroids geometry x, Default: FALSE ratio numeric; fraction convex: 1 returns convex hulls, 0 maximally concave hulls allow_holes logical; TRUE, resulting concave hull may holes","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_dissolve.html","id":null,"dir":"Reference","previous_headings":"","what":"Dissolve geometry preserving existing or supplied grouping variables — st_dissolve","title":"Dissolve geometry preserving existing or supplied grouping variables — st_dissolve","text":"st_dissolve() dissolves sf sfc objects. input object sf object, existing grouping variables added grouping variables passed .parameter included output sf data frame.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_dissolve.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dissolve geometry preserving existing or supplied grouping variables — st_dissolve","text":"","code":"st_dissolve( x, ..., .by = NULL, .keep = \"nest\", do_union = TRUE, .data_key = \"data\", .dissolve_key = \"group.comp.id\", call = caller_env )"},{"path":"https://elipousson.github.io/sfext/reference/st_dissolve.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dissolve geometry preserving existing or supplied grouping variables — st_dissolve","text":"x sf sfc object. sf object, grouped data frame allowed. ... Arguments passed spdep::poly2nb pl list polygons class extending SpatialPolygons, sf sfc object containing non-empty (multi-)polygon objects row.names character vector region ids added neighbours list attribute region.id, default seq(1, nrow(x)); pl row.names, used instead default sequence. snap boundary points less snap distance apart considered indicate contiguity; used find candidate actual neighbours planar geometries, actual neighbours spherical geometries, spherical spatial indexing injects fuzzyness. set, SpatialPolygons objects, default sqrt(.Machine$double.eps), value also used sf objects coordinate reference system. sf objects defined coordinate reference system, default value 1e-7 geographical coordinates (approximately 10mm), 10mm projected coordinates metre units, converted 10mm distance units coordinates. conversion fail, snap reverts sqrt(.Machine$double.eps). queen TRUE, single shared boundary point meets contiguity condition, FALSE, one shared point required; note one shared boundary point necessarily mean shared boundary line useC default TRUE, work loop C, may set false revert R code calling two C functions n*k work loop, k average number candidate neighbours foundInBox default NULL using R code st_intersects() generate candidate neighbours (using snap= geometries spherical); NULL (legacy purposes) list length (n-1) integer vectors candidate neighbours (j > ) (created poly_findInBoxGEOS function rgeos clean polygons) . Optionally, selection columns group just operation, functioning alternative group_by(). details examples, see ?dplyr_by. .keep Method handling attributes input data. default (\"nest\"), input data converted nested list column name .data_key. values do_union Use sf::st_union() dissolve geometry TRUE (default). Use sf::st_combine() FALSE. .data_key Passed .data argument tidyr::nest() .dissolve_key Used column name dissolve grouping variable. x existing columns name. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_erase.html","id":null,"dir":"Reference","previous_headings":"","what":"Erase or trim geometry of a sf or sfc object — st_erase","title":"Erase or trim geometry of a sf or sfc object — st_erase","text":"st_erase() extends sf::st_difference() unioning second parameter default, checking validity inputs, optionally (flip = TRUE) using sf::st_intersection() instead sf::st_difference. st_trim() equivalent st_erase() flip set TRUE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_erase.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Erase or trim geometry of a sf or sfc object — st_erase","text":"","code":"st_erase(x, y, flip = FALSE, union = TRUE, combine = FALSE, ...) st_trim(x, y, union = TRUE, combine = FALSE, ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_erase.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Erase or trim geometry of a sf or sfc object — st_erase","text":"x sf, sfc, bbox object erase trim. y sf, sfc, bbox object use erase trim. flip TRUE, use sf::st_intersection() \"erase\" geometry x intersects y; FALSE use sf::st_difference() trim x y geometry, Default: FALSE. union TRUE, union y sf::st_union() applying difference/intersection; defaults TRUE. combine TRUE union = TRUE, combine y sf::st_combine() unioning. Defaults FALSE. ... arguments passed s2_options","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_erase.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Erase or trim geometry of a sf or sfc object — st_erase","text":"","code":"nc <- read_sf_ext(system.file(\"shape/nc.shp\", package = \"sf\")) nc <- st_transform_ext(nc, 3657) plot( st_erase( sf::st_buffer(nc[1, ], 1000), nc[1, ] ), max.plot = 1 ) plot( st_trim( nc, sf::st_buffer(nc[1, ], 2000) ), max.plot = 1 )"},{"path":"https://elipousson.github.io/sfext/reference/st_filter_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter, crop, trim, or erase a simple feature object or list — st_filter_ext","title":"Filter, crop, trim, or erase a simple feature object or list — st_filter_ext","text":"Extend sf::st_filter() filter sf list sf, sfc, bbox options crop, trim erase geometry input object based predicate function. Returns x transformed match crs y NULL.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_filter_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter, crop, trim, or erase a simple feature object or list — st_filter_ext","text":"","code":"st_filter_ext( x, y = NULL, crop = FALSE, trim = FALSE, erase = FALSE, crs = NULL, .predicate = sf::st_intersects, type = NULL, allow_list = TRUE, ... ) st_filter_geom_type(x, type = NULL)"},{"path":"https://elipousson.github.io/sfext/reference/st_filter_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter, crop, trim, or erase a simple feature object or list — st_filter_ext","text":"x, y sf, sfc, bbox object. x may also sf list objects. x sf list, additional parameters ... ignored. crop TRUE, x cropped y using sf::st_crop(). trim TRUE, x trimmed y st_trim(). erase TRUE, x erased y st_erase(). crs Coordinate reference system return. .predicate geometry predicate function profile sf::st_intersects(); see details sf::st_filter() options. type Geometry type. allow_list TRUE, x can list sf, sfc, bbox objects. FALSE, sf, sfc, bbox objects supported. Defaults TRUE. ... Arguments passed sf::st_filter","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_filter_ext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Filter, crop, trim, or erase a simple feature object or list — st_filter_ext","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) plot( st_filter_ext( nc, nc[c(1:10), ] ), max.plot = 1 ) plot( st_filter_ext( nc, nc[c(1:10), ], crop = TRUE ), max.plot = 1 ) plot( st_filter_ext( nc, nc[c(1:10), ], erase = TRUE ), max.plot = 1 ) plot( st_filter_ext( nc, sf::st_union(nc[c(1:10), ]), .predicate = sf::st_disjoint ), max.plot = 1 ) st_filter_geom_type(nc, \"POINT\") #> Simple feature collection with 0 features and 14 fields #> Bounding box: xmin: NA ymin: NA xmax: NA ymax: NA #> Geodetic CRS: NAD27 #> # A tibble: 0 × 15 #> # ℹ 15 variables: AREA , PERIMETER , CNTY_ , CNTY_ID , #> # NAME , FIPS , FIPSNO , CRESS_ID , BIR74 , #> # SID74 , NWBIR74 , BIR79 , SID79 , NWBIR79 , #> # geometry st_filter_geom_type(nc, \"MULTIPOLYGON\") #> Simple feature collection with 100 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965 #> Geodetic CRS: NAD27 #> # A tibble: 100 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.114 1.44 1825 1825 Ashe 37009 37009 5 1091 1 10 #> 2 0.061 1.23 1827 1827 Alle… 37005 37005 3 487 0 10 #> 3 0.143 1.63 1828 1828 Surry 37171 37171 86 3188 5 208 #> 4 0.07 2.97 1831 1831 Curr… 37053 37053 27 508 1 123 #> 5 0.153 2.21 1832 1832 Nort… 37131 37131 66 1421 9 1066 #> 6 0.097 1.67 1833 1833 Hert… 37091 37091 46 1452 7 954 #> 7 0.062 1.55 1834 1834 Camd… 37029 37029 15 286 0 115 #> 8 0.091 1.28 1835 1835 Gates 37073 37073 37 420 0 254 #> 9 0.118 1.42 1836 1836 Warr… 37185 37185 93 968 4 748 #> 10 0.124 1.43 1837 1837 Stok… 37169 37169 85 1612 1 160 #> # ℹ 90 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry "},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/st_filter_pct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter by share of length or area of one geometry overlapping with a second geometry — st_filter_pct","text":"","code":"st_filter_pct(x, y, pct = NULL, ...) st_filter_pct_area(x, y, pct = NULL) st_filter_pct_length(x, y, pct = NULL)"},{"path":"https://elipousson.github.io/sfext/reference/st_filter_pct.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter by share of length or area of one geometry overlapping with a second geometry — st_filter_pct","text":"x sf object filter. y sf sfc object filter . pct Percent length area use threshold value filter. Numeric value 1 less. ... Additional parameters. used currently.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_filter_pct.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter by share of length or area of one geometry overlapping with a second geometry — st_filter_pct","text":"filtered version input sf object.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_join_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Complete a spatial join using a simple feature objects or an object and list — st_join_ext","title":"Complete a spatial join using a simple feature objects or an object and list — st_join_ext","text":"Wrapper sf::st_join() works sf lists.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_join_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Complete a spatial join using a simple feature objects or an object and list — st_join_ext","text":"","code":"st_join_ext(x, y, col = NULL, .id = \"name\", join = NULL, ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_join_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Complete a spatial join using a simple feature objects or an object and list — st_join_ext","text":"x sf, sfc, bbox object. y sf object column named \"name\" list sf objects items list \"name\" column. col Column name used convert y sf list already. .id Column name values added column input sf object. join geometry predicate function; defaults NULL, set sf::st_intersects() y contains POLYGON MULTIPOLYGON objects sf::st_nearest_feature() y contains types. ... Additional parameters passed sf::st_join()","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_make_grid_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a grid over a simple feature bounding box — st_make_grid_ext","title":"Make a grid over a simple feature bounding box — st_make_grid_ext","text":"Create grid id column optionally set number columns rows. documentation incomplete function may change.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_make_grid_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a grid over a simple feature bounding box — st_make_grid_ext","text":"","code":"st_make_grid_ext( x, ..., unit = NULL, crs = NULL, ncol = NULL, nrow = NULL, n = NULL, gutter = 0, desc = FALSE, cellsize = NULL, what = NULL, style = \"rect\", .id = \"id\", filter = FALSE, trim = FALSE )"},{"path":"https://elipousson.github.io/sfext/reference/st_make_grid_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a grid over a simple feature bounding box — st_make_grid_ext","text":"x sf, sfc, bbox object, Default: NULL. Required. ... Arguments passed st_bbox_ext nudge Passed parameter st_nudge() NULL. numeric vector, sf object, object can converted simple feature collection as_sfc().. dist buffer distance units. Optional. diag_ratio ratio diagonal distance area's bounding box used buffer distance. e.g. diagonal distance 3000 meters \"diag_ratio = 0.1\" 300 meter used. Ignored dist provided. allow_list TRUE (default), allow sf list objects input use purrr::map() apply provided parameters object within list return new sf list object. asp Aspect ratio width height numeric value (e.g. 0.33) character (e.g. \"1:3\"). numeric, get_asp() returns value without modification. unit Units buffer. Supported options include \"meter\", \"foot\", \"kilometer\", \"mile\", \"nautical mile\" Common abbreviations (e.g. \"km\" instead \"kilometer\") also supported. Distance units converted units matching GDAL units x; defaults \"meter\" crs Coordinate reference system bounding box return; defaults NULL maintains crs input object. ncol, nrow Used set n either NULL; defaults NULL. row id added columns grid provided. n n NULL square TRUE, grid set automatically 10 cells wide, Default: NULL gutter Distance units column cell; gutter effectively serves margin negative buffer applied cells (including edges grid). desc TRUE, reverse standard order cell id numbering; defaults FALSE cellsize numeric length 1 2 target cellsize: square rectangular cells width height, hexagonal cells distance opposite edges (edge length cellsize/sqrt(3)). length units object can passed, area unit object area size square hexagonal cell. \"polygons\", \"corners\", \"centers\"; set centers automatically style \"circle\", \"circle_offset\" buffer applied return circular polygons. style Style cell return options including \"rect\", \"square\", \"hex\", \"flat_top_hex\", \"circle\", \"circle_offset\" .id name use cell id column. Defaults \"id\". filter TRUE (trim TRUE) filter grid geometry x using st_filter_ext trim TRUE, x trimmed y st_trim().","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/st_make_grid_ext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make a grid over a simple feature bounding box — st_make_grid_ext","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) # Make a 2 by 2 grid across a location with a 1000 meter gutter between each cell plot( st_make_grid_ext( x = nc[24, ], dist = 500, unit = \"meter\", ncol = 2, nrow = 2, gutter = 1000 ) ) # Make a 5 by 5 grid with a 8.5 by 11 aspect ratio filtered to x plot( st_make_grid_ext( x = nc[24, ], asp = 8.5 / 11, ncol = 5, nrow = 5, filter = TRUE ) ) # Make a 4 by 5 grid of circles trimmed to x boundaries plot( st_make_grid_ext( x = nc[24, ], ncol = 4, nrow = 5, style = \"circle_offset\", trim = TRUE ), max.plot = 1 )"},{"path":"https://elipousson.github.io/sfext/reference/st_make_valid_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if all geometries are already valid and make valid if not — st_make_valid_ext","title":"Checks if all geometries are already valid and make valid if not — st_make_valid_ext","text":"Checks geometries already valid make valid ","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_make_valid_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if all geometries are already valid and make valid if not — st_make_valid_ext","text":"","code":"st_make_valid_ext(x, ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_make_valid_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if all geometries are already valid and make valid if not — st_make_valid_ext","text":"x object class sfg, sfc sf ... passed s2_options","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_misc.html","id":null,"dir":"Reference","previous_headings":"","what":"Modify the geometry of a simple feature or bounding box object — st_misc","title":"Modify the geometry of a simple feature or bounding box object — st_misc","text":"Support sf, sfc, bbox objects inputs. Get center point sf object Get circumscribed circle inscribed circle sf object Get donut sf object (may work inscribed = TRUE) st_inscribed_square wraps sf::st_inscribed_circle() limits circle 1 segment per quadrant (nQuadSegs = 1) rotates resulting geometry 45 degrees provide (mostly) inscribed square. different rotation value can provided change orientation shape, e.g. rotate = -45 return diamond shape. st_square() wraps st_bbox_ext() asp = 1.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_misc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modify the geometry of a simple feature or bounding box object — st_misc","text":"","code":"st_center(x, class = \"list\", ext = TRUE, ...) st_circle( x, scale = 1, inscribed = TRUE, dTolerance = 0.01, by_feature = FALSE, use_hull = FALSE, use_lwgeom = FALSE ) st_circumscribed_circle(x, scale = 1, dTolerance = 0, by_feature = FALSE) st_donut(x, width = 0.4, scale = 1, inscribed = FALSE, by_feature = TRUE, ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_misc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modify the geometry of a simple feature or bounding box object — st_misc","text":"x sf, sfc, bbox object class Class return st_center(): \"sfc\", \"sf\", \"geometry\" (original input geometry), \"x\" (original input object), \"crs\" (original input crs), \"list\" (including class types). ext TRUE, st_center returns list centroid sfc object, sf object (lon lat values), original geometry (x), original crs. objects; defaults TRUE. FALSE, return sf object. ... Additional parameters passed sf::st_centroid() st_center() st_circle() st_donut(). scale st_donut(), scale apply donut using st_circle(). Defaults 1 keeps donut size input object. inscribed TRUE, make circle, square, donut inscribed within x, FALSE, make circumscribed. dTolerance numeric; tolerance parameter, specified feature geometry. run st_simplify, input data specified long-lat coordinates sf_use_s2() returns TRUE, value dTolerance must specified meters. by_feature st_donut(), TRUE input object x unioned converting donut geometry. FALSE, feature input data remains separate feature output. use_hull st_circle(), TRUE use geometry sf::st_convex_hull() (address issues MULTIPOLYGON objects). use_lwgeom TRUE, by_feature = TRUE inscribed = FALSE, use lwgeom::st_minimum_bounding_circle(). width Donut width proportion outer size.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/st_misc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Modify the geometry of a simple feature or bounding box object — st_misc","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc <- sf::st_transform(nc, crs = 3857) plot(nc, max.plot = 1) plot(st_circumscribed_circle(nc, by_feature = FALSE), max.plot = 1) plot(st_circle(nc, by_feature = FALSE), max.plot = 1, add = TRUE) plot(st_donut(nc[1:10,], by_feature = TRUE), max.plot = 1)"},{"path":"https://elipousson.github.io/sfext/reference/st_nudge.html","id":null,"dir":"Reference","previous_headings":"","what":"Nudge a simple feature to the center of another feature and/or a set distance — st_nudge","title":"Nudge a simple feature to the center of another feature and/or a set distance — st_nudge","text":"Nudge, move, shift sf, sfc, bbox object center another feature /set distance.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_nudge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Nudge a simple feature to the center of another feature and/or a set distance — st_nudge","text":"","code":"st_nudge( x, to = NULL, nudge_y = 0, nudge_x = 0, unit = NULL, scale = 1, rotate = 0, crs = NULL ) # Default S3 method st_nudge( x, to = NULL, nudge_y = 0, nudge_x = 0, unit = NULL, scale = 1, rotate = 0, crs = NULL ) # S3 method for class 'bbox' st_nudge(x, ...) # S3 method for class 'sf' st_nudge(x, ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_nudge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Nudge a simple feature to the center of another feature and/or a set distance — st_nudge","text":"x Object convert sf, sfc, bbox sf list object. sf object use new center x length 2 numeric vector nudge_y nudge_x distance (order). nudge_y, nudge_x Distance nudge geometry unit. unit NULL, distance assumed units coordinate reference system input object. unit Units nudge_y nudge_x distance (also used numeric). scale numeric; scale factor, Default: 1 rotate numeric; degrees rotate (-360 360), Default: 0 crs Coordinate reference system sf, bbox, sfc sf list object return. ... Additional parameters passed as_sf, as_sfc, as_bbox, as_sf_list","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_nudge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Nudge a simple feature to the center of another feature and/or a set distance — st_nudge","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc <- sf::st_transform(nc, crs = 3857) plot(sf::st_union(st_nudge(nc, to = nc[1, ]), nc), max.plot = 1) #> Warning: attribute variables are assumed to be spatially constant throughout all geometries"},{"path":"https://elipousson.github.io/sfext/reference/st_scale_rotate.html","id":null,"dir":"Reference","previous_headings":"","what":"Scale and rotate a simple feature object, simple feature collection, or bounding box — st_scale_rotate","title":"Scale and rotate a simple feature object, simple feature collection, or bounding box — st_scale_rotate","text":"Scale rotate simple feature bounding box object using affine transformations.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_scale_rotate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scale and rotate a simple feature object, simple feature collection, or bounding box — st_scale_rotate","text":"","code":"st_scale_rotate(x, scale = 1, rotate = 0, call = caller_env())"},{"path":"https://elipousson.github.io/sfext/reference/st_scale_rotate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scale and rotate a simple feature object, simple feature collection, or bounding box — st_scale_rotate","text":"x sf, sfc, bbox object another object coercible simple feature collection as_sfc(). scale numeric; scale factor, Default: 1 rotate numeric; degrees rotate (-360 360), Default: 0 call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_scale_rotate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scale and rotate a simple feature object, simple feature collection, or bounding box — st_scale_rotate","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc <- sf::st_transform(nc, crs = 3857) plot(st_scale_rotate(nc, scale = 0.75, rotate = 15), max.plot = 1)"},{"path":"https://elipousson.github.io/sfext/reference/st_square.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a square within or around a simple feature object or collection — st_square","title":"Create a square within or around a simple feature object or collection — st_square","text":"Get circumscribed square approximate inscribed square sf object. inscribed TRUE, square geometry returned may contained wholly within original geometry. inscribed square created bounding box inscribed circle rotated 45 degrees.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_square.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a square within or around a simple feature object or collection — st_square","text":"","code":"st_square( x, scale = 1, rotate = 0, inscribed = FALSE, by_feature = FALSE, call = caller_env() ) # Default S3 method st_square(x, ...) # S3 method for class 'sfc' st_square( x, scale = 1, rotate = 0, inscribed = FALSE, by_feature = FALSE, call = caller_env() ) # S3 method for class 'sf' st_square(x, ..., by_feature = FALSE) # S3 method for class 'bbox' st_square(x, ...) st_inscribed_square(x, scale = 1, rotate = 0, by_feature = FALSE)"},{"path":"https://elipousson.github.io/sfext/reference/st_square.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a square within or around a simple feature object or collection — st_square","text":"x sf, sfc, bbox object another object coercible simple feature collection as_sfc(). scale numeric; scale factor, Default: 1 rotate numeric; degrees rotate (-360 360), Default: 0 inscribed TRUE, returned geometry inscribed within x, FALSE (default), geometry circumscribed. by_feature TRUE, create new geometry feature. FALSE, create new geometry features combine st_union_ext(). call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. ... Additional parameters passed st_square() sfc method x sf bbox object.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_square.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a square within or around a simple feature object or collection — st_square","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc <- sf::st_transform(nc, crs = 3857) plot(st_square(nc), max.plot = 1) plot(st_square(nc[1:10, ], by_feature = TRUE), max.plot = 1)"},{"path":"https://elipousson.github.io/sfext/reference/st_transform_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Transform or convert coordinates of a simple feature or bounding box object — st_transform_ext","title":"Transform or convert coordinates of a simple feature or bounding box object — st_transform_ext","text":"function wraps sf::st_transform() supports wider range input objects , using as_sf_class() function, returns wider range objects. Typically, takes sf, sfc, bbox object transform coordinate reference system match value crs object provided crs. x data.frame x NULL allow_null TRUE (defaults FALSE) returned .","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_transform_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transform or convert coordinates of a simple feature or bounding box object — st_transform_ext","text":"","code":"st_transform_ext( x, crs = NULL, class = NULL, rotate = 0, allow_null = FALSE, allow_list = TRUE ) st_omerc(x, rotate = 0) st_wgs84(x)"},{"path":"https://elipousson.github.io/sfext/reference/st_transform_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transform or convert coordinates of a simple feature or bounding box object — st_transform_ext","text":"x sf, sfc, bbox object, list sf objects, data.frame object (always returned ). crs character numeric reference coordinate reference system supported sf::st_crs() another sf, sfc, bbox object used provide crs. class Class object return (sf bbox). x sf list, returned object remains list may converted bbox class = \"sf\". rotate rotate greater less 0, st_transform_ext() calls st_omerc() returns object Oblique Mercator projection passing value rotate gamma parameter projection. rotate must -45 45 degrees. allow_null TRUE x NULL return x without error. Defaults FALSE. allow_list TRUE, x can list sf, sfc, bbox objects. FALSE, sf, sfc, bbox objects supported. Defaults TRUE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_transform_ext.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transform or convert coordinates of a simple feature or bounding box object — st_transform_ext","text":"sf, sfc, bbox object transformed new coordinate reference system.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/st_transform_ext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transform or convert coordinates of a simple feature or bounding box object — st_transform_ext","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc_bbox <- sf::st_bbox(nc) nc_3857 <- st_transform_ext(nc, 3857) st_transform_ext(nc_bbox, crs = 4326) #> xmin ymin xmax ymax #> -84.32379 33.88210 -75.45656 36.58981 sf::st_crs(st_transform_ext(nc_3857, crs = nc))$input #> [1] \"NAD27\" sf::st_crs(st_wgs84(nc_3857))$input #> [1] \"EPSG:4326\""},{"path":"https://elipousson.github.io/sfext/reference/st_union_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Union simple feature objects and combine name column values — st_union_ext","title":"Union simple feature objects and combine name column values — st_union_ext","text":"Wrapper sf::st_union() supporting additional feature combined name column collapsed single vector cli::pluralize(). st_union_by() wraps dplyr::group_by() dplyr::summarise() allow quick unioning geometry passed parameters.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_union_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Union simple feature objects and combine name column values — st_union_ext","text":"","code":"st_union_ext( x, y = NULL, name_col = \"name\", .sf_col = NULL, label = NULL, ext = TRUE, ... ) st_union_by(x, ..., .sf_col = NULL)"},{"path":"https://elipousson.github.io/sfext/reference/st_union_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Union simple feature objects and combine name column values — st_union_ext","text":"x sf, sfc, bbox object sf st_union_by() Required. y sf sfc object, defaults NULL. name_col Column name collapse new name_col value, Default: 'name' .sf_col Geometry column name use x sf object, Default: NULL. label Length 1 character vector used name_col NULL. ext FALSE, st_union_ext() functions sf::st_union(), Default: TRUE ... Additional parameters passed sf::st_union() dplyr::group_by().","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_union_ext.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Union simple feature objects and combine name column values — st_union_ext","text":"sfc object y NULL ext FALSE. tibble sf x sf object y NULL. y provided, st_union_ext() identical sf::st_union()","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_union_ext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Union simple feature objects and combine name column values — st_union_ext","text":"","code":"nc <- read_sf_path(system.file(\"shape/nc.shp\", package = \"sf\")) nc_union <- st_union_ext(nc[10:15,], name_col = \"NAME\") nc_union #> Simple feature collection with 1 feature and 1 field #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -80.45301 ymin: 36.01413 xmax: -78.28293 ymax: 36.55104 #> Geodetic CRS: NAD27 #> # A tibble: 1 × 2 #> NAME geometry #> #> 1 Stokes, Caswell, Rockingham, Granville, Person, and… ((-79.2585 36.23569, -79… plot(nc_union)"},{"path":"https://elipousson.github.io/sfext/reference/standard_scales.html","id":null,"dir":"Reference","previous_headings":"","what":"Standard map, architectural, and engineering scales — standard_scales","title":"Standard map, architectural, and engineering scales — standard_scales","text":"Standard map scales derived USGS 2002 report map scales https://pubs.usgs.gov/fs/2002/0015/report.pdf","code":""},{"path":"https://elipousson.github.io/sfext/reference/standard_scales.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standard map, architectural, and engineering scales — standard_scales","text":"","code":"standard_scales"},{"path":"https://elipousson.github.io/sfext/reference/standard_scales.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Standard map, architectural, and engineering scales — standard_scales","text":"data frame 36 rows 16 variables: scale Scale name standard Standard (USGS, architectural, engineering) series Series name (USGS map scales ) actual_ft Scale distance 1 ft actual. actual_ft_unit Unit scale 1 ft actual. scale_in Actual distance 1 scale. scale_in_unit Unit actual distance 1 scale. scale_in_accuracy Accuracy 1 scale (approximate exact) scale_cm Actual distance 1 cm scale. scale_cm_unit Unit actual distance 1 cm scale. scale_cm_accuracy Accuracy 1 cm scale (approximate exact) size_latlon Standard size latitude/longitude size_latlon_unit Unit latitude/longitude size (minutes degrees) area_approx Approximate actual area area_approx_unit Approximate area unit series_status Series status (select USGS map series \"abandoned\")","code":""},{"path":"https://elipousson.github.io/sfext/reference/standard_scales.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standard map, architectural, and engineering scales — standard_scales","text":"Common architectural engineering scales derived FEMA guide using scales https://www.usfa.fema.gov/downloads/pdf/nfa/engineer-architect-scales.pdf","code":""},{"path":"https://elipousson.github.io/sfext/reference/write_exif_from.html","id":null,"dir":"Reference","previous_headings":"","what":"Write EXIF data for photos on spatial join with a sf object or list of sf objects — write_exif_from","title":"Write EXIF data for photos on spatial join with a sf object or list of sf objects — write_exif_from","text":"Extends read_sf_exif() filenamr::write_exif()","code":""},{"path":"https://elipousson.github.io/sfext/reference/write_exif_from.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write EXIF data for photos on spatial join with a sf object or list of sf objects — write_exif_from","text":"","code":"write_exif_from( path, fileext = NULL, filetype = NULL, from, .id = \"name\", tag = \"keywords\", join = NULL, overwrite = TRUE )"},{"path":"https://elipousson.github.io/sfext/reference/write_exif_from.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write EXIF data for photos on spatial join with a sf object or list of sf objects — write_exif_from","text":"path path folder file. fileext, filetype File extension file type. filetype used fileext NULL. sf object list sf objects object column name matching .id parameter. attribute value column used assign tag parameter file provided path based spatial relationship set join. example, may boundary data used assign keywords based photo locations. .id Column name values use tag values. tag EXIF tag update, supported options include \"keywords\", \"title\", \"description\". join geometry predicate function; defaults NULL, set sf::st_intersects contains POLYGON MULTIPOLYGON objects sf::st_nearest_feature contains types. overwrite TRUE, overwrite existing EXIF metadata present provided fields; defaults TRUE","code":""},{"path":"https://elipousson.github.io/sfext/reference/write_sf_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Write or cache a simple feature object to a file — write_sf_ext","title":"Write or cache a simple feature object to a file — write_sf_ext","text":"write_sf_ext write_sf_cache helper functions wrap sf::write_sf() function provide additional options including consistent file naming make_filename() features including:","code":""},{"path":"https://elipousson.github.io/sfext/reference/write_sf_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write or cache a simple feature object to a file — write_sf_ext","text":"","code":"write_sf_ext( data, name = NULL, label = NULL, prefix = NULL, postfix = NULL, filename = NULL, fileext = NULL, filetype = NULL, description = NULL, path = NULL, cache = FALSE, pkg = \"sfext\", overwrite = FALSE, onefile = FALSE, ... ) write_sf_list( data, name = NULL, label = NULL, prefix = NULL, postfix = NULL, filename = NULL, fileext = NULL, filetype = NULL, path = NULL, overwrite = FALSE, onefile = FALSE, cache = FALSE, ... ) write_sf_cache( data, name = NULL, label = NULL, prefix = NULL, postfix = NULL, filename = NULL, fileext = NULL, filetype = NULL, data_dir = NULL, pkg = \"sfext\", overwrite = FALSE, create = TRUE, ... ) write_sf_gist( data, name = NULL, label = NULL, prefix = NULL, postfix = NULL, filename = NULL, fileext = \"geojson\", filetype = NULL, description = NULL, public = TRUE, browse = FALSE, token = Sys.getenv(\"GITHUB_PAT\") ) write_sf_gsheet( data, name = NULL, label = NULL, prefix = NULL, postfix = NULL, filename = NULL, sheet = 1, ask = FALSE, key = NULL, ... )"},{"path":"https://elipousson.github.io/sfext/reference/write_sf_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write or cache a simple feature object to a file — write_sf_ext","text":"data sf object, data frame, object write. name Name make file name converted snake case janitor::make_clean_names(), e.g. \"Residential zoning map\" becomes \"residential_zoning_map\". name includes file extension assumed filename provided name parameter. label Label combine name converted snake case janitor::make_clean_names(). label designed identify area shared characteristics across multiple data files, maps, plots. label ignored name NULL name includes file extension. prefix File name prefix. \"date\" adds date prefix, \"time\" adds date/time prefix; defaults NULL. postfix File name postfix; defaults NULL. filename, fileext, filetype File name /file extension write. filetype superseded favor fileext. optional path includes filename type, e.g. \"~/Documents/data.geojson\". fileext can provided part filename, e.g. \"data.geojson\". filename includes file extensions separate fileext also provided, separate fileext parameter used. Supported file extensions include \"csv\", \"xlsx\", \"gsheet\" (writes Google Sheet), \"rda\", fileext supported available drivers (use sf::st_drivers() list drivers). description (character) Brief description gist (optional) path Path file data directory. Optional. path includes file extension filename fileext NULL, filename extension included path used instead. multiple file extensions provided filename, path, fileext, make_filename() abort. cache TRUE, write sf object file cache directory; defaults FALSE. pkg name package cache directory use write_sf_cache write_sf_ext cache = TRUE. overwrite Logical. Default FALSE. TRUE, overwrite existing cached files use file name. onefile TRUE fileext \"gpkg\" (directly filename), save sf list multilayer GeoPackage file names list items used layer names. ... data sf object fileext \"csv\" \"xlsx\", ... parameters passed sf_to_df() sf::write_sf() otherwise. fileext \"rda\" ... parameters passed readr::write_rds(). data_dir cache data directory, defaults rappdirs::user_cache_dir() data_dir NULL. (used write_sf_cache(); default used cache = TRUE write_sf_ext()) create FALSE path exist, return path warning. TRUE rlang::is_interactive() TRUE, ask user directory created. session interactive create TRUE, new directory created. public (logical) Whether gist public (default: TRUE) browse (logical) open newly create gist default browser (default: TRUE) token personal access token GitHub permission create gists; defaults Sys.getenv(\"GITHUB_PAT\") sheet Sheet write , sense \"worksheet\" \"tab\". can identify sheet name, string, position, number. ask TRUE, user prompted make revisions created Google Sheet. user responds prompt, date read back environment using read_sf_gsheet joined provided data column name provided key. Defaults FALSE. key ask TRUE, key required join sheet data provided data.","code":""},{"path":"https://elipousson.github.io/sfext/reference/write_sf_ext.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Write or cache a simple feature object to a file — write_sf_ext","text":"fileext \"csv\", \"xlsx\", \"gsheet\" file converted dataframe using df_to_sf() data sf object none filenames provided, user prompted save file rda file readr::write_rds(). cache TRUE use write_sf_cache() cache file writing copy path provided. data named sf list, pass name sf object list name parameter keep parameters consistent write file object list. ... parameters passed data sf list.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/write_sf_svg.html","id":null,"dir":"Reference","previous_headings":"","what":"Write an sf object to an svg file — write_sf_svg","title":"Write an sf object to an svg file — write_sf_svg","text":"write_sf_svg() uses plot() svg() create simple plot sf object geometry. function convenient working designers collaborators interested using spatial data outside R desktop GIS application.","code":""},{"path":"https://elipousson.github.io/sfext/reference/write_sf_svg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write an sf object to an svg file — write_sf_svg","text":"","code":"write_sf_svg(data, filename = NULL, path = NULL, ..., width = 10, height = 10)"},{"path":"https://elipousson.github.io/sfext/reference/write_sf_svg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write an sf object to an svg file — write_sf_svg","text":"data sf object save svg file. filename file path output file(s). page number substituted C integer format included character string, default. (Depending platform, result must less PATH_MAX characters long, may truncated . See pdf details.) Tilde expansion performed supported platform. path File path combine filename. Optional filename provided. filename optional path includes svg file extension. ... Arguments passed grDevices::svg pointsize default pointsize plotted text (big points). onefile plots appear one file separate files? family one device-independent font families, \"sans\", \"serif\" \"mono\", character string specify font family searched system-dependent way. unix-alikes (incl.\\ macOS), see ‘Cairo fonts’ section help X11. bg initial background colour: can overridden setting par(\"bg\"). antialias string, type anti-aliasing () used; defaults \"default\". symbolfamily length-one character string specifies font family used \"symbol\" font (e.g., plotmath output). width width device inches. height height device inches.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/news/index.html","id":"fixes-development-version","dir":"Changelog","previous_headings":"","what":"Fixes","title":"sfext (development version)","text":"Correct several small typos standalone sf utilities. Correct typo id_arg default value bind_sf_coverage() Correct typos internal cli_abort_ifnot() cli_warn_ifnot() functions.","code":""},{"path":"https://elipousson.github.io/sfext/news/index.html","id":"changes-development-version","dir":"Changelog","previous_headings":"","what":"Changes","title":"sfext (development version)","text":"Replace st_concave_hull st_concave_hull_ext() Avoid using .onLoad load packaged data (use namespacing per guidance R Packages book)","code":""},{"path":"https://elipousson.github.io/sfext/news/index.html","id":"new-features-development-version","dir":"Changelog","previous_headings":"","what":"New features","title":"sfext (development version)","text":"Add rdeck helper functions rdeck_edit() rdeck_select() Add mapview helper functions mapview_ext() mapview_exif() Add new read_sf_felt() function (#5) Add new st_dissolve() function.","code":""},{"path":"https://elipousson.github.io/sfext/news/index.html","id":"sfext-011-2023-03-28","dir":"Changelog","previous_headings":"","what":"sfext 0.1.1 (2023-03-28)","title":"sfext 0.1.1 (2023-03-28)","text":"Add is_wgs84() + as_wgs84() functions. Export st_edge() function. Deprecate get_data_dir() function (superseded ) filenamr::get_data_dir(). Removed write_exif() function (moved filenamr::write_exif()). Replace null.ok parameter allow_null list.ok parameter allow_list. Stop importing purrr::map() purrr::map_lgl() (replaced standalone-purrr.R). Add new pkg parameter read_sf_pkg() alternative package parameter.","code":""},{"path":"https://elipousson.github.io/sfext/news/index.html","id":"sfext-0109000-2023-03-15","dir":"Changelog","previous_headings":"","what":"sfext 0.1.0.9000 (2023-03-15)","title":"sfext 0.1.0.9000 (2023-03-15)","text":"Initial release!","code":""}] +[{"path":"https://elipousson.github.io/sfext/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2022 Eli Pousson Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/articles/introduction.html","id":"reading-sf-objects","dir":"Articles","previous_headings":"Reading and writing sf objects","what":"Reading sf objects","title":"Introduction to sfext","text":"read_sf_ext() calls one four functions depending input parameters: read_sf_path() read_sf_url() read_sf_pkg() read_sf_query() read_sf_path() similar sf::read_sf additional features. checks existence file reading, supports creation wkt_filter parameters based bounding box, supports conversion tabular data simple feature objects. second, read_sf_url(), supports reading url already supported sf::read_sf also supports ArcGIS Feature Layers (using {esri2sf} package) URLs tabular data (including CSV files Google Sheets). Several functions also support queries based name name_col value (generating simple SQL query) based provided values. read functions also support URLs GitHub Gists (assuming first file Gist spatial data file) Google MyMaps. third, read_sf_pkg(), can load spatial data installed package including exported data, files extdata folder, data package-specific cache folder. particularly useful working spatial data packages {mapbaltimore} {mapmaryland}. fourth, read_sf_query(), similar sf::read_sf provides optional spatial filter based bbox parameter supports creation queries using basic name name_col parameter.","code":"nc <- read_sf_ext(path = system.file(\"shape/nc.shp\", package = \"sf\")) # This is equivalent to read_sf_path(system.file(\"shape/nc.shp\", package = \"sf\")) # Or sf::read_sf(dsn = system.file(\"shape/nc.shp\", package = \"sf\")) glimpse(nc) #> Rows: 100 #> Columns: 15 #> $ AREA 0.114, 0.061, 0.143, 0.070, 0.153, 0.097, 0.062, 0.091, 0.11… #> $ PERIMETER 1.442, 1.231, 1.630, 2.968, 2.206, 1.670, 1.547, 1.284, 1.42… #> $ CNTY_ 1825, 1827, 1828, 1831, 1832, 1833, 1834, 1835, 1836, 1837, … #> $ CNTY_ID 1825, 1827, 1828, 1831, 1832, 1833, 1834, 1835, 1836, 1837, … #> $ NAME \"Ashe\", \"Alleghany\", \"Surry\", \"Currituck\", \"Northampton\", \"H… #> $ FIPS \"37009\", \"37005\", \"37171\", \"37053\", \"37131\", \"37091\", \"37029… #> $ FIPSNO 37009, 37005, 37171, 37053, 37131, 37091, 37029, 37073, 3718… #> $ CRESS_ID 5, 3, 86, 27, 66, 46, 15, 37, 93, 85, 17, 79, 39, 73, 91, 42… #> $ BIR74 1091, 487, 3188, 508, 1421, 1452, 286, 420, 968, 1612, 1035,… #> $ SID74 1, 0, 5, 1, 9, 7, 0, 0, 4, 1, 2, 16, 4, 4, 4, 18, 3, 4, 1, 1… #> $ NWBIR74 10, 10, 208, 123, 1066, 954, 115, 254, 748, 160, 550, 1243, … #> $ BIR79 1364, 542, 3616, 830, 1606, 1838, 350, 594, 1190, 2038, 1253… #> $ SID79 0, 3, 6, 2, 3, 5, 2, 2, 2, 5, 2, 5, 4, 4, 6, 17, 4, 7, 1, 0,… #> $ NWBIR79 19, 12, 260, 145, 1197, 1237, 139, 371, 844, 176, 597, 1369,… #> $ geometry MULTIPOLYGON (((-81.47276 3..., MULTIPOLYGON ((… bbox <- as_bbox(nc[10, ]) nc_in_bbox <- read_sf_ext(path = system.file(\"shape/nc.shp\", package = \"sf\"), bbox = bbox) nc_basemap <- ggplot() + geom_sf(data = nc) nc_basemap + geom_sf(data = nc_in_bbox, fill = \"red\") sample_esri_url <- \"https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/USA_Boundaries_2022/FeatureServer/1\" states <- read_sf_esri(url = sample_esri_url) #> ── Downloading \"USA_State\" from Layer type: \"Feature Layer\" #> Geometry type: \"esriGeometryPolygon\" #> Service CRS: \"EPSG:4326\" #> Output CRS: \"EPSG:4326\" #> # This is equivalent to read_sf_url(sample_esri_url) # Or esri2sf::esri2sf(url = sample_esri_url) # read_sf_esri and read_sf_query both support the name and name_col parameters # These parameters also work with read_sf_pkg for cached and extdata files nc_esri <- read_sf_ext(url = sample_esri_url, name_col = \"STATE_NAME\", name = \"North Carolina\") #> ── Downloading \"USA_State\" from Layer type: \"Feature Layer\" #> Geometry type: \"esriGeometryPolygon\" #> Service CRS: \"EPSG:4326\" #> Output CRS: \"EPSG:4326\" #> ggplot() + geom_sf(data = states) + geom_sf(data = nc_esri, fill = \"red\") gmap_data <- read_sf_ext(url = \"https://www.google.com/maps/d/u/0/viewer?mid=1CEssu_neU7lx_vAZs5qpufOBoUQ&ll=-3.81666561775622e-14%2C0&z=1\") ggplot() + geom_sf(data = gmap_data[2, ])"},{"path":"https://elipousson.github.io/sfext/articles/introduction.html","id":"writing-sf-objects","dir":"Articles","previous_headings":"Reading and writing sf objects","what":"Writing sf objects","title":"Introduction to sfext","text":"write_sf_ext() wraps sf::write_sf uses filenamr::make_filename() support creation consistent file names using labels date prefixes organize exports. write_sf_ext() also supports automatic creation destination folders use package-specific cache folder created rappdirs::user_cache_dir(). functions now filenamr package.","code":"filenamr::make_filename( name = \"Ashe County\", label = \"NC\", prefix = \"date\", fileext = \"gpkg\" ) #> [1] \"2024-10-09_nc_ashe_county.gpkg\""},{"path":[]},{"path":"https://elipousson.github.io/sfext/articles/introduction.html","id":"checking-and-converting-sf-objects","dir":"Articles","previous_headings":"Converting sf objects","what":"Checking and converting sf objects","title":"Introduction to sfext","text":"several helper functions used extensively package . conversions easy existing {sf} functions, alternatives follow tidyverse style syntax support wider range input values. ext parameter can used make is_sf() general allowing sf, sfc, bbox objects instead just sf objects. similar functions checking converting geometry type object including is_point(), is_polygon(), is_line(), others.","code":"is_sf(nc) #> [1] TRUE is_sfc(nc$geometry) #> [1] TRUE nc_bbox <- as_bbox(nc) is_bbox(nc_bbox) #> [1] TRUE is_sf(nc$geometry) #> [1] FALSE is_sf(nc$geometry, ext = TRUE) #> [1] TRUE is_point(nc) #> [1] FALSE is_point(suppressWarnings(sf::st_centroid(nc))) #> [1] TRUE # as_point returns an sfg object is_sfg(as_point(nc)) #> [1] TRUE # as_points returns an sfc object (and accepts numeric inputs as well as sfg) is_sfc(as_points(c(-79.40065, 35.55937), crs = 4326)) #> [1] TRUE"},{"path":"https://elipousson.github.io/sfext/articles/introduction.html","id":"converting-to-and-from-data-frames","dir":"Articles","previous_headings":"Converting sf objects","what":"Converting to and from data frames","title":"Introduction to sfext","text":"default conversion sf data frame object, uses centroid polygon. can also use surface point sf::st_point_on_surface can converted back sf object point geometry used instead original polygon: Alternatively, sf_to_df() can also use well known text output format: tidygeocoder package also used support conversion address vectors data frames.","code":"df_centroid <- sf_to_df(nc_in_bbox) df_surface_point <- sf_to_df(nc_in_bbox, geometry = \"surface point\") df_centroid_sf <- df_to_sf(df_centroid, crs = 3857) df_surface_point_sf <- df_to_sf(df_surface_point, crs = 3857) df_example_map <- ggplot() + geom_sf(data = nc_in_bbox) + geom_sf(data = df_centroid_sf, color = \"red\", size = 3) + geom_sf(data = df_surface_point_sf, color = \"blue\", size = 2) df_example_map df_wkt <- sf_to_df(nc_in_bbox, geometry = \"wkt\") glimpse(df_wkt) #> Rows: 5 #> Columns: 15 #> $ AREA 0.143, 0.124, 0.153, 0.108, 0.170 #> $ PERIMETER 1.630, 1.428, 1.616, 1.483, 1.680 #> $ CNTY_ 1828, 1837, 1839, 1900, 1903 #> $ CNTY_ID 1828, 1837, 1839, 1900, 1903 #> $ NAME \"Surry\", \"Stokes\", \"Rockingham\", \"Forsyth\", \"Guilford\" #> $ FIPS \"37171\", \"37169\", \"37157\", \"37067\", \"37081\" #> $ FIPSNO 37171, 37169, 37157, 37067, 37081 #> $ CRESS_ID 86, 85, 79, 34, 41 #> $ BIR74 3188, 1612, 4449, 11858, 16184 #> $ SID74 5, 1, 16, 10, 23 #> $ NWBIR74 208, 160, 1243, 3919, 5483 #> $ BIR79 3616, 2038, 5386, 15704, 20543 #> $ SID79 6, 5, 5, 18, 38 #> $ NWBIR79 260, 176, 1369, 5031, 7089 #> $ wkt \"POLYGON ((-80.45612 36.2427, -80.47617 36.25487, -80.53666 … df_example_map + geom_sf(data = df_to_sf(df_wkt), color = \"orange\", fill = NA) address_to_sf(x = c(\"350 Fifth Avenue, New York, NY 10118\")) #> Passing 1 address to the Nominatim single address geocoder #> Query completed in: 1.4 seconds #> Simple feature collection with 1 feature and 3 fields #> Attribute-geometry relationships: constant (3) #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -72.366 ymin: 41.10336 xmax: -72.366 ymax: 41.10336 #> Geodetic CRS: WGS 84 #> # A tibble: 1 × 4 #> address lat lon geometry #> * #> 1 350 Fifth Avenue, New York, NY 10118 41.1 -72.4 (-72.366 41.10336)"},{"path":"https://elipousson.github.io/sfext/articles/introduction.html","id":"modifying-sf-objects","dir":"Articles","previous_headings":"","what":"Modifying sf objects","title":"Introduction to sfext","text":"next group functions often provide similar functionality standard {sf} functions , , allow wider range inputs outputs offer extra features. example, st_bbox_ext() also wraps sf::st_buffer uses helper function based units::set_units buffer distance valid distance unit. notable functions category include: st_transform_ext(): takes sf, sfc, bbox objects crs parameter sf::st_transform() supports lists sf objects (look allow_list = TRUE parameter see functions support lists) st_union_ext(): unions geometry also collapsing name column single character string using cli::pluralize function st_erase(): checks validity inputs sf::st_is_valid using sf::st_difference (flip = TRUE) sf::st_difference","code":"nc_bbox <- st_bbox_ext(nc, class = \"sf\") # Similar to sf::st_sf(sf::st_as_sfc(sf::st_bbox(nc))) nc_bbox_buffer <- st_bbox_ext(nc, dist = 50, unit = \"mi\", class = \"sf\") # Similar to sf::st_buffer(nc, dist = units::as_units(50, \"mi\")) nc_basemap + geom_sf(data = nc_bbox, fill = NA, color = \"blue\") + geom_sf(data = nc_bbox_buffer, fill = NA, color = \"red\")"},{"path":"https://elipousson.github.io/sfext/articles/introduction.html","id":"getting-information-about-sf-sfc-and-bbox-objects","dir":"Articles","previous_headings":"","what":"Getting information about sf, sfc, and bbox objects","title":"Introduction to sfext","text":"also several functions return information geometry input objects. Typically, functions bind information new column existing sf input (convert sfc input objects sf results). get_length() function wraps sf::st_length (POLYGON geometries ) lwgeom::st_perimeter: get_area() function wraps sf::st_area(): get_dist() supports varied range options including using “” parameter define corner center input sf object bounding box.","code":"example_line <- as_line(as_point(nc[1, ]), as_point(nc[2, ]), crs = 4326) glimpse(get_length(example_line)) #> Rows: 1 #> Columns: 2 #> $ length [m] 34020.35 [m] #> $ geometry LINESTRING (-81.49823 36.43... glimpse(get_area(nc[1:3, ], unit = \"mi^2\")) #> Rows: 3 #> Columns: 16 #> $ AREA 0.114, 0.061, 0.143 #> $ PERIMETER 1.442, 1.231, 1.630 #> $ CNTY_ 1825, 1827, 1828 #> $ CNTY_ID 1825, 1827, 1828 #> $ NAME \"Ashe\", \"Alleghany\", \"Surry\" #> $ FIPS \"37009\", \"37005\", \"37171\" #> $ FIPSNO 37009, 37005, 37171 #> $ CRESS_ID 5, 3, 86 #> $ BIR74 1091, 487, 3188 #> $ SID74 1, 0, 5 #> $ NWBIR74 10, 10, 208 #> $ BIR79 1364, 542, 3616 #> $ SID79 0, 3, 6 #> $ NWBIR79 19, 12, 260 #> $ area [mi^2] 439.0398 [mi^2], 235.8760 [mi^2], 549.4795 [mi^2] #> $ geometry MULTIPOLYGON (((-81.47276 3..., MULTIPOLYGON (((-81.23989 3.… nc <- sf::st_transform(nc, 3857) # use drop = TRUE, to drop the units class and return a numeric column dist_example_min <- get_dist(nc, to = c(\"xmin\", \"ymin\"), unit = \"mi\", drop = TRUE) glimpse(select(dist_example_min, NAME, dist)) #> Rows: 100 #> Columns: 3 #> $ NAME \"Ashe\", \"Alleghany\", \"Surry\", \"Currituck\", \"Northampton\", \"He… #> $ dist #> $ geometry MULTIPOLYGON (((-9069486 43..., MULTIPOLYGON (((-9043562 … nc_basemap + geom_sf(data = dist_example_min, aes(fill = dist), alpha = 0.5) dist_example_mid <- get_dist(nc, to = c(\"xmid\", \"ymid\"), unit = \"mi\", drop = TRUE) nc_basemap + geom_sf(data = dist_example_mid, aes(fill = dist), alpha = 0.5)"},{"path":"https://elipousson.github.io/sfext/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Eli Pousson. Author, maintainer, copyright holder.","code":""},{"path":"https://elipousson.github.io/sfext/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Pousson E (2024). sfext: Extra Functions Simple Feature Data. R package version 0.1.1.9000, https://elipousson.github.io/sfext/, https://github.com/elipousson/sfext.","code":"@Manual{, title = {sfext: Extra Functions for Simple Feature Data}, author = {Eli Pousson}, year = {2024}, note = {R package version 0.1.1.9000, https://elipousson.github.io/sfext/}, url = {https://github.com/elipousson/sfext}, }"},{"path":"https://elipousson.github.io/sfext/index.html","id":"sfext-","dir":"","previous_headings":"","what":"Extra Functions for Simple Feature Data","title":"Extra Functions for Simple Feature Data","text":"goal sfext extend existing functions {sf} package offer range additional options working simple feature objects, bounding boxes, data frame objects coordinates spatial information.","code":""},{"path":"https://elipousson.github.io/sfext/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Extra Functions for Simple Feature Data","text":"can install development version sfext like :","code":"# pak::pkg_install(\"elipousson/sfext\")"},{"path":"https://elipousson.github.io/sfext/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Extra Functions for Simple Feature Data","text":"","code":"library(sfext)"},{"path":"https://elipousson.github.io/sfext/index.html","id":"extending-existing-sf-functions","dir":"","previous_headings":"Usage","what":"Extending existing {sf} functions","title":"Extra Functions for Simple Feature Data","text":"sfext built around existing sf functions designed offer greater flexibility around inputs outputs. example, read_sf_ext() wrapper sf::read_sf() offers similar functionality: However, read_sf_ext() also supports URLs Google Sheets, FeatureLayers, data included installed package, variety sources. function also supports optional bounding box filter. st_union_ext() nearly identical sf::st_union() optionally preserve name column (collapsing values column single string): st_buffer_ext() wraps sf::st_buffer() accepts bounding box objects input, allows set units buffer distance using character string (automatically converts buffer distance units match units input object): st_make_grid_ext() wraps sf::st_make_grid() makes easy set dimensions grid using rows, columns, overall aspect ratio: functions include crs parameter can convert coordinate reference system output (using transform_sf() sf_bbox_transform()). crs parameter also supports sf, sfc, bbox inputs. Functions include class parameter can convert class object using as_sf_class(). set functions class conversion typically wrap multiple sf functions limited input options. Please note flexibility make sfext easy use (especially interactive context) likely appropriate reproducible research. package actively developed API may change.","code":"nc <- read_sf_ext(system.file(\"shape/nc.shp\", package = \"sf\")) read_sf_ext(\"https://carto.nationalmap.gov/arcgis/rest/services/govunits/MapServer/29\", bbox = as_bbox(nc)) #> ── Downloading \"National Park\" from <]8;;https://carto.nationalmap.gov/arcgis/rest/services/govunits/MapServer/29https://carto.nationalmap.gov/arcgis/rest/s]8;; #> Layer type: \"Feature Layer\" #> Geometry type: \"esriGeometryPolygon\" #> Service CRS: \"EPSG:3857\" #> Output CRS: \"EPSG:3857\" #> #> Simple feature collection with 11 features and 19 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -13326920 ymin: 4005420 xmax: -7672089 ymax: 5887098 #> Projected CRS: WGS 84 / Pseudo-Mercator #> First 10 features: #> OBJECTID PERMANENT_IDENTIFIER SOURCE_FEATUREID #> 1 6533 2216d26b-da64-4b83-b316-449f9b44b1d0 MAPR #> 2 6564 7086b7cc-08b6-4a4b-8faa-5b9d94d97f4a KIMO #> 3 6669 f135ee2b-e71d-4bce-8cc2-be7cfb7bbcd4 WRBR #> 4 6706 d9eec3c0-ae13-4ef9-a17b-dc4858cd39d4 CALO #> 5 6755 c248d769-1a64-4b77-a215-d4d58f361cbc BLRI #> 6 6796 643dde5f-5633-4af5-b0b8-f61540ddbf61 CAHA #> 7 6804 bc97c677-3de2-478b-9d41-6da7ce83f29e GRSM #> 8 7571 adf43046-fa1b-4bdc-8341-031e00ed799a CUGA #> 9 7574 8aa2a0c5-aec3-4b30-8795-14d18265a8b8 CHAT #> 10 7583 7cc31c7a-dda3-4b97-9fac-006c34c5c8b1 GUCO #> SOURCE_DATASETID SOURCE_DATADESC #> 1 {562524A1-7D6A-40EA-AA44-2E9AEF4488EB} National Park Boundaries 3/2020 #> 2 {562524A1-7D6A-40EA-AA44-2E9AEF4488EB} National Park Boundaries 3/2020 #> 3 {562524A1-7D6A-40EA-AA44-2E9AEF4488EB} National Park Boundaries 3/2020 #> 4 {562524A1-7D6A-40EA-AA44-2E9AEF4488EB} National Park Boundaries 3/2020 #> 5 {562524A1-7D6A-40EA-AA44-2E9AEF4488EB} National Park Boundaries 3/2020 #> 6 {562524A1-7D6A-40EA-AA44-2E9AEF4488EB} National Park Boundaries 3/2020 #> 7 {562524A1-7D6A-40EA-AA44-2E9AEF4488EB} National Park Boundaries 3/2020 #> 8 {02A04210-8E12-46EA-89C7-B48F91616971} National Park Boundaries 9/2020 #> 9 {02A04210-8E12-46EA-89C7-B48F91616971} National Park Boundaries 9/2020 #> 10 {02A04210-8E12-46EA-89C7-B48F91616971} National Park Boundaries 9/2020 #> SOURCE_ORIGINATOR DATA_SECURITY DISTRIBUTION_POLICY LOADDATE GNIS_ID #> 1 National Park Service 5 E4 1.586355e+12 2775864 #> 2 National Park Service 5 E4 1.586355e+12 1223739 #> 3 National Park Service 5 E4 1.586355e+12 1027483 #> 4 National Park Service 5 E4 1.586355e+12 1000889 #> 5 National Park Service 5 E4 1.586355e+12 1009494 #> 6 National Park Service 5 E4 1.586355e+12 982628 #> 7 National Park Service 5 E4 1.586355e+12 1018241 #> 8 National Park Service 5 E4 1.602058e+12 490476 #> 9 National Park Service 5 E4 1.602058e+12 1688073 #> 10 National Park Service 5 E4 1.602058e+12 986193 #> NAME AREASQKM FTYPE FCODE #> 1 Manhattan Project National Historical Park 0.4598436 674 67400 #> 2 Kings Mountain National Military Park 15.9040186 674 67400 #> 3 Wright Brothers National Memorial 1.7347265 674 67400 #> 4 Cape Lookout National Seashore 115.0050251 674 67400 #> 5 Blue Ridge Parkway 384.0079655 674 67400 #> 6 Cape Hatteras National Seashore 125.9856098 674 67400 #> 7 Great Smoky Mountains National Park 2096.4740275 674 67400 #> 8 Cumberland Gap National Historical Park 98.4687290 674 67400 #> 9 Chattahoochee River National Recreation Area 48.0789992 674 67400 #> 10 Guilford Courthouse National Military Park 0.9179617 674 67400 #> ADMINTYPE OWNERORMANAGINGAGENCY SHAPE_Length SHAPE_Area #> 1 1 13 14168.45 776550.8 #> 2 1 13 22120.44 23836721.4 #> 3 1 13 9434.39 2657056.5 #> 4 1 13 233295.32 171056451.0 #> 5 1 13 2202935.37 596234809.6 #> 6 1 13 345532.78 190369152.0 #> 7 1 13 808754.04 3178103336.6 #> 8 1 13 164570.70 153181997.9 #> 9 1 13 326590.96 70142647.4 #> 10 1 13 10228.17 1410140.4 #> GNIS_NAME geoms #> 1 Manhattan Project National Historical Park MULTIPOLYGON (((-9394763 42... #> 2 Kings Mountain National Military Park MULTIPOLYGON (((-9062982 41... #> 3 Wright Brothers National Memorial MULTIPOLYGON (((-8423490 43... #> 4 Cape Lookout National Seashore MULTIPOLYGON (((-8468201 41... #> 5 Blue Ridge Parkway MULTIPOLYGON (((-9271423 42... #> 6 Cape Hatteras National Seashore MULTIPOLYGON (((-8415559 42... #> 7 Great Smoky Mountains National Park MULTIPOLYGON (((-9267417 42... #> 8 Cumberland Gap National Historical Park MULTIPOLYGON (((-9313282 43... #> 9 Chattahoochee River National Recreation Area MULTIPOLYGON (((-9359559 40... #> 10 Guilford Courthouse National Military Park MULTIPOLYGON (((-8886905 43... random_id <- sample(nrow(nc), size = 8) nc_union <- st_union_ext(nc[random_id, ], name_col = \"NAME\") plot( nc_union ) # Apply a 20 mile buffer to the unioned geometry plot( st_buffer_ext(nc_union, dist = 20, unit = \"mi\") ) # Make a 5 by 5 grid with a 8.5 by 11 aspect ratio filtered to x plot( st_make_grid_ext( x = nc, asp = 11 / 8.5, ncol = 5, nrow = 5, filter = TRUE ) ) nc_bbox <- as_bbox(nc, crs = 4326) nc_bbox #> xmin ymin xmax ymax #> -84.32377 33.88212 -75.45662 36.58973 as_sfc(nc[1, ], crs = 3857) #> Geometry set for 1 feature #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -9099356 ymin: 4332928 xmax: -9043563 ymax: 4382074 #> Projected CRS: WGS 84 / Pseudo-Mercator #> MULTIPOLYGON (((-9069486 4332928, -9077065 4338... as_sf(nc_bbox, crs = nc) #> Simple feature collection with 1 feature and 0 fields #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -84.32386 ymin: 33.88198 xmax: -75.45697 ymax: 36.58967 #> Geodetic CRS: NAD27 #> geometry #> 1 POLYGON ((-84.32385 33.8819..."},{"path":"https://elipousson.github.io/sfext/index.html","id":"additional-helper-functions-for-sf-objects","dir":"","previous_headings":"Usage","what":"Additional helper functions for sf objects","title":"Extra Functions for Simple Feature Data","text":"sfext also includes several helper functions add new features combining functions {sf} package, using affine geometry, adding features packages. example, st_edge() combines sf::st_buffer() sf::st_difference() get “edges” geometry. st_nudge() allows shift position sf object new location: st_donut() allows create donuts around existing features: Lastly, package whole group helper functions bbox objects. example, sf_bbox_corners() creates sf object POINT geometry based corners bounding box:","code":"plot( st_edge(nc, dist = 10, unit = \"mi\"), max.plot = 1 ) nc_nudge <- st_nudge(nc, to = nc[1, ]) plot( st_union_ext( nc, nc_nudge ), max.plot = 1 ) plot( st_donut(nc[c(1, 2, 3), ]) ) #> Warning: plotting the first 9 out of 15 attributes; use max.plot = 15 to plot #> all plot( sf_bbox_corners( as_bbox(nc) ) )"},{"path":"https://elipousson.github.io/sfext/index.html","id":"related-projects","dir":"","previous_headings":"","what":"Related projects","title":"Extra Functions for Simple Feature Data","text":"sfext depends two development packages: {papersize}: collection convenience functions extending grid, ggplot2, patchwork help sizing plots files printing paper, postcards, playing cards, physical media. {filenamr}: package help create modify file names paths (also supports reading writing EXIF metadata). also used extensively two development packages: {getdata}: package make experience getting location data easier consistent across wide variety sources. {maplayer}: consistent set functions creating map layers {ggplot2} using simple feature data. many packages build sf variety specialized use cases. worth noting include: {sfdep}: sf tidyverse friendly interface spdep package spatial dependence. {sfnetworks}: Tidy Geospatial Networks R. {sfhotspot}: set functions identify understand clusters points (typically representing locations places events). {sfx}: Extra ‘sf’ Simple Features manipulations.","code":""},{"path":"https://elipousson.github.io/sfext/reference/address_to_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"Use tidygeocoder to convert an address or data frame with an address column to an sf object — address_to_sf","title":"Use tidygeocoder to convert an address or data frame with an address column to an sf object — address_to_sf","text":"Wraps tidygeocoder::geo() tidygeocoder::geocode() convert character string data frame address column. Additional parameters passed tidygeocoder::geocode() passes ... parameters tidygeocoder::geo().","code":""},{"path":"https://elipousson.github.io/sfext/reference/address_to_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use tidygeocoder to convert an address or data frame with an address column to an sf object — address_to_sf","text":"","code":"address_to_sf( x, address = \"address\", method = \"osm\", coords = c(\"lon\", \"lat\"), remove_coords = FALSE, crs = NULL, full_results = FALSE, ..., call = caller_env() )"},{"path":"https://elipousson.github.io/sfext/reference/address_to_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use tidygeocoder to convert an address or data frame with an address column to an sf object — address_to_sf","text":"x Data frame address column. Multiple address columns currently supported. address Address column name, Default: 'address' method geocoding service used. API keys loaded environmental variables. Run usethis::edit_r_environ() open .Renviron file add API key environmental variable. example, add line GEOCODIO_API_KEY=\"YourAPIKeyHere\". \"osm\": Nominatim. \"census\": US Census. Geographic coverage limited United States. Batch geocoding supported. \"arcgis\": ArcGIS. \"geocodio\": Geocodio. Geographic coverage limited United States Canada. API key must stored environmental variable \"GEOCODIO_API_KEY\". Batch geocoding supported. \"iq\": Location IQ. API key must stored environmental variable \"LOCATIONIQ_API_KEY\". \"google\": Google. API key must stored environmental variable \"GOOGLEGEOCODE_API_KEY\". \"opencage\": OpenCage. API key must stored environmental variable \"OPENCAGE_KEY\". \"mapbox\": Mapbox. API key must stored environmental variable \"MAPBOX_API_KEY\". \"\": . API key must stored environmental variable \"HERE_API_KEY\". Batch geocoding supported, must explicitly called mode = \"batch\". \"tomtom\": TomTom. API key must stored environmental variable \"TOMTOM_API_KEY\". Batch geocoding supported. \"mapquest\": MapQuest. API key must stored environmental variable \"MAPQUEST_API_KEY\". Batch geocoding supported. \"bing\": Bing. API key must stored environmental variable \"BINGMAPS_API_KEY\". Batch geocoding supported, must explicitly called mode = \"batch\". \"geoapify\": Geoapify. API key must stored environmental variable \"GEOAPIFY_KEY\". \"cascade\" use geocode_combine geo_combine instead. \"cascade\" method first uses one geocoding service uses second geocoding service first service return results. services order specified cascade_order argument. Note compatible full_results = TRUE geocoding services different columns return. coords Coordinate columns input data.frame output sf object (geometry 'centroid' 'point') Default: c(\"lon\", \"lat\"). remove_coords df_to_sf(), TRUE, remove coordinate columns converting data frame simple feature object; defaults FALSE. crs Cordinate reference system return, Default: 4326 sf_to_df() NULL df_to_sf(). full_results returns available data geocoding service TRUE. FALSE (default) latitude longitude columns returned geocoding service. ... Arguments passed tidygeocoder::geocode .tbl dataframe containing addresses street street address column name city city column name county county column name state state column name postalcode postalcode column name (zip code United States) country country column name lat latitude column name. Can quoted unquoted (ie. lat 'lat'). long longitude column name. Can quoted unquoted (ie. long 'long'). return_input TRUE input dataset combined geocoder query results returned. FALSE geocoder results returned. limit maximum number results return per input address. many geocoding services maximum value limit parameter 100. Pass limit = NULL use default limit value selected geocoding service. batch geocoding, limit must set 1 (default) return_addresses = TRUE. use limit > 1 limit = NULL set return_input FALSE. Refer api_parameter_reference details. return_addresses TRUE return input addresses. Defaults TRUE return_input FALSE FALSE return_input TRUE. argument passed geo() function. unique_only TRUE unique results returned return_input set FALSE. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/address_to_sf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Use tidygeocoder to convert an address or data frame with an address column to an sf object — address_to_sf","text":"sf object POINT geometry geocoded addresses valid coordinates.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/area_unit_options.html","id":null,"dir":"Reference","previous_headings":"","what":"Area units (vector) — area_unit_options","title":"Area units (vector) — area_unit_options","text":"vector supported area units derived dist_units units::valid_udunits().","code":""},{"path":"https://elipousson.github.io/sfext/reference/area_unit_options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Area units (vector) — area_unit_options","text":"","code":"area_unit_options"},{"path":"https://elipousson.github.io/sfext/reference/area_unit_options.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Area units (vector) — area_unit_options","text":"character vector 41 names, plural names, aliases area units.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_crs.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert object to coordinate reference system or check coordinate reference system — as_crs","title":"Convert object to coordinate reference system or check coordinate reference system — as_crs","text":"as_crs: coerce x CRS object (optionally) error NA value returned. is_same_crs: x y coordinate reference system?","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_crs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert object to coordinate reference system or check coordinate reference system — as_crs","text":"","code":"as_crs(x = NULL, allow_na = TRUE, arg = caller_arg(x), call = caller_env()) is_same_crs(x, y) is_wgs84(x)"},{"path":"https://elipousson.github.io/sfext/reference/as_crs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert object to coordinate reference system or check coordinate reference system — as_crs","text":"x as_crs(), object convert coordinate reference system. is_same_crs() is_wgs84(), object check. as_wgs84(), object convert EPSG:4326. allow_na as_crs(), TRUE, return NA_crs_ x converted valid coordinate reference system. FALSE, error instead returning invalid CRS. arg argument name string. argument mentioned error messages input origin problem. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. y is_same_crs(), object compare x.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_crs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert object to coordinate reference system or check coordinate reference system — as_crs","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc[[\"category\"]] <- sample(c(\"A\", \"B\", \"C\"), nrow(nc), replace = TRUE) as_sf(nc$geometry) #> Simple feature collection with 100 features and 0 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965 #> Geodetic CRS: NAD27 #> # A tibble: 100 × 1 #> geometry #> #> 1 (((-81.47276 36.23436, -81.54084 36.27251, -81.56198 36.27359, -81.63306 36.… #> 2 (((-81.23989 36.36536, -81.24069 36.37942, -81.26284 36.40504, -81.26624 36.… #> 3 (((-80.45634 36.24256, -80.47639 36.25473, -80.53688 36.25674, -80.54501 36.… #> 4 (((-76.00897 36.3196, -76.01735 36.33773, -76.03288 36.33598, -76.04395 36.3… #> 5 (((-77.21767 36.24098, -77.23461 36.2146, -77.29861 36.21153, -77.29351 36.1… #> 6 (((-76.74506 36.23392, -76.98069 36.23024, -76.99475 36.23558, -77.13007 36.… #> 7 (((-76.00897 36.3196, -75.95718 36.19377, -75.98134 36.16973, -76.18317 36.3… #> 8 (((-76.56251 36.34057, -76.60424 36.31498, -76.64822 36.31532, -76.68874 36.… #> 9 (((-78.30876 36.26004, -78.28293 36.29188, -78.32125 36.54553, -78.05167 36.… #> 10 (((-80.02567 36.25023, -80.45301 36.25709, -80.43531 36.55104, -80.0481 36.5… #> # ℹ 90 more rows nc_bbox <- as_bbox(nc) nc_bbox #> xmin ymin xmax ymax #> -84.32385 33.88199 -75.45698 36.58965 as_sfc(nc_bbox) #> Geometry set for 1 feature #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965 #> Geodetic CRS: NAD27 #> POLYGON ((-84.32385 33.88199, -75.45698 33.8819... as_xy(nc[1,]) #> x y #> 1 -81.49823 36.4314 as_sf_list(nc, col = \"category\") #> #> $a #> Simple feature collection with 33 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -83.98855 ymin: 33.94867 xmax: -75.45698 ymax: 36.58965 #> Geodetic CRS: NAD27 #> # A tibble: 33 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.114 1.44 1825 1825 Ashe 37009 37009 5 1091 1 10 #> 2 0.07 2.97 1831 1831 Curr… 37053 37053 27 508 1 123 #> 3 0.124 1.43 1837 1837 Stok… 37169 37169 85 1612 1 160 #> 4 0.114 1.35 1838 1838 Casw… 37033 37033 17 1035 2 550 #> 5 0.153 1.62 1839 1839 Rock… 37157 37157 79 4449 16 1243 #> 6 0.072 1.08 1842 1842 Vance 37181 37181 91 2180 4 1179 #> 7 0.064 1.21 1892 1892 Avery 37011 37011 6 781 0 4 #> 8 0.086 1.27 1893 1893 Yadk… 37197 37197 99 1269 1 65 #> 9 0.128 1.55 1897 1897 Fran… 37069 37069 35 1399 2 736 #> 10 0.142 1.64 1913 1913 Nash 37127 37127 64 4021 8 1851 #> # ℹ 23 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry #> #> $b #> Simple feature collection with 32 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -83.9547 ymin: 33.88199 xmax: -75.7637 ymax: 36.57286 #> Geodetic CRS: NAD27 #> # A tibble: 32 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.061 1.23 1827 1827 Alle… 37005 37005 3 487 0 10 #> 2 0.143 1.63 1828 1828 Surry 37171 37171 86 3188 5 208 #> 3 0.097 1.67 1833 1833 Hert… 37091 37091 46 1452 7 954 #> 4 0.062 1.55 1834 1834 Camd… 37029 37029 15 286 0 115 #> 5 0.091 1.28 1835 1835 Gates 37073 37073 37 420 0 254 #> 6 0.143 1.66 1840 1840 Gran… 37077 37077 39 1671 4 930 #> 7 0.109 1.32 1841 1841 Pers… 37145 37145 73 1556 4 613 #> 8 0.199 1.98 1874 1874 Wilk… 37193 37193 97 3146 4 200 #> 9 0.081 1.29 1880 1880 Wata… 37189 37189 95 1323 1 17 #> 10 0.044 1.16 1887 1887 Chow… 37041 37041 21 751 1 368 #> # ℹ 22 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry #> #> $c #> Simple feature collection with 35 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 34.30505 xmax: -76.11271 ymax: 36.55629 #> Geodetic CRS: NAD27 #> # A tibble: 35 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.153 2.21 1832 1832 Nort… 37131 37131 66 1421 9 1066 #> 2 0.118 1.42 1836 1836 Warr… 37185 37185 93 968 4 748 #> 3 0.19 2.20 1846 1846 Hali… 37083 37083 42 3608 18 2365 #> 4 0.053 1.17 1848 1848 Pasq… 37139 37139 70 1638 3 622 #> 5 0.063 1 1881 1881 Perq… 37143 37143 72 484 1 230 #> 6 0.108 1.48 1900 1900 Fors… 37067 37067 34 11858 10 3919 #> 7 0.17 1.68 1903 1903 Guil… 37081 37081 41 16184 23 5483 #> 8 0.104 1.29 1907 1907 Oran… 37135 37135 68 3164 4 776 #> 9 0.059 1.32 1927 1927 Mitc… 37121 37121 61 671 0 1 #> 10 0.118 1.90 1937 1937 Mart… 37117 37117 59 1549 2 883 #> # ℹ 25 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry #>"},{"path":"https://elipousson.github.io/sfext/reference/as_point.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an sf, numeric, or other object to a POINT (sfg) or POINT, MULTIPOINT, LINESTRING, or MULTILINESTRING (sfc) object — as_points","title":"Convert an sf, numeric, or other object to a POINT (sfg) or POINT, MULTIPOINT, LINESTRING, or MULTILINESTRING (sfc) object — as_points","text":"Works sf, sfc, bbox objects using sf::st_centroid(). Works sf_bbox_point()","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_point.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an sf, numeric, or other object to a POINT (sfg) or POINT, MULTIPOINT, LINESTRING, or MULTILINESTRING (sfc) object — as_points","text":"","code":"as_point(..., to = \"POINT\") as_points(..., to = \"POINT\", call = caller_env()) as_startpoint(x) as_endpoint(x) as_line(..., to = \"LINESTRING\", call = caller_env()) as_lines(..., to = \"LINESTRING\") as_polygons(..., to = \"POLYGON\") as_centroid(x, ...)"},{"path":"https://elipousson.github.io/sfext/reference/as_point.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an sf, numeric, or other object to a POINT (sfg) or POINT, MULTIPOINT, LINESTRING, or MULTILINESTRING (sfc) object — as_points","text":"... See details. geometry type return, either POINT MULTIPOINT LINESTRING MULTILINESTRING. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. x sf, sfc, bbox object.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_point.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert an sf, numeric, or other object to a POINT (sfg) or POINT, MULTIPOINT, LINESTRING, or MULTILINESTRING (sfc) object — as_points","text":"Using as_point: as_point() always returns single point sfg object. ... parameter passed sf::st_centroid() ... sf, sfc, bbox object, sf_bbox_point() includes bbox object string indicating requested point position, sf::st_point() ... includes numeric vector. Using as_points: as_points() always returns sfc object. parameters passed as_point using purrr::map() converted sfc using sf::st_as_sfc(). ... parameters must include crs, otherwise crs NA resulting sfc object. Using as_startpoint as_endpoint: as_startpoint() as_endpoint() require LINESTRING MULTILINESTRING geometry type sf sfc object passed lwgeom::st_startpoint() lwgeom::st_endpoint() respectively. functions always return sfc object matching CRS input geometry. Using as_lines: params POINT MULTIPOINT geometry, passed as_points() convert sfc object. parameters POINT geometry, combined create MULTIPOINT geometry. as_lines() ... parameters passed as_points() /sf::st_cast(). as_line as_lines consistently retain coordinate reference system original object improved future. Using as_centroid() as_centroid() always returns sfc object length crs input object.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_point.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert an sf, numeric, or other object to a POINT (sfg) or POINT, MULTIPOINT, LINESTRING, or MULTILINESTRING (sfc) object — as_points","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) as_point(nc) #> POINT (-79.40065 35.55937) as_point(c(\"xmax\", \"ymax\"), bbox = as_bbox(nc)) #> POINT (-75.45698 36.58965) as_points(nc) #> Geometry set for 1 feature #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -79.40065 ymin: 35.55937 xmax: -79.40065 ymax: 35.55937 #> Geodetic CRS: NAD27 #> POINT (-79.40065 35.55937) as_points(nc[1, ], nc[2, ]) #> Geometry set for 2 features #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -81.49823 ymin: 36.4314 xmax: -81.12513 ymax: 36.49111 #> Geodetic CRS: NAD27 #> POINT (-81.49823 36.4314) #> POINT (-81.12513 36.49111) nc_line <- as_line(c(as_points(nc[1, ]), as_points(nc[10, ]))) as_startpoint(nc_line) #> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE #> Geometry set for 1 feature #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -81.49823 ymin: 36.4314 xmax: -81.49823 ymax: 36.4314 #> Geodetic CRS: NAD27 #> POINT (-81.49823 36.4314) as_endpoint(nc_line) #> Geometry set for 1 feature #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -80.23429 ymin: 36.40042 xmax: -80.23429 ymax: 36.40042 #> Geodetic CRS: NAD27 #> POINT (-80.23429 36.40042) as_centroid(nc) #> Geometry set for 100 features #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -84.05986 ymin: 34.07671 xmax: -75.8095 ymax: 36.49111 #> Geodetic CRS: NAD27 #> First 5 geometries: #> POINT (-81.49823 36.4314) #> POINT (-81.12513 36.49111) #> POINT (-80.68573 36.41252) #> POINT (-76.02719 36.40714) #> POINT (-77.41046 36.42236)"},{"path":"https://elipousson.github.io/sfext/reference/as_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an object to a simple feature or bounding box object — as_sf","title":"Convert an object to a simple feature or bounding box object — as_sf","text":"functions pass NULL value without returning error. POINT MULTIPOINT object passed as_bbox() 0.00000001 meter buffer applied. character object passed as_bbox() passed osmdata::getbb() using format_out = \"matrix\" converted bounding box.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an object to a simple feature or bounding box object — as_sf","text":"","code":"as_sf( x, crs = NULL, sf_col = \"geometry\", ext = TRUE, ..., as_tibble = TRUE, call = caller_env() ) as_bbox(x, crs = NULL, ext = TRUE, ..., call = caller_env()) as_sfc(x, crs = NULL, ext = TRUE, ..., call = caller_env()) as_sf_class(x, class = NULL, allow_null = TRUE, ..., call = caller_env())"},{"path":"https://elipousson.github.io/sfext/reference/as_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an object to a simple feature or bounding box object — as_sf","text":"x Object convert sf, sfc, bbox sf list object. crs Coordinate reference system sf, bbox, sfc sf list object return. sf_col column name use geometry column created as_sf; defaults \"geometry\". ext TRUE, as_sf convert data frame character vector addresses sf object using df_to_sf address_to_sf. FALSE, spatial objects (bbox, sfg, sfc, sf list, raster, sp objects) can converted. Defaults TRUE. ... Additional parameters passed as_sf, as_sfc, as_bbox, as_sf_list as_tibble TRUE, always return sf object tibble. FALSE, conversions may still return tibble object. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. class class convert data ; defaults NULL (returns \"sf\") allow_null as_sf_class, class NULL allow_null TRUE, return x without class conversion checks. Defaults TRUE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_sf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert an object to a simple feature or bounding box object — as_sf","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc[[\"category\"]] <- sample(c(\"A\", \"B\", \"C\"), nrow(nc), replace = TRUE) as_sf(nc$geometry) #> Simple feature collection with 100 features and 0 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965 #> Geodetic CRS: NAD27 #> # A tibble: 100 × 1 #> geometry #> #> 1 (((-81.47276 36.23436, -81.54084 36.27251, -81.56198 36.27359, -81.63306 36.… #> 2 (((-81.23989 36.36536, -81.24069 36.37942, -81.26284 36.40504, -81.26624 36.… #> 3 (((-80.45634 36.24256, -80.47639 36.25473, -80.53688 36.25674, -80.54501 36.… #> 4 (((-76.00897 36.3196, -76.01735 36.33773, -76.03288 36.33598, -76.04395 36.3… #> 5 (((-77.21767 36.24098, -77.23461 36.2146, -77.29861 36.21153, -77.29351 36.1… #> 6 (((-76.74506 36.23392, -76.98069 36.23024, -76.99475 36.23558, -77.13007 36.… #> 7 (((-76.00897 36.3196, -75.95718 36.19377, -75.98134 36.16973, -76.18317 36.3… #> 8 (((-76.56251 36.34057, -76.60424 36.31498, -76.64822 36.31532, -76.68874 36.… #> 9 (((-78.30876 36.26004, -78.28293 36.29188, -78.32125 36.54553, -78.05167 36.… #> 10 (((-80.02567 36.25023, -80.45301 36.25709, -80.43531 36.55104, -80.0481 36.5… #> # ℹ 90 more rows nc_bbox <- as_bbox(nc) nc_bbox #> xmin ymin xmax ymax #> -84.32385 33.88199 -75.45698 36.58965 as_sfc(nc_bbox) #> Geometry set for 1 feature #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965 #> Geodetic CRS: NAD27 #> POLYGON ((-84.32385 33.88199, -75.45698 33.8819... as_xy(nc[1,]) #> x y #> 1 -81.49823 36.4314 as_sf_list(nc, col = \"category\") #> #> $a #> Simple feature collection with 37 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -84.03086 ymin: 33.88199 xmax: -75.7637 ymax: 36.58965 #> Geodetic CRS: NAD27 #> # A tibble: 37 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.114 1.44 1825 1825 Ashe 37009 37009 5 1091 1 10 #> 2 0.061 1.23 1827 1827 Alle… 37005 37005 3 487 0 10 #> 3 0.153 2.21 1832 1832 Nort… 37131 37131 66 1421 9 1066 #> 4 0.062 1.55 1834 1834 Camd… 37029 37029 15 286 0 115 #> 5 0.109 1.32 1841 1841 Pers… 37145 37145 73 1556 4 613 #> 6 0.053 1.17 1848 1848 Pasq… 37139 37139 70 1638 3 622 #> 7 0.199 1.98 1874 1874 Wilk… 37193 37193 97 3146 4 200 #> 8 0.086 1.27 1893 1893 Yadk… 37197 37197 99 1269 1 65 #> 9 0.128 1.55 1897 1897 Fran… 37069 37069 35 1399 2 736 #> 10 0.18 2.15 1905 1905 Bert… 37015 37015 8 1324 6 921 #> # ℹ 27 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry #> #> $b #> Simple feature collection with 27 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -83.98855 ymin: 34.30505 xmax: -75.45698 ymax: 36.56521 #> Geodetic CRS: NAD27 #> # A tibble: 27 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.143 1.63 1828 1828 Surry 37171 37171 86 3188 5 208 #> 2 0.118 1.42 1836 1836 Warr… 37185 37185 93 968 4 748 #> 3 0.19 2.20 1846 1846 Hali… 37083 37083 42 3608 18 2365 #> 4 0.081 1.29 1880 1880 Wata… 37189 37189 95 1323 1 17 #> 5 0.044 1.16 1887 1887 Chow… 37041 37041 21 751 1 368 #> 6 0.064 1.21 1892 1892 Avery 37011 37011 6 781 0 4 #> 7 0.17 1.68 1903 1903 Guil… 37081 37081 41 16184 23 5483 #> 8 0.122 1.52 1932 1932 Cald… 37027 37027 14 3609 6 309 #> 9 0.118 1.60 1946 1946 Madi… 37115 37115 58 765 2 5 #> 10 0.155 1.78 1947 1947 Ired… 37097 37097 49 4139 4 1144 #> # ℹ 17 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry #> #> $c #> Simple feature collection with 36 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 33.94867 xmax: -75.77316 ymax: 36.55716 #> Geodetic CRS: NAD27 #> # A tibble: 36 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.07 2.97 1831 1831 Curr… 37053 37053 27 508 1 123 #> 2 0.097 1.67 1833 1833 Hert… 37091 37091 46 1452 7 954 #> 3 0.091 1.28 1835 1835 Gates 37073 37073 37 420 0 254 #> 4 0.124 1.43 1837 1837 Stok… 37169 37169 85 1612 1 160 #> 5 0.114 1.35 1838 1838 Casw… 37033 37033 17 1035 2 550 #> 6 0.153 1.62 1839 1839 Rock… 37157 37157 79 4449 16 1243 #> 7 0.143 1.66 1840 1840 Gran… 37077 37077 39 1671 4 930 #> 8 0.072 1.08 1842 1842 Vance 37181 37181 91 2180 4 1179 #> 9 0.063 1 1881 1881 Perq… 37143 37143 72 484 1 230 #> 10 0.108 1.48 1900 1900 Fors… 37067 37067 34 11858 10 3919 #> # ℹ 26 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry #>"},{"path":"https://elipousson.github.io/sfext/reference/as_xy.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert data to a data frame with X/Y coordinate pairs — as_xy","title":"Convert data to a data frame with X/Y coordinate pairs — as_xy","text":"Wraps as_points(), as_sfc(), sf_bbox_point() allow conversion sf, sfc, sfg objects simple data frame X Y columns matching provided nm parameter.","code":""},{"path":"https://elipousson.github.io/sfext/reference/as_xy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert data to a data frame with X/Y coordinate pairs — as_xy","text":"","code":"as_xy(x, bbox = NULL, crs = NULL, nm = c(\"x\", \"y\"), ...)"},{"path":"https://elipousson.github.io/sfext/reference/as_xy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert data to a data frame with X/Y coordinate pairs — as_xy","text":"x length 2 character string numeric coordinate pair sf, sfc, bbox object. x character string (e.g. c(\"xmin\", \"ymax\")), sf, sfc, bbox object must provided data argument. bbox bbox object object can converted as_bbox() passed bbox sf_bbox_point() x passed point parameter. crs character numeric reference coordinate reference system supported sf::st_crs() another sf, sfc, bbox object used provide crs. nm Column names use X Y columns. ... Additional parameters passed sf_bbox_point(), as_points(), as_sfc().","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/bind_sf_coverage.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Row bind coverage for a feature based on a coverage feature — bind_sf_coverage","text":"","code":"bind_sf_coverage( x, coverage, coverage_nm = NULL, .id = \"name\", x_arg = caller_arg(x), coverage_arg = caller_arg(coverage), id_arg = caller_arg(.id), combine = FALSE, error_call = caller_env() ) st_make_valid_coverage( x, y, combine = FALSE, is_coverage = TRUE, .fn = sf::st_difference ) st_make_valid_union(x, combine = FALSE, is_coverage = TRUE)"},{"path":"https://elipousson.github.io/sfext/reference/bind_sf_coverage.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Row bind coverage for a feature based on a coverage feature — bind_sf_coverage","text":"x input sf object coverage sf, sfc, bbox object covers x. coverage_nm Name use coverage feature assigned value .id column, Default: NULL .id .id column name, must present x Default: 'name' x_arg, coverage_arg, id_arg Argument names error messages bind_sf_coverage() used wrapper function. combine TRUE, use sf::st_combine() passing x sf::st_union() error_call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. y Second parameter st_make_valid_coverage() is_coverage logical; TRUE, use optimized algorithm features form polygonal coverage (overlaps) .fn Defaults sf::st_difference","code":""},{"path":"https://elipousson.github.io/sfext/reference/bind_sf_coverage.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Row bind coverage for a feature based on a coverage feature — bind_sf_coverage","text":"sf object sfc object","code":""},{"path":"https://elipousson.github.io/sfext/reference/bind_sf_coverage.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Row bind coverage for a feature based on a coverage feature — bind_sf_coverage","text":"bind_sf_coverage() related helper functions st_make_valid_coverage() st_make_valid_union() take sf object create non-intersecting coverage area surrounding geography defined second sf, sfc, bbox object. originally developed make_area_xwalk() function getACS package.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/bind_units_col.html","id":null,"dir":"Reference","previous_headings":"","what":"Bind units column to data frame — bind_units_col","title":"Bind units column to data frame — bind_units_col","text":"Utility function supporting get_area, get_dist, get_bearing.","code":""},{"path":"https://elipousson.github.io/sfext/reference/bind_units_col.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bind units column to data frame — bind_units_col","text":"","code":"bind_units_col( x, y, units = NULL, drop = FALSE, keep_all = TRUE, .id = NULL, call = caller_env() )"},{"path":"https://elipousson.github.io/sfext/reference/bind_units_col.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bind units column to data frame — bind_units_col","text":"x Data frame sf object. y Vector numeric units values bind x. units Units use y (numeric) convert (y units class); defaults NULL. drop TRUE, apply units::drop_units function column units class values return numeric values instead; defaults FALSE. keep_all FALSE, keep columns. FALSE, return named .id column. .id Name use vector units provided \"y\" parameter, \"y\" bound \"x\" data frame tibble new column. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/check_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if x is an sf object — check_sf","title":"Check if x is an sf object — check_sf","text":"x sf object invisibly return TRUE. , return error cli::cli_abort","code":""},{"path":"https://elipousson.github.io/sfext/reference/check_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if x is an sf object — check_sf","text":"","code":"check_sf( x, ..., ext = FALSE, allow_list = FALSE, allow_null = FALSE, arg = caller_arg(x), call = caller_env() )"},{"path":"https://elipousson.github.io/sfext/reference/check_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if x is an sf object — check_sf","text":"x sf, sfc, bbox object. ... Additional parameters passed rlang::abort(). ext TRUE, check x sf, sfc, bbox class object ; defaults FALSE. (used is_sf) allow_list TRUE, return TRUE x sf list , ext also TRUE, list sf, sfc, bbox objects. Defaults FALSE. allow_null TRUE x NULL, return TRUE; defaults FALSE. arg argument name string. argument mentioned error messages input origin problem. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/cli_format.sf.html","id":null,"dir":"Reference","previous_headings":"","what":"cli_format style for sf objects — cli_format.sf","title":"cli_format style for sf objects — cli_format.sf","text":"cli_format style sf objects","code":""},{"path":"https://elipousson.github.io/sfext/reference/cli_format.sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"cli_format style for sf objects — cli_format.sf","text":"","code":"# S3 method for class 'sf' cli_format(x, style = NULL, ...)"},{"path":"https://elipousson.github.io/sfext/reference/cli_format.sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"cli_format style for sf objects — cli_format.sf","text":"x sf object format cli_format.sf method. style use 'sf' class method. ... use 'sf' class method.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/cli_format.sf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"cli_format style for sf objects — cli_format.sf","text":"","code":"if (FALSE) { # \\dontrun{ if (interactive()) { library(cli) library(sf) cliExtras::register_cli_format(\"sf\", cli_format.sf) nc <- read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) cli_text(\"`nc` is a {.val {nc}}\") } } # }"},{"path":"https://elipousson.github.io/sfext/reference/compare_dist.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare a distance to the dimension of a bounding box or another distance value — compare_dist","title":"Compare a distance to the dimension of a bounding box or another distance value — compare_dist","text":"Compare dist distance based x. \"xdist\" (default), \"ydist\", \"diagdist\", length 2 character vector supported sf_bbox_dist() dist compared resulting distance. sf sfc object, comparison distance results sf::st_distance() x first parameter second. x can also numeric value without units class. Use \"\" argument determine type comparison: \"ratio\" (dist divided comparison distance) \"fit\" (many lengths dist can fit wholly within comparison distance) \"longer\", \"shorter\", \"\" (uses tolerance parameter).","code":""},{"path":"https://elipousson.github.io/sfext/reference/compare_dist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare a distance to the dimension of a bounding box or another distance value — compare_dist","text":"","code":"compare_dist( dist, x, units = NULL, to = \"xdist\", how = \"ratio\", tolerance = 1.5e-08, ... )"},{"path":"https://elipousson.github.io/sfext/reference/compare_dist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare a distance to the dimension of a bounding box or another distance value — compare_dist","text":"dist Distance check units class numeric vector x sf, sfc, bbox object numeric vector. units Units compare. dist x numeric assumed provided units units coordinate reference system (CRS) x (x sf, sfc, bbox object). Distance compare dist . Standard options include \"xdist\" (default), \"ydist\", \"diagdist\" compare sf_bbox_xdist(), sf_bbox_ydist(), sf_bbox_diagdist(). length 2 character vector, x, , ... parameters passed sf_bbox_dist(). sf sfc object, additional ... parameters passed sf::st_distance() using x first argument second. x numeric vector value ignored. \"ratio\", dist divided comparison distance. \"fit\", return number times dist fits comparison distance without remainder. \"longer\", \"shorter\", \"\", return logical vector. tolerance passed .equal() = \"\" ... Additional parameters passed sf::st_distance() sf sfc object sf_bbox_dist() length 2 character vector.","code":""},{"path":"https://elipousson.github.io/sfext/reference/compare_dist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare a distance to the dimension of a bounding box or another distance value — compare_dist","text":"logical numeric vector.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_scale.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert distance from scale to actual units — convert_dist_scale","title":"Convert distance from scale to actual units — convert_dist_scale","text":"function converts scale distances actual units based named standard_scales.","code":""},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_scale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert distance from scale to actual units — convert_dist_scale","text":"","code":"convert_dist_scale( dist = NULL, scale = NULL, scale_standard = NULL, scale_series = NULL, scale_unit = \"in\", scale_factor = NULL, actual_unit = NULL, dpi = 120, paper = NULL, orientation = NULL, ... )"},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_scale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert distance from scale to actual units — convert_dist_scale","text":"dist distance convert. paper provided, dist optional paper width height used dist. scale Scale name standard_scales[[\"scale\"]]. scale_standard, scale_series Passed standard scale parameters get_scale(). scale_unit \"mm\" (converted cm dividing 10), \"cm\", \"px\" (converted inches dividing dpi), \"\". scale_factor factor converting scale_unit actual_unit, e.g. 1\" = 1', scale factor 12. optional scale provided; defaults NULL. actual_unit unit supported convert_dist_units() dpi dots per square inch (used conversion factor \"px\" \"\") paper Paper, Default: 'letter'. orientation Orientation \"portrait\", \"landscape\", \"square\", Default: 'portrait'. ... Arguments passed get_paper standard Size standard, \"ANSI\", \"ISO\", \"British Imperial\", \"JIS\", \"USPS\", \"Facebook\", \"Instagram\", \"Twitter\". series Size series (e.g. ), Default: NULL size Size number (used \"ISO\" \"JIS\" series). Standard, series, size may required return single paper using parameters. width,height Width height units, Default: NULL. units Paper size units, either \"\", \"mm\", \"px\"; defaults NULL (using \"\" width height provided). ncol,nrow Number expected columns rows paper; used determine row_height section_asp paper data frame returned get_paper nrow ncol greater 1; defaults NULL. gutter Gutter distance units. Gutter used spacing nrow columns (variable spacing currently supported); defaults 0. margin numeric vector ggplot2 margin object. bbox bounding box use get orientation using sf_bbox_asp() orientation = TRUE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_scale.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert distance from scale to actual units — convert_dist_scale","text":"paper provided, return vector dist values converted scale_unit actual_unit based scale_factor information standard_scales data. paper provided, return data.frame converted distances appends columns named actual_width actual_height.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_units.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert distance (and area) values between different units — convert_dist_units","title":"Convert distance (and area) values between different units — convert_dist_units","text":"Convert distance (area) values different units","code":""},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_units.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert distance (and area) values between different units — convert_dist_units","text":"","code":"convert_dist_units( dist, from = NULL, to = \"meter\", drop = FALSE, digits = NULL )"},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_units.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert distance (and area) values between different units — convert_dist_units","text":"dist Numeric units object Existing unit dist, Default: NULL. dist units object, numerator used \"\" Unit convert distance , Default: 'meter' drop TRUE, return numeric. FALSE, return class units object. digits Number digits include result; defaults NULL.","code":""},{"path":"https://elipousson.github.io/sfext/reference/convert_dist_units.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert distance (and area) values between different units — convert_dist_units","text":"Object created units::set_units()","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/coords_to_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a data.frame with one or more coordinate columns to an sf object — coords_to_sf","title":"Convert a data.frame with one or more coordinate columns to an sf object — coords_to_sf","text":"coords_to_sf(): Convert data frame coordinates simple feature object check_coords(): Check provided vector coordinate column names valid provided data frame separate_coords(): Separate coordinates single combined column two columns format_coords(): Format coordinates numeric values remove missing coordinates data.frame has_coords(): Suggests coordinate pair comparing common values column names provided data.frame rev_coords(): Reverse vector coordinate names text \"lat\" \"y\" appears first position","code":""},{"path":"https://elipousson.github.io/sfext/reference/coords_to_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a data.frame with one or more coordinate columns to an sf object — coords_to_sf","text":"","code":"coords_to_sf( x, coords = c(\"lon\", \"lat\"), into = NULL, sep = \",\", rev = FALSE, remove_coords = FALSE, crs = 4326, call = caller_env() ) check_coords( x = NULL, coords = NULL, default = c(\"lon\", \"lat\"), rev = FALSE, call = caller_env() ) rev_coords(coords, pattern = c(\"lat\", \"^y\"), ignore.case = TRUE) has_coords(x, coords = NULL, value = TRUE) format_coords( x, coords = c(\"lon\", \"lat\"), keep_missing = FALSE, call = caller_env() ) separate_coords(x, coords, into = c(\"lon\", \"lat\"), sep = \",\")"},{"path":"https://elipousson.github.io/sfext/reference/coords_to_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a data.frame with one or more coordinate columns to an sf object — coords_to_sf","text":"x data.frame one coordinate columns. coordinates contained within single column, coord must length 1 length 2 parameter must provided. coords Coordinate columns input data.frame output sf object (geometry 'centroid' 'point') Default: c(\"lon\", \"lat\"). coords single column name longitude latitude, used names new columns coords separated . Passed tidyr::separate(). sep coords single column name longitude latitude, sep used separator coordinate values. Passed tidyr::separate(). rev TRUE, reverse c(\"lat\", \"lon\") coords c(\"lon\", \"lat\"). check_coords() . remove_coords df_to_sf(), TRUE, remove coordinate columns converting data frame simple feature object; defaults FALSE. crs Coordinate reference system used coordinates provided data frame. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. default Default coordinate values; defaults c(\"lon\", \"lat\"). pattern Pattern passed rev_coords() grepl() used match vectors reversed. Defaults c(\"lat\", \"^y\"). ignore.case TRUE, pattern matching case sensitive. value TRUE, return value coordinate column names. Used has_coords(). keep_missing TRUE, keep rows missing coordinate values. Defaults FALSE filters rows missing coordinates.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/count_features.html","id":null,"dir":"Reference","previous_headings":"","what":"Count simple features based on relationship with a second simple feature object — count_features","title":"Count simple features based on relationship with a second simple feature object — count_features","text":"Use st_join_ext() dplyr::count() count features x based spatial relationship y. similar count_sf_ext() may merged future.","code":""},{"path":"https://elipousson.github.io/sfext/reference/count_features.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count simple features based on relationship with a second simple feature object — count_features","text":"","code":"count_features( x = NULL, y = NULL, nm = \"data\", join = NULL, .id = \"name\", by = NULL, count = NULL, sort = FALSE, name = NULL, geometry = \"y\", ... )"},{"path":"https://elipousson.github.io/sfext/reference/count_features.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count simple features based on relationship with a second simple feature object — count_features","text":"x Data frame sf object, Default: NULL y Length 1 named sf list (name y used count count NULL) sf object nm NULL. y must include column name matching value .id. y NULL, count required. Default: NULL nm Vector names use as_sf_list() convert y sf list (y already sf list). Defaults \"data\". join geometry predicate function; defaults NULL, set sf::st_intersects() y contains POLYGON MULTIPOLYGON objects sf::st_nearest_feature() y contains types. .id Column name values added column input sf object. character vector variables join passed dplyr::left_join(). count Name column count. NULL, count set names(y) (assuming y length 1 named sf list). sort TRUE, show largest groups top. name name new column output. omitted, default n. already column called n, use nn. column called n nn, 'll use nnn, , adding ns gets new name. geometry \"y\", replace x geometry y geometry joining based . NULL, set value count. ... Additional parameters passed st_join_ext()","code":""},{"path":"https://elipousson.github.io/sfext/reference/count_sf_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Count extended for working with sf objects — count_sf_ext","title":"Count extended for working with sf objects — count_sf_ext","text":"extended version dplyr::count() makes easier count occurrences features data intersect features second sf object (set y) created passing x data st_make_grid_ext(). Similar count_features() two functions may combined future.","code":""},{"path":"https://elipousson.github.io/sfext/reference/count_sf_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count extended for working with sf objects — count_sf_ext","text":"","code":"count_sf_ext( data, x = NULL, y = NULL, join = sf::st_intersects, largest = TRUE, wt = NULL, sort = FALSE, replace_na = FALSE, keep_na = FALSE, lims = NULL, geometry = TRUE, .id = \"id\", name = NULL, ... )"},{"path":"https://elipousson.github.io/sfext/reference/count_sf_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count extended for working with sf objects — count_sf_ext","text":"data Data count relationship y x Optional sf object passed st_make_grid_ext(). Defaults NULL. y NULL (default), y defaults sf object created st_make_grid_ext() using x data (x NULL) x parameter st_make_grid_ext(). NULL, y must sf object column name .id (defaults \"id\"). join geometry predicate function profile st_intersects; see details largest logical; TRUE, return x features augmented fields y largest overlap features x; see https://github.com/r-spatial/sf/issues/578 wt Frequency weights. Can NULL variable: NULL (default), counts number rows group. variable, computes sum(wt) group. sort TRUE, show largest groups top. replace_na TRUE, replace NA values count 0. keep_na TRUE, filter NA values count. Ignored replace_na TRUE. lims Optional numeric vector minimum minimum maximum count values. provided, values minimum set minimum values maximum set maximum. one value provided, assumed minimum limit. geometry TRUE (default) return sf object. FALSE, return data frame. .id name use cell id column. Defaults \"id\". name name new column output. omitted, default n. already column called n, use nn. column called n nn, 'll use nnn, , adding ns gets new name. ... Arguments passed st_make_grid_ext ncol,nrow Used set n either NULL; defaults NULL. row id added columns grid provided. gutter Distance units column cell; gutter effectively serves margin negative buffer applied cells (including edges grid). desc TRUE, reverse standard order cell id numbering; defaults FALSE n n NULL square TRUE, grid set automatically 10 cells wide, Default: NULL \"polygons\", \"corners\", \"centers\"; set centers automatically style \"circle\", \"circle_offset\" buffer applied return circular polygons. style Style cell return options including \"rect\", \"square\", \"hex\", \"flat_top_hex\", \"circle\", \"circle_offset\" filter TRUE (trim TRUE) filter grid geometry x using st_filter_ext crs Coordinate reference system bounding box return; defaults NULL maintains crs input object. unit Units buffer. Supported options include \"meter\", \"foot\", \"kilometer\", \"mile\", \"nautical mile\" Common abbreviations (e.g. \"km\" instead \"kilometer\") also supported. Distance units converted units matching GDAL units x; defaults \"meter\" cellsize numeric length 1 2 target cellsize: square rectangular cells width height, hexagonal cells distance opposite edges (edge length cellsize/sqrt(3)). length units object can passed, area unit object area size square hexagonal cell. trim TRUE, x trimmed y st_trim().","code":""},{"path":"https://elipousson.github.io/sfext/reference/count_sf_ext.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count extended for working with sf objects — count_sf_ext","text":"sf object tibble (geometry = FALSE) column counting occurrences features data.","code":""},{"path":"https://elipousson.github.io/sfext/reference/count_sf_ext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Count extended for working with sf objects — count_sf_ext","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) data <- sf::st_sample(nc, size = 75) # Count data based on nc count <- count_sf_ext(data = data, y = nc, .id = \"FIPS\") #> Warning: attribute variables are assumed to be spatially constant throughout all geometries plot(count[, \"n\"], reset = FALSE) plot(data, col = \"gray60\", pch = 3, add = TRUE) # Count data based grid created by passing nc to st_make_grid_ext count_grid <- count_sf_ext(data = data, x = nc, .id = \"FIPS\") #> Warning: attribute variables are assumed to be spatially constant throughout all geometries plot(count_grid[, \"n\"], reset = FALSE) plot(data, col = \"gray60\", pch = 3, add = TRUE)"},{"path":"https://elipousson.github.io/sfext/reference/dist_unit_options.html","id":null,"dir":"Reference","previous_headings":"","what":"Distance units (vector) — dist_unit_options","title":"Distance units (vector) — dist_unit_options","text":"vector supported distance units pulled dist_units.","code":""},{"path":"https://elipousson.github.io/sfext/reference/dist_unit_options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distance units (vector) — dist_unit_options","text":"","code":"dist_unit_options"},{"path":"https://elipousson.github.io/sfext/reference/dist_unit_options.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Distance units (vector) — dist_unit_options","text":"character vector 86 names, plural names, aliases, symbols distance units.","code":""},{"path":"https://elipousson.github.io/sfext/reference/dist_units.html","id":null,"dir":"Reference","previous_headings":"","what":"Distance units (data frame) — dist_units","title":"Distance units (data frame) — dist_units","text":"subset units supported units package accessible units::valid_udunits() function.","code":""},{"path":"https://elipousson.github.io/sfext/reference/dist_units.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distance units (data frame) — dist_units","text":"","code":"dist_units"},{"path":"https://elipousson.github.io/sfext/reference/dist_units.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Distance units (data frame) — dist_units","text":"data frame 33 rows 12 variables: symbol symbols symbol_aliases symbol aliases name_singular singular names name_singular_aliases singular name aliases name_plural character plural names name_plural_aliases plural name aliases def short definition definition definition comment comment dimensionless logical indicator dimensionless units source_xml source XML unit_opts character vector symbols, singular, plural names unit","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_asp.html","id":null,"dir":"Reference","previous_headings":"","what":"Get aspect ratio from string or based on specific paper and margins — get_asp","title":"Get aspect ratio from string or based on specific paper and margins — get_asp","text":"Get aspect ratio string based specific paper margins","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_asp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get aspect ratio from string or based on specific paper and margins — get_asp","text":"","code":"get_asp( asp = NULL, paper = NULL, orientation = NULL, bbox = NULL, margin = NULL, block_asp = FALSE, allow_null = TRUE, ... )"},{"path":"https://elipousson.github.io/sfext/reference/get_asp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get aspect ratio from string or based on specific paper and margins — get_asp","text":"asp Aspect ratio width height numeric value (e.g. 0.33) character (e.g. \"1:3\"). numeric, get_asp() returns value without modification. paper Paper, Default: 'letter'. orientation Orientation \"portrait\", \"landscape\", \"square\", Default: 'portrait'. bbox bounding box use get orientation using sf_bbox_asp() orientation = TRUE. margin numeric vector ggplot2 margin object. block_asp TRUE, margin NULL, return aspect ratio text content block inside page margins. allow_null TRUE asp paper NULL, return NULL without error. ... Arguments passed get_paper standard Size standard, \"ANSI\", \"ISO\", \"British Imperial\", \"JIS\", \"USPS\", \"Facebook\", \"Instagram\", \"Twitter\". series Size series (e.g. ), Default: NULL size Size number (used \"ISO\" \"JIS\" series). Standard, series, size may required return single paper using parameters. width,height Width height units, Default: NULL. units Paper size units, either \"\", \"mm\", \"px\"; defaults NULL (using \"\" width height provided). ncol,nrow Number expected columns rows paper; used determine row_height section_asp paper data frame returned get_paper nrow ncol greater 1; defaults NULL. gutter Gutter distance units. Gutter used spacing nrow columns (variable spacing currently supported); defaults 0.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_asp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get aspect ratio from string or based on specific paper and margins — get_asp","text":"numeric aspect ratio.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_coords.html","id":null,"dir":"Reference","previous_headings":"","what":"Get coordinates for a simple feature or bounding box object — get_coords","title":"Get coordinates for a simple feature or bounding box object — get_coords","text":"extended version sf::st_coordinates() supports binding coordinates object, optionally dropping geometry, returning wkt point surface (geometry = \"surface point\") instead centroid.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_coords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get coordinates for a simple feature or bounding box object — get_coords","text":"","code":"get_coords( x, coords = NULL, geometry = \"centroid\", crs = NULL, keep_all = TRUE, drop = TRUE, call = caller_env() ) get_minmax(x, crs = NULL, keep_all = TRUE, drop = TRUE)"},{"path":"https://elipousson.github.io/sfext/reference/get_coords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get coordinates for a simple feature or bounding box object — get_coords","text":"x sf, bbox, sfc object. coords Column names use coordinates results, Default: NULL; set c(\"lon\", \"lat\") check_coords(). geometry geometry use coordinates \"centroid\", \"surface point\", alternatively \"wkt\"; defaults NULL (\"centroid\"). crs Coordinate reference system use coordinates; defaults NULL. keep_all TRUE, bind coordinates columns provided object x; defaults TRUE. drop TRUE x sf object, drop geometry Default: TRUE. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_coords.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get coordinates for a simple feature or bounding box object — get_coords","text":"get_minmax() get bounding box feature (group features) appends xmin, ymin, xmax, ymax values feature simple feature object.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_data_dir.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if data directory exists and create a new directory if needed — get_data_dir","title":"Check if data directory exists and create a new directory if needed — get_data_dir","text":"Get path package-specific cache directory rappdirs::user_cache_dir(), check existence data directory, optionally create new directory provided path location.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_data_dir.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if data directory exists and create a new directory if needed — get_data_dir","text":"","code":"get_data_dir( path = NULL, cache = FALSE, create = TRUE, pkg = \"sfext\", allow_null = TRUE ) list_data_files( path = NULL, pkg = \"sfext\", cache = FALSE, fileext = NULL, pattern = NULL, full.names = TRUE, ignore.case = TRUE, ... )"},{"path":"https://elipousson.github.io/sfext/reference/get_data_dir.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if data directory exists and create a new directory if needed — get_data_dir","text":"path Path directory use data directory. cache TRUE, path NULL set path rappdirs::user_cache_dir (using value pkg appname). path NULL, path returned even cache TRUE. create FALSE path exist, return path warning. TRUE rlang::is_interactive TRUE, ask user directory created. session interactive create TRUE, new directory created. pkg Package name; defaults \"sfext\" allow_null TRUE, path NULL, cache FALSE, return NULL path value; defaults TRUE. fileext pattern NULL, fileext used set pattern filter listed files matching file extension. pattern optional regular expression. file names match regular expression returned. full.names logical value. TRUE, directory path prepended file names give relative file path. FALSE, file names (rather paths) returned. ignore.case logical. pattern-matching case-insensitive? ... Additional parameters passed list.files()","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_margin.html","id":null,"dir":"Reference","previous_headings":"","what":"Get margins for a ggplot2 plot or map based on style or distance — get_margin","title":"Get margins for a ggplot2 plot or map based on style or distance — get_margin","text":"function works combination get_paper() function make easier position map page saving file. primarily useful using map plot created ggplot2 part print document format composed outside R using page layout application Adobe InDesign.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_margin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get margins for a ggplot2 plot or map based on style or distance — get_margin","text":"","code":"get_margin( margin = NULL, paper = NULL, orientation = NULL, dist = NULL, unit = \"in\", block_width = NULL, header = 0, footer = 0 )"},{"path":"https://elipousson.github.io/sfext/reference/get_margin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get margins for a ggplot2 plot or map based on style or distance — get_margin","text":"margin Margin style (options include \"extrawide\", \"wide\", \"standard\", \"narrow\", \"none\"), Additional \"auto\" option generate margin based line length planned yet implemented. Default: NULL (equivalent \"none\"). paper Paper, Default: 'letter'. orientation Orientation \"portrait\", \"landscape\", \"square\", Default: 'portrait'. dist Margin distance (single value used sides), Default: NULL unit Unit margin distance, Default: ''. block_width Plot map width units. paper block_width provided, margins half distance two evenly distributed. sets margin distance height well width work well header footers improved future. header, footer Header footer height units; defaults 0. Please note: headers footers currently supported \"px\" units.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_margin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get margins for a ggplot2 plot or map based on style or distance — get_margin","text":"ggplot2::margin() element intended use ggplot2::element_rect() plot.background theme element.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/get_margin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get margins for a ggplot2 plot or map based on style or distance — get_margin","text":"","code":"get_margin(\"standard\") #> [1] 1inches 1inches 1inches 1inches get_margin(\"none\") #> [1] 0inches 0inches 0inches 0inches get_margin(dist = 25, unit = \"mm\") #> [1] 25mm 25mm 25mm 25mm get_margin(paper = \"letter\", block_width = 5.5) #> [1] 1.5inches 1.5inches 1.5inches 1.5inches"},{"path":"https://elipousson.github.io/sfext/reference/get_measurements.html","id":null,"dir":"Reference","previous_headings":"","what":"Get measurements for simple feature objects — get_measurements","title":"Get measurements for simple feature objects — get_measurements","text":"Get measurements simple feature objects","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_measurements.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get measurements for simple feature objects — get_measurements","text":"","code":"get_area(x, units = NULL, keep_all = TRUE, drop = FALSE, .id = \"area\") st_area_ext(x, units = NULL, keep_all = TRUE, drop = FALSE, .id = \"area\") get_length(x, units = NULL, keep_all = TRUE, drop = FALSE, .id = \"length\") st_length_ext(x, units = NULL, keep_all = TRUE, drop = FALSE, .id = \"length\") get_dist( x, to, by_element = TRUE, units = NULL, drop = FALSE, keep_all = TRUE, .id = \"dist\", ... ) st_distance_ext( x, to, by_element = TRUE, units = NULL, drop = FALSE, keep_all = TRUE, .id = \"dist\", ... ) get_bearing(x, to = NULL, dir = FALSE, keep_all = TRUE, .id = \"bearing\") st_bearing(x, to = NULL, dir = FALSE, keep_all = TRUE, .id = \"bearing\")"},{"path":"https://elipousson.github.io/sfext/reference/get_measurements.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get measurements for simple feature objects — get_measurements","text":"x sf sfc object measure. units Units return area, length, perimeter, distance; Default: NULL keep_all TRUE, return columns original object, Default: TRUE drop TRUE, drop units line lengths, Default: FALSE .id Column name use area, line length/perimeter, distance, bearing. sf, sfc, bbox object length 2 character vector. \"\" sf sfc object, must either single feature number features x (by_element TRUE). \"\" character vector must represent valid xy pair using following options: \"xmin\", \"ymin\", \"xmax\", \"ymax\", \"xmid\", \"ymid\". by_element logical; TRUE, return vector distance first elements x y, second, etc; error raised x y length. FALSE, return dense matrix pairwise distances. ... passed s2_distance, s2_distance_matrix, s2_perimeter dir Logical indicator whether include direction bearing; FALSE, return absolute (positive) bearing value. TRUE, return negative positive bearing values. Default: FALSE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_measurements.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get measurements for simple feature objects — get_measurements","text":"Wrapper functions sf::geos_measures: get_area(): Wraps sf::st_area() MULTIPOINT MULTILINESTRING geometry converted polygon using sf::st_polygonize() used determine coverage area. get_length(): Wraps sf::st_length() POINT MULTIPOINT geometry converted LINESTRING using as_lines(). x POLYGON geometry, lwgeom::st_perimeter() used return perimeter instead length. get_dist(): Wraps sf::st_distance() x converted POINT using st_center() \"\" can POINT, sf object can converted POINT, character vector indicating point overall bounding box x. Additional measurement functions: get_bearing(): Wraps geosphere::bearing().","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/get_measurements.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get measurements for simple feature objects — get_measurements","text":"","code":"nc <- read_sf_path(system.file(\"shape/nc.shp\", package = \"sf\")) # Get area for North Caroline counties get_area(nc[1:2,])$area #> Units: [m^2] #> [1] 1137107793 610916077 get_area(nc[1:2,], units = \"acres\")$area #> Units: [acres] #> [1] 280984.3 150960.0 get_area(nc[1:2,], units = \"acres\", .id = \"acreage\")$acreage #> Units: [acres] #> [1] 280984.3 150960.0 # Get distances for North Caroline counties get_dist(nc[1,], to = c(\"xmax\", \"ymax\"), units = \"mile\")$dist #> Units: [mile] #> [,1] #> [1,] 18.03826 get_dist(nc[1,], to = nc[30,], units = \"km\")$dist #> 239.2365 [km] # Create a line between two counties nc_line <- as_line(c(as_point(nc[1,]), as_point(nc[30,])), crs = sf::st_crs(nc)) # Get length and bearing of the line get_length(nc_line) #> Simple feature collection with 1 feature and 1 field #> Geometry type: LINESTRING #> Dimension: XY #> Bounding box: xmin: -81.49823 ymin: 36.02862 xmax: -78.87809 ymax: 36.4314 #> Geodetic CRS: NAD27 #> # A tibble: 1 × 2 #> length geometry #> [m] #> 1 239236. (-81.49823 36.4314, -78.87809 36.02862) get_bearing(nc_line) #> Simple feature collection with 1 feature and 1 field #> Geometry type: LINESTRING #> Dimension: XY #> Bounding box: xmin: -81.49823 ymin: 36.02862 xmax: -78.87809 ymax: 36.4314 #> Geodetic CRS: NAD27 #> # A tibble: 1 × 2 #> bearing geometry #> #> 1 100. (-81.49823 36.4314, -78.87809 36.02862)"},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/get_paper.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get standard paper and image sizes — get_paper","text":"","code":"get_paper( paper = \"letter\", orientation = \"portrait\", standard = NULL, series = NULL, size = NULL, width = NULL, height = NULL, units = NULL, ncol = 1, nrow = 1, gutter = 0, bbox = NULL, margin = NULL, ... )"},{"path":"https://elipousson.github.io/sfext/reference/get_paper.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get standard paper and image sizes — get_paper","text":"paper Paper, Default: 'letter'. orientation Orientation \"portrait\", \"landscape\", \"square\", Default: 'portrait'. standard Size standard, \"ANSI\", \"ISO\", \"British Imperial\", \"JIS\", \"USPS\", \"Facebook\", \"Instagram\", \"Twitter\". series Size series (e.g. ), Default: NULL size Size number (used \"ISO\" \"JIS\" series). Standard, series, size may required return single paper using parameters. width, height Width height units, Default: NULL. units Paper size units, either \"\", \"mm\", \"px\"; defaults NULL (using \"\" width height provided). ncol, nrow Number expected columns rows paper; used determine row_height section_asp paper data frame returned get_paper nrow ncol greater 1; defaults NULL. gutter Gutter distance units. Gutter used spacing nrow columns (variable spacing currently supported); defaults 0. bbox bounding box use get orientation using sf_bbox_asp() orientation = TRUE. margin numeric vector ggplot2 margin object. ... Additional parameters passed get_margin. plot_width can passed parameters paper single row. margin returned list column.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_paper.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get standard paper and image sizes — get_paper","text":"Data frame one paper/image sizes.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_paper.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get standard paper and image sizes — get_paper","text":"Use \"paper\" parameter (matching name paper_sizes), standard (optionally including series size) parameter, width, height units. May return multiple paper sizes depending parameters. margin provided, block_width, block_height, block_asp calculated included columns returned data frame. Paper can also data frame \"width\", \"height\", \"orientation\", \"units\" columns.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_paper.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get standard paper and image sizes — get_paper","text":"","code":"get_paper(\"letter\") #> # A tibble: 1 × 16 #> name series size standard units width height asp ncol nrow col_width #> #> 1 Letter NA ANSI in 8.5 11 0.773 1 1 8.5 #> # ℹ 5 more variables: row_height , gutter , section_asp , #> # orientation , type get_paper(paper = NULL, standard = \"ISO\", series = \"A\", size = 4) #> # A tibble: 1 × 16 #> name series size standard units width height asp ncol nrow col_width #> #> 1 A4 A ISO mm 210 297 0.707 1 1 210 #> # ℹ 5 more variables: row_height , gutter , section_asp , #> # orientation , type get_paper(width = 11, height = 17) #> # A tibble: 1 × 16 #> name series size standard units width height asp ncol nrow col_width #> #> 1 Letter NA ANSI in 8.5 11 0.773 1 1 8.5 #> # ℹ 5 more variables: row_height , gutter , section_asp , #> # orientation , type "},{"path":"https://elipousson.github.io/sfext/reference/get_scale.html","id":null,"dir":"Reference","previous_headings":"","what":"Get standard scales and convert to scale distances — get_scale","title":"Get standard scales and convert to scale distances — get_scale","text":"function returns scale standard_scales based provided name, standard, /series.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_scale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get standard scales and convert to scale distances — get_scale","text":"","code":"get_scale(scale = NULL, standard = NULL, series = NULL)"},{"path":"https://elipousson.github.io/sfext/reference/get_scale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get standard scales and convert to scale distances — get_scale","text":"scale Scale name standard_scales[[\"scale\"]]. standard Scale standard. Options include \"USGS\", \"Engineering\", \"Architectural\". series Map series standard_scales[[\"series\"]]. Series available USGS scales.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_scale.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get standard scales and convert to scale distances — get_scale","text":"tibble based standard_scales rows filtered values match parameters.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_social_image.html","id":null,"dir":"Reference","previous_headings":"","what":"Get social media image size to match platform and format — get_social_image","title":"Get social media image size to match platform and format — get_social_image","text":"See paper_sizes[paper_sizes$type == \"social\",]$name support image options.","code":""},{"path":"https://elipousson.github.io/sfext/reference/get_social_image.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get social media image size to match platform and format — get_social_image","text":"","code":"get_social_image( image = NULL, platform = NULL, format = NULL, orientation = NULL )"},{"path":"https://elipousson.github.io/sfext/reference/get_social_image.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get social media image size to match platform and format — get_social_image","text":"image Image size name, Default: NULL platform Social media platform, \"Instagram\", \"Facebook\", \"Twitter\", Default: NULL format Image format, \"post\", \"story\", \"cover\", Default: NULL orientation Image orientation, Default: NULL.","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_dist_units.html","id":null,"dir":"Reference","previous_headings":"","what":"General utility functions for working with distance units objects — is_dist_units","title":"General utility functions for working with distance units objects — is_dist_units","text":"is_dist_units(): x distance unit object? is_diff_dist(): difference x y distance? is_same_dist(): x distance y? bbox x bbox y x, y, diagonal distance? is_shorter(), is_longer(): x shorter longer y? is_same_area(): x y area? is_same_units(): x y character strings represent units objects use units?","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_dist_units.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"General utility functions for working with distance units objects — is_dist_units","text":"","code":"is_dist_units(x) is_diff_dist(x, y, units = NULL) is_same_dist(x, y, dist = NULL, diff = FALSE, call = caller_env(), ...) is_longer(x, y) is_shorter(x, y) get_dist_units(x, allow_null = TRUE, multiple = TRUE, quiet = FALSE) as_dist_units(x, units = NULL, allow_null = FALSE, call = caller_env()) is_diff_area(x, y, units = NULL, combine = TRUE) is_same_area(x, y, units = NULL, combine = TRUE, diff = FALSE, ...) is_same_units(x, y = NULL)"},{"path":"https://elipousson.github.io/sfext/reference/is_dist_units.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"General utility functions for working with distance units objects — is_dist_units","text":"x, y objects check units is_diff_dist, x y units objects, use units; default NULL. dist type distance compare x y sf, sfc, bbox objects; \"diagdist\", \"xdist\", \"ydist\". defaults NULL. diff TRUE, return results is_diff_dist is_diff_area; FALSE, return logical indicator; defaults FALSE call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. ... Additional parameters passed .equal() allow_null allow_null TRUE, allow x return NULL value; FALSE, error NULL values. multiple TRUE x character vector distance/area units, get_dist_units may return multiple units. Passed rlang::arg_match. quiet TRUE, suppress warning messages. combine TRUE, combine objects sf::st_combine() comparing area is_diff_area() is_same_area(), defaults TRUE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_dist_units.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"General utility functions for working with distance units objects — is_dist_units","text":"two additional functions support utility functions: get_dist_units(): Get distance units x (x sf units objects character string dist_unit_options) as_dist_units(): Convert x units using units::as_units","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/is_geom_type.html","id":null,"dir":"Reference","previous_headings":"","what":"What geometry type is this feature? — is_geom_type","title":"What geometry type is this feature? — is_geom_type","text":"is_geom_type() extends sf::st_geometry_type() return list standard output (\"TYPES\") additional list values logical vectors sf::st_is() \"POINTS\" (passing \"POINT\" \"MULTIPOINT\" type), \"POLYGONS\" (passing \"POLYGON\", \"MULTIPOLYGON\"), \"LINESTRINGS\" (\"LINESTRING\" \"MULTILINESTRING\"), \"GEOMETRYCOLLECTION\" \"\". st_is_ext() adds by_geometry argument passes results sf::st_is() () by_geometry FALSE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_geom_type.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"What geometry type is this feature? — is_geom_type","text":"","code":"is_geom_type(x, type = NULL, by_geometry = FALSE, ext = TRUE) is_point(x, by_geometry = FALSE) is_multipoint(x, by_geometry = FALSE) is_line(x, by_geometry = FALSE) is_multiline(x, by_geometry = FALSE) is_polygon(x, by_geometry = FALSE) is_multipolygon(x, by_geometry = FALSE) st_is_ext(x, type = NULL, by_geometry = FALSE)"},{"path":"https://elipousson.github.io/sfext/reference/is_geom_type.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"What geometry type is this feature? — is_geom_type","text":"x sf sfc object passed sf::st_geometry_type() type \"POINT\", check geometry type POINT. available geometry types; case sensitive; Default: NULL by_geometry Passed sf::st_geometry_type(); defaults FALSE ext is_geom_type(), ext TRUE check NULL, return list checks POINTS, POLYGONS, LINESTRING, returned types.","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_geom_type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"What geometry type is this feature? — is_geom_type","text":"ext FALSE type NULL, returns vector geometry types identical sf::st_geometry_type(). ext TRUE, returns list , type NULL, returns logical vector.","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"What is the class or spatial attributes of this feature? — is_sf","title":"What is the class or spatial attributes of this feature? — is_sf","text":"class spatial attributes feature?","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"What is the class or spatial attributes of this feature? — is_sf","text":"","code":"is_sf(x, ext = FALSE, allow_null = FALSE, allow_list = FALSE) is_sfg(x, allow_null = FALSE) is_sfc(x, allow_null = FALSE) is_bbox(x, allow_null = FALSE, allow_na = FALSE) is_raster(x, allow_null = FALSE) is_sp(x, allow_null = FALSE) is_geo_coords(x, allow_null = FALSE)"},{"path":"https://elipousson.github.io/sfext/reference/is_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"What is the class or spatial attributes of this feature? — is_sf","text":"x sf, sfc, bbox object. ext TRUE, check x sf, sfc, bbox class object ; defaults FALSE. (used is_sf) allow_null TRUE x NULL, return TRUE; defaults FALSE. allow_list TRUE, is_sf return TRUE x list sf objects. allow_na TRUE, is_bbox() ignores NA values. Defaults FALSE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_sf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"What is the class or spatial attributes of this feature? — is_sf","text":"is_sf: x sf class object? is_sfc: x sfc class object? is_bbox: x bbox class object? is_sf_list: x list sf class objects (without names)? is_raster: x Raster class object? is_sp: x Spatial class object type? is_geo_coords: x likely geodetic coordinate pair (length 2 numeric vector, max absolute value less equal 180)? is_wgs84: x using WSG84 coordinate reference system?","code":""},{"path":"https://elipousson.github.io/sfext/reference/is_sf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"What is the class or spatial attributes of this feature? — is_sf","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) is_sf(nc) #> [1] TRUE is_sfc(nc$geometry) #> [1] TRUE is_sf_list(list(nc[1, ], nc[2, ])) #> [1] TRUE is_bbox(sf::st_bbox(nc)) #> [1] TRUE is_wgs84(sf::st_transform(nc, 4326)) #> [1] TRUE is_same_crs(nc, 4267) #> [1] TRUE"},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/lonlat_to_sfc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a lon/lat or lat/lon coordinate pair to a sfc object — lonlat_to_sfc","text":"","code":"lonlat_to_sfc( x, range = getOption(\"sfext.coord_range\", c(xmin = -180, ymin = -50, xmax = 180, ymax = 60)), quiet = FALSE, call = parent.frame(), ... )"},{"path":"https://elipousson.github.io/sfext/reference/lonlat_to_sfc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a lon/lat or lat/lon coordinate pair to a sfc object — lonlat_to_sfc","text":"x length 2 numeric vector geodetic coordinates EPSG:4326 coordinate reference system. range lonlat_to_sfc(), object coercible bbox object length 4 vector names xmin, xmax, ymin, ymax. coordinate pair falls outside latitude/longitude range defined vector inside range reversed, coordinates assumed lat/lon order switched lon/lat order converted point. Defaults c(\"xmin\" = -180, \"ymin\" = -50, \"xmax\" = 180, \"ymax\" = 60). Note default setting reverse valid coordinates north Anchorage, Alaska south New Zealand. quiet TRUE, suppress alert messages converting lat/lon coordinate pair lon/lat pair. Defaults FALSE. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. ... Arguments passed sf::st_sfc precision numeric; see st_as_binary check_ring_dir see st_read dim character; function called without valid geometries, argument may carry right dimension set empty geometries recompute_bbox logical; use TRUE force recomputation bounding box","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/make_sf_grid_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a sf list by grid position — make_sf_grid_list","title":"Make a sf list by grid position — make_sf_grid_list","text":"Create grid st_make_grid_ext() ","code":""},{"path":"https://elipousson.github.io/sfext/reference/make_sf_grid_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a sf list by grid position — make_sf_grid_list","text":"","code":"make_sf_grid_list( x, style = \"rect\", ncol = 2, nrow = 2, .id = \"grid_id\", crs = NULL, ... )"},{"path":"https://elipousson.github.io/sfext/reference/make_sf_grid_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a sf list by grid position — make_sf_grid_list","text":"x sf, sfc, bbox object, Default: NULL. Required. style Style cell return options including \"rect\", \"square\", \"hex\", \"flat_top_hex\", \"circle\", \"circle_offset\" ncol, nrow Used set n either NULL; defaults NULL. row id added columns grid provided. .id name use cell id column. Defaults \"id\". crs Coordinate reference system bounding box return; defaults NULL maintains crs input object. ... Arguments passed st_make_grid_ext ncol,nrow Used set n either NULL; defaults NULL. row id added columns grid provided. gutter Distance units column cell; gutter effectively serves margin negative buffer applied cells (including edges grid). desc TRUE, reverse standard order cell id numbering; defaults FALSE n n NULL square TRUE, grid set automatically 10 cells wide, Default: NULL \"polygons\", \"corners\", \"centers\"; set centers automatically style \"circle\", \"circle_offset\" buffer applied return circular polygons. filter TRUE (trim TRUE) filter grid geometry x using st_filter_ext unit Units buffer. Supported options include \"meter\", \"foot\", \"kilometer\", \"mile\", \"nautical mile\" Common abbreviations (e.g. \"km\" instead \"kilometer\") also supported. Distance units converted units matching GDAL units x; defaults \"meter\" cellsize numeric length 1 2 target cellsize: square rectangular cells width height, hexagonal cells distance opposite edges (edge length cellsize/sqrt(3)). length units object can passed, area unit object area size square hexagonal cell. trim TRUE, x trimmed y st_trim().","code":""},{"path":"https://elipousson.github.io/sfext/reference/mapview_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Use mapview to interactively explore spatial data — mapview_ext","title":"Use mapview to interactively explore spatial data — mapview_ext","text":"wrapper mapview::mapview() drops list columns makes easier quickly specify zcol value.","code":""},{"path":"https://elipousson.github.io/sfext/reference/mapview_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use mapview to interactively explore spatial data — mapview_ext","text":"","code":"mapview_ext(x, zcol = NULL, remove_na = FALSE, ...) mapview_exif( path = NULL, fileext = \"jpeg\", popup = TRUE, tooltip = FALSE, images = NULL, width = 320, ... ) mapview_popup_img( images, popup = TRUE, tooltip = FALSE, map = NULL, width = 320, ..., call = caller_env() )"},{"path":"https://elipousson.github.io/sfext/reference/mapview_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use mapview to interactively explore spatial data — mapview_ext","text":"x Raster* Spatial* Satellite sf stars object list combination . Furthermore, can also data.frame, numeric vector character string pointing tile image folder file disk. missing, blank map drawn. value NULL return NULL. zcol attribute name(s) column number(s) attribute table column(s) rendered. See also Details. remove_na TRUE zcol NULL, filter NA values data frame column defined zcol passing mapview::mapview() ... Arguments passed mapview::mapview path path folder file. fileext File extension. Defaults \"jpeg\". popup TRUE, add popup image leaflet map; defaults TRUE. tooltip logical, whether show image(s) popup(s) (click) tooltip(s) (hover). images simple feature object columns image path/url, image width, image height. width width image(s) pixels. map optional existing map updated/added . call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/misc_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"Additional utility functions for sf objects — misc_sf","title":"Additional utility functions for sf objects — misc_sf","text":"transform_sf() similar sf::st_transform() supports sf, sfc, bbox objects crs parameter, supports sfg objects (transformed sfc), uses sf::st_set_crs() CRS provided object NA. function support bounding box transformations. relocate_sf_col() relocates sf geometry column specified column (default everything). rename_sf_col() wrapper sf::st_set_geometry() renames sf column. get_sf_col() returns \"sf_column\" attribute. get_sf_colnames() returns column names file can read sf::read_sf() allow use column names build query (provide value name_col) without reading whole file.","code":""},{"path":"https://elipousson.github.io/sfext/reference/misc_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Additional utility functions for sf objects — misc_sf","text":"","code":"transform_sf(x, crs = NULL, allow_null = TRUE, ...) relocate_sf_col(x, .after = dplyr::everything()) rename_sf_col(x, sf_col = \"geometry\") get_sf_col(x = NULL) get_sf_colnames(x = NULL, dsn = NULL, layer = NULL, ...)"},{"path":"https://elipousson.github.io/sfext/reference/misc_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Additional utility functions for sf objects — misc_sf","text":"x sf sfc object. x missing crs, crs set provided value. crs coordinate reference system identifier (numeric character) sf, sfc, bbox, crs class object supported sf::st_crs(). allow_null TRUE crs NULL, return x. ... Additional parameters passed sf::st_transform() transform_sf() sf::read_sf() get_sf_colnames() x NULL. .location place sf column ; defaults dplyr::everything(). sf_col Name use sf column renaming; defaults \"geometry\". dsn data source name (interpretation varies driver - drivers, dsn file name, may also folder, contain name access credentials database); case GeoJSON, dsn may character string holding geojson data. can also open database connection. layer layer name (varies driver, may file name without extension); case layer missing, st_read read first layer dsn, give warning (unless quiet = TRUE) print message multiple layers, give error layers dsn. dsn database connection, layer can table name database identifier (see Id). also possible omit layer rather use query argument.","code":""},{"path":"https://elipousson.github.io/sfext/reference/number_features.html","id":null,"dir":"Reference","previous_headings":"","what":"Sort and number features by coordinates or distance — number_features","title":"Sort and number features by coordinates or distance — number_features","text":"Used layer_numbers() function maplayer package. Supports multiple types sorting including sorting: centroid coordinates (\"lon\", \"lat\") appended get_coords() one bounding box min max values (\"xmin\", \"ymin\", \"xmax\", \"ymax\") appended get_minmax() distance corner, side midpoint, center bounding box (\"dist_xmin_ymin\", \"dist_xmax_ymax\", \"dist_xmin_ymax\", \"dist_xmax_ymin\", \"dist_xmin_ymid\", \"dist_xmax_ymid\", \"dist_xmid_ymin\", \"dist_xmid_ymax\", \"dist_xmid_ymid\") distance point (sf, sfc, bbox object) passed parameter example, eastern United States, can sort number features top-left corner map bottom right setting sort \"dist_xmin_ymax\" (default). number_features also supports range different numbering styles designed match standard enumeration options available LaTeX.","code":""},{"path":"https://elipousson.github.io/sfext/reference/number_features.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sort and number features by coordinates or distance — number_features","text":"","code":"number_features( x, col = NULL, sort = \"dist_xmin_ymax\", to = NULL, desc = FALSE, crs = NULL, num_style = \"arabic\", num_start = 1, suffix = NULL, .id = \"number\" ) number_sf( x, col = NULL, sort = \"dist_xmin_ymax\", to = NULL, desc = FALSE, crs = NULL, num_style = \"arabic\", num_start = 1, suffix = NULL, .id = \"number\" ) sort_features( x, col = NULL, sort = c(\"lon\", \"lat\"), to = NULL, desc = FALSE, crs = NULL ) sort_sf( x, col = NULL, sort = c(\"lon\", \"lat\"), to = NULL, desc = FALSE, crs = NULL )"},{"path":"https://elipousson.github.io/sfext/reference/number_features.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sort and number features by coordinates or distance — number_features","text":"x sf sfc object. col Group column name, Default: NULL sort Sort column name, Default: \"dist_xmin_ymax\". sf object used determine sort order based distance feature center \"\" object. desc TRUE, sort descending; default FALSE. crs Coordinate reference use get_coords() get_minmax() \"sort\" following: \"lon\", \"lat\", \"longitude\", \"latitude\", \"xmin\", \"ymin\", \"xmax\", \"ymax\" num_style Style enumeration, either \"arabic\", \"alph\", \"Alph\", \"roman\", \"Roman\". num_start Starting number; defaults 1. suffix Character appended \"number\" column. (e.g. \".\" \"1.\" \":\" \"1:\"). Can also character vector length number column. .id Name column use feature numbers; defaults \"number\".","code":""},{"path":"https://elipousson.github.io/sfext/reference/number_features.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sort and number features by coordinates or distance — number_features","text":"sf object number column ordered sort values.","code":""},{"path":"https://elipousson.github.io/sfext/reference/paper_sizes.html","id":null,"dir":"Reference","previous_headings":"","what":"Standard paper and image sizes — paper_sizes","title":"Standard paper and image sizes — paper_sizes","text":"Reference table standard paper, postcard, photo print, social media image sizes, playing card sizes get_paper() get_social_image() functions. Derived visioguy/PaperSizes repo, Adobe UK guide photo sizes sources.","code":""},{"path":"https://elipousson.github.io/sfext/reference/paper_sizes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standard paper and image sizes — paper_sizes","text":"","code":"paper_sizes"},{"path":"https://elipousson.github.io/sfext/reference/paper_sizes.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Standard paper and image sizes — paper_sizes","text":"data frame 123 rows 9 variables: name Name paper series Series standard Standard size Size series units Units (\"\", \"mm\", \"px\") dimensions width Width units height Height units orientation Portrait (width less height), landscape, square type Type (paper, postcard, print, social)","code":""},{"path":"https://elipousson.github.io/sfext/reference/rdeck_edit.html","id":null,"dir":"Reference","previous_headings":"","what":"rdeck editor — rdeck_edit","title":"rdeck editor — rdeck_edit","text":"wrapper rdeck::editor_options() automatically converts features WGS84.","code":""},{"path":"https://elipousson.github.io/sfext/reference/rdeck_edit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"rdeck editor — rdeck_edit","text":"","code":"rdeck_edit(features, mode = rdeck::cur_value(), initial_bounds = NULL, ...) rdeck_select(features, ..., mode = \"select\") editor_options(mode = rdeck::cur_value(), features = rdeck::cur_value())"},{"path":"https://elipousson.github.io/sfext/reference/rdeck_edit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"rdeck editor — rdeck_edit","text":"features Features initialise editor. Requires CRS EPSG:4326. mode polygon editor mode. One : view: editor readonly mode select: select/unselect features modify: add/move/delete vertices transform: move/scale/rotate selected features point: draw points linestring: draw linestrings clicking vertex polygon: draw polygons clicking vertex lasso: freehand polygon draw click-dragging initial_bounds Sets initial bounds map NULL. Takes priority initial_view_state. Accepts bounding box, geometry bounding box can computed. Requires CRS EPSG:4326. ... Arguments passed rdeck::rdeck map_style mapbox basemap style url. See https://docs.mapbox.com/api/maps/#mapbox-styles theme <\"kepler\" | \"light\"> widget theme alters style legend tooltips. initial_view_state Defines map position, zoom, bearing pitch. controller NULL FALSE, map interactive. picking_radius Extra pixels around pointer include picking; useful rendering objects difficult hover, e.g. thin lines, small points, etc. use_device_pixels Controls resolution drawing buffer used rendering. TRUE: Resolution defined window.devicePixelRatio. Retina/HD displays, resolution usually twice big CSS pixels resolution. FALSE: CSS pixels resolution used rendering. number: Custom ratio (drawing buffer resolution CSS pixel) determine drawing buffer size. value less 1 uses resolution smaller CSS pixels, improving rendering performance expense image quality; value greater 1 improves image quality expense rendering performance. blending_mode <\"normal\" | \"additive\" | \"subtractive\"> Sets blending mode. Blending modes: normal: Normal blending alter colours overlapping objects. additive: Additive blending adds colours overlapping objects. Useful highlighting dot density dark maps. subtractive: Subtractive blending darkens overlapping objects. Useful highlighting dot density light maps. layer_selector TRUE, layer selector control enabled layers visibility_toggle = TRUE may toggled. FALSE, layer selector control rendered. editor Whether render polygon editor. TRUE, renders default editor_options(). FALSE, polygon editor rendered. lazy_load . Maps always eagerly rendered. width width map canvas. height height map canvas. id map element id. used shiny applications.","code":""},{"path":"https://elipousson.github.io/sfext/reference/read_sf_exif.html","id":null,"dir":"Reference","previous_headings":"","what":"Read EXIF metadata to create a simple feature object or write EXIF metadata to image files — read_sf_exif","title":"Read EXIF metadata to create a simple feature object or write EXIF metadata to image files — read_sf_exif","text":"read_sf_exif() read EXIF data folder files , geometry TRUE coordinate metadata available, convert data sf object. function also assigns cardinal direction based direction metadata recodes orientation metadata. write_exif() parameters used multiple tags values: title: Title, IPTC:Headline, IPTC:ObjectName, XMP-dc:Title description: ImageDescription, XMP-dc:Description, IPTC:Caption-Abstract keywords: Keywords, IPTC:Keywords, XMP-dc:Subject","code":""},{"path":"https://elipousson.github.io/sfext/reference/read_sf_exif.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read EXIF metadata to create a simple feature object or write EXIF metadata to image files — read_sf_exif","text":"","code":"read_sf_exif( path = NULL, fileext = NULL, filetype = NULL, bbox = NULL, sort = NULL, tags = NULL, geometry = TRUE, quiet = TRUE, ... )"},{"path":"https://elipousson.github.io/sfext/reference/read_sf_exif.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read EXIF metadata to create a simple feature object or write EXIF metadata to image files — read_sf_exif","text":"path path folder file. fileext, filetype File extension file type. filetype used fileext NULL. bbox Bounding box filter . sort Column name variable sort passed sort_features(). Currently supports \"lon\", \"lat\", \"filename\". Defaults NULL. tags Optional list EXIF tags read files. Must include GPS tags create sf object. geometry TRUE (default), return simple feature object. FALSE, return data.frame. quiet TRUE (default), suppress function messages. ... Additional parameters pass exiftoolr::exif_read()","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/read_sf_exif.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read EXIF metadata to create a simple feature object or write EXIF metadata to image files — read_sf_exif","text":"","code":"if (FALSE) { # \\dontrun{ read_sf_exif( path = system.file(\"extdata/photos\", package = \"overedge\"), filetype = \"jpeg\" ) } # }"},{"path":"https://elipousson.github.io/sfext/reference/read_sf_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","title":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","text":"extended version sf::read_sf() support reading spatial data based file path, URL, data name associated package. RDS, RDA, RData file Optionally provide bounding box filter data (data filtered download reading memory possible).","code":""},{"path":"https://elipousson.github.io/sfext/reference/read_sf_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","text":"","code":"read_sf_ext(...) read_sf_pkg( data, bbox = NULL, package = NULL, pkg = NULL, fileext = \"gpkg\", filetype = NULL, ... ) read_sf_path(path, bbox = NULL, ...) read_sf_zip( path, bbox = NULL, exdir = NULL, overwrite = TRUE, unzip = \"internal\", ... ) read_sf_rdata( path, file = NULL, refhook = NULL, bbox = NULL, .name_repair = \"check_unique\", ... ) read_sf_query( path, dsn = NULL, bbox = NULL, query = NULL, table = NULL, name = NULL, name_col = NULL, wkt_filter = NULL, zm_drop = FALSE, .name_repair = \"check_unique\", ... ) read_sf_excel( path, sheet = NULL, combine_sheets = FALSE, bbox = NULL, coords = c(\"lon\", \"lat\"), from_crs = 4326, geo = FALSE, address = \"address\", .name_repair = \"check_unique\", ... ) read_sf_csv( path, url = NULL, bbox = NULL, coords = c(\"lon\", \"lat\"), from_crs = 4326, geo = FALSE, address = \"address\", wkt = NULL, .name_repair = \"check_unique\", show_col_types = FALSE, ... ) read_sf_url(url, bbox = NULL, coords = c(\"lon\", \"lat\"), ...) read_sf_esri( url, bbox = NULL, where = NULL, name = NULL, name_col = NULL, coords = c(\"lon\", \"lat\"), from_crs = 4326, .name_repair = \"check_unique\", ... ) read_sf_felt( url = NULL, bbox = NULL, map_id = NULL, .name_repair = \"check_unique\", ... ) read_sf_gist(url, id = NULL, bbox = NULL, nth = 1, ...) read_sf_gmap( url, bbox = NULL, layer = NULL, combine_layers = FALSE, zm_drop = TRUE, .name_repair = \"check_unique\" ) read_sf_download( url, filename, bbox = NULL, path = NULL, filetype = \"geojson\", prefix = \"date\", method = \"auto\", unzip = FALSE, .name_repair = \"check_unique\", ... ) read_sf_gsheet( url, sheet = NULL, ss = NULL, bbox = NULL, ask = FALSE, coords = c(\"lon\", \"lat\"), from_crs = 4326, geo = FALSE, address = \"address\", .name_repair = \"check_unique\", ... )"},{"path":"https://elipousson.github.io/sfext/reference/read_sf_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","text":"... Additional parameters passed multiple functions; see details. data Name package dataset; used read_sf_pkg() . bbox bounding box object; defaults NULL. \"bbox\" provided, returns features intersecting bounding box. package, pkg Package name; used read_sf_pkg() . pkg used package NULL. fileext File extension. supplied list_path_filenames() pattern NULL, return file names matching extension. filetype File type supported sf::read_sf(); Default: 'gpkg'; used read_sf_pkg() required data package cache directory extdata system files. path file path. exdir directory extract files (equivalent unzip -d). created necessary. overwrite TRUE, overwrite existing files (equivalent unzip -o), otherwise ignore files (equivalent unzip -n). unzip TRUE, url must zip file downloaded cache folder, unzipped temporary directory (created tempdir()), read file using specified file type. file file path read /write . refhook function handle reference objects. .name_repair Passed repair parameter vctrs::vec_as_names() dsn data source name (interpretation varies driver - drivers, dsn file name, may also folder, contain name access credentials database); case GeoJSON, dsn may character string holding geojson data. can also open database connection. query SQL query select records; see details table table can usually inferred basename data source. table used generate custom query name name_col provided. Use sf::st_layers(dsn = dsn)[[\"name\"]] see list available table names. name, name_col Name value name column use generated query sources read read_sf_query() read_sf_esri(). wkt_filter character; WKT representation spatial filter (may used bounding box, selecting overlapping geometries); see examples zm_drop TRUE, drop Z /M dimensions using sf::st_zm sheet Sheet read. Either string (name sheet), integer (position sheet). Ignored sheet specified via range. neither argument specifies sheet, defaults first sheet. coords Character vector coordinate values. Coordinates must use crs from_crs parameter. from_crs df_to_sf(), coordinate reference system used coordinates well known text data frame. geo TRUE, use address_to_sf() geocode address column; defaults FALSE. address Address column name, Default: 'address' url url spatial data file, tabular data coordinates, ArcGIS FeatureServer MapServer access esri2sf::esri2sf() wkt Name column well-known text geometry. Used read_sf_csv(). show_col_types FALSE, show guessed column types. TRUE always show column types, even supplied. NULL (default) show column types explicitly supplied col_types argument. string condition. Default NULL (equivalent 1=1) return rows. map_id Felt map URL, map ID string, named list id type element. map_id list, must equivalent output get_felt_map() list includes \"id\" string \"type\" string value \"map\". id name column store file path. useful reading multiple input files data file paths, data collection date. NULL (default) extra column created. nth read_sf_gist(), file return gist, e.g. 1 first, 2 second. Defaults 1. layer layer name (varies driver, may file name without extension); case layer missing, st_read read first layer dsn, give warning (unless quiet = TRUE) print message multiple layers, give error layers dsn. dsn database connection, layer can table name database identifier (see Id). also possible omit layer rather use query argument. combine_layers, combine_sheets FALSE (default), return list sf object layer sheet separate item. TRUE, use purrr::map_dfr() combine layers sheets single sf object using layer sheet name additional column. filename File name; filename NULL path include file extension, name file extension required. prefix File name prefix. \"date\" adds date prefix, \"time\" adds date/time prefix; defaults NULL. method Method used downloading files. Current download methods \"internal\", \"libcurl\", \"wget\", \"curl\" \"wininet\" (Windows ), value \"auto\": see ‘Details’ ‘Note’. method can also set option \"download.file.method\": see options(). ss Something identifies Google Sheet: file id string drive_id URL can recover id one-row dribble, googledrive represents Drive files instance googlesheets4_spreadsheet, gs4_get() returns Processed as_sheets_id(). ask TRUE, ask name Google Sheet read ss provided read_sf_gsheet.","code":""},{"path":"https://elipousson.github.io/sfext/reference/read_sf_ext.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","text":"Reading data url: read_sf_url() supports multiple types urls: MapServer FeatureServer URL URL GitHub gist single spatial data file (first file used gist contains multiple) URL spatial data file, CSV file, Excel file, RDS file (RDA RData files supported read_sf_path()) Google Sheets URL public Google Maps URL","code":""},{"path":"https://elipousson.github.io/sfext/reference/read_sf_ext.html","id":"reading-data-from-a-package","dir":"Reference","previous_headings":"","what":"Reading data from a package","title":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","text":"read_sf_pkg() looks three types package data: Data loaded package External data extdata system files folder. Cached data cache directory returned rappdirs::user_cache_dir()","code":""},{"path":"https://elipousson.github.io/sfext/reference/read_sf_ext.html","id":"additional-parameters","dir":"Reference","previous_headings":"","what":"Additional ... parameters","title":"Read spatial data in a bounding box to a simple feature object from multiple sources — read_sf_ext","text":"read_sf_ext() flexible function ... passed one read functions depending provided parameters. using one parameter, parameters must named. read_sf_pkg() read_sf_download() pass additional parameters read_sf_path() supports query, name_col, name, table. name name_col ignored query parameter provided. table provided, expected layer name created based file path. read_sf_url() pass , name_col, name ArcGIS FeatureServer MapServer url (passed read_sf_esri()) sheet url Google Sheet (passed googlesheets4::read_sheet()), query wkt filter parameter url type (passed sf::read_sf()).","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. filenamr make_filename","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_corners.html","id":null,"dir":"Reference","previous_headings":"","what":"Get bounding box corner points from a bbox, sfc, or sf object — sf_bbox_corners","title":"Get bounding box corner points from a bbox, sfc, or sf object — sf_bbox_corners","text":"x sf object, results include column name matching .id containing values \"SW\", \"SE\", \"NE\", \"NW\" corresponding cardinal position corner.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_corners.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get bounding box corner points from a bbox, sfc, or sf object — sf_bbox_corners","text":"","code":"sf_bbox_corners(x, .id = \"corner\", class = \"sf\")"},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_corners.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get bounding box corner points from a bbox, sfc, or sf object — sf_bbox_corners","text":"x bbox, length 1 sfc object, sf object single feature .id name use added column cardinal position points, Default: 'corner' class Class object return. Must \"sf\" (default) \"sfc\".","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_corners.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get bounding box corner points from a bbox, sfc, or sf object — sf_bbox_corners","text":"sf four features (duplicating input feature new geometry derived bounding box) length 4 sfc object POINT geometry.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_dist.html","id":null,"dir":"Reference","previous_headings":"","what":"Measure a bounding box using x, y, or diagonal distance — sf_bbox_dist","title":"Measure a bounding box using x, y, or diagonal distance — sf_bbox_dist","text":"Measure distances (sf_bbox_dist(), sf_bbox_xdist(), sf_bbox_ydist(), sf_bbox_diagdist()) Convert diag_ratio value distance value bbox diag_ratio provided (sf_bbox_diag_ratio_to_dist()); return NULL bbox diag_ratio NULL Get aspect ratio orientation (sf_bbox_asp()) (counts asp 0.9 1.1 \"square\" tolerance 0.1) (sf_bbox_orientation())","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_dist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Measure a bounding box using x, y, or diagonal distance — sf_bbox_dist","text":"","code":"sf_bbox_dist( bbox, from, to, units = NULL, drop = TRUE, by_element = TRUE, call = caller_env(), ... ) sf_bbox_xdist(bbox, units = NULL, drop = TRUE) sf_bbox_ydist(bbox, units = NULL, drop = TRUE) sf_bbox_diagdist(bbox, units = NULL, drop = TRUE) sf_bbox_diag_ratio_to_dist(bbox, diag_ratio, units = NULL, drop = TRUE) sf_bbox_asp(bbox) sf_bbox_orientation(bbox, tolerance = 0.1, call = caller_env()) sf_bbox_check_fit(bbox, dist)"},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_dist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Measure a bounding box using x, y, or diagonal distance — sf_bbox_dist","text":"bbox bbox object. , Length 2 character vectors xy pairs (e.g. c(\"xmax\", \"ymax) defining points measure distance . units units return sf_bbox_dist. Defaults NULL. drop FALSE, distance functions return units. FALSE (default), distance functions return numeric values. by_element logical; TRUE, return vector distance first elements x y, second, etc; error raised x y length. FALSE, return dense matrix pairwise distances. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. ... passed s2_distance, s2_distance_matrix, s2_perimeter diag_ratio Proportion diagonal distance (ratio distance full diagonal distance) across bounding box. tolerance Numeric value 1 used sf_bbox_orientation() describe aspect ratio landscape portrait; defaults 0.1. dist Distance compare bounding box sf_bbox_check_fit(). dist length 1 compare bounding box diagonal distance. dist length 2, compare bounding box x y distances. Return TRUE dist fits within bounding box FALSE dist exceeds bounding box limits.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_misc.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert and tranform bounding boxes — sf_bbox_misc","title":"Convert and tranform bounding boxes — sf_bbox_misc","text":"Simple bounding box functions can use : Convert bounding box simple feature object (sf_bbox_to_sf()) simple feature collection (sf_bbox_to_sfc()) Transform coordinate reference system (sf_bbox_transform()) Return point corners, center, midpoints (sf_bbox_point()) Convert bounding box SQL style query (sf_bbox_to_lonlat_query()), well known text (sf_bbox_to_wkt()) Convert point corresponding bounding box npc (normalised parent coordinates) value sf_bbox_to_npc() sf (>=1.0-17) installed, sf_bbox_transform() uses sf::st_transform() without converting sfc object back bbox.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_misc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert and tranform bounding boxes — sf_bbox_misc","text":"","code":"sf_bbox_to_sf(bbox, sf_col = \"geometry\") sf_bbox_to_sfc(bbox) sf_bbox_transform(bbox, crs = NULL) sf_bbox_point(bbox, point = NULL, crs = NULL, call = caller_env()) sf_bbox_to_wkt(bbox, crs = NULL) sf_bbox_to_lonlat_query(bbox, coords = c(\"longitude\", \"latitude\"), crs = 4326) sf_bbox_to_npc(bbox, point)"},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_misc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert and tranform bounding boxes — sf_bbox_misc","text":"bbox bbox object. sf_col name use geometry column converting simple feature object; defaults \"geometry\". crs coordinate reference system use sf_bbox_to_lonlat_query() (defaults 4326) resulting bounding box (sf_bbox_transform()) sfc object (sf_bbox_point()) (defaults NULL). point point find npc coords center call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. coords Column names coordinates query. e.g. c(\"X\", \"Y\") c(\"longitude\", \"latitude\") (default). Used sf_bbox_to_lonlat_query() .","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_misc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert and tranform bounding boxes — sf_bbox_misc","text":"sf object","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_shift.html","id":null,"dir":"Reference","previous_headings":"","what":"Shift sides, contract, or expand a bounding box — sf_bbox_shift","title":"Shift sides, contract, or expand a bounding box — sf_bbox_shift","text":"Shift, expand, contract bounding box (sf_bbox_shift(), sf_bbox_expand(), sf_bbox_contract())","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_shift.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shift sides, contract, or expand a bounding box — sf_bbox_shift","text":"","code":"sf_bbox_shift( bbox, nudge_x = 0, nudge_y = 0, side = c(\"all\", \"top\", \"bottom\", \"left\", \"right\"), dir = NULL, call = caller_env() ) sf_bbox_contract(bbox, nudge_x = 0, nudge_y = 0) sf_bbox_expand(bbox, nudge_x = 0, nudge_y = 0)"},{"path":"https://elipousson.github.io/sfext/reference/sf_bbox_shift.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shift sides, contract, or expand a bounding box — sf_bbox_shift","text":"bbox bbox object. nudge_x, nudge_y Length 1 2 numeric vector; unitless. Used passed sf_bbox_shift(). Required sf_bbox_shift(). side one sides shift: \"top\", \"bottom\", \"left\", \"right\", \"\". Required sf_bbox_shift(). dir \"\", contract bbox nudge_x nudge_y. \"\", expand bbox nudge_x nudge_y. dir NULL; absolute values used nudge_x nudge_y. Defaults NULL. Optional sf_bbox_shift(). call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating and checking sf lists — sf_list","title":"Creating and checking sf lists — sf_list","text":"Functions coercing object sf_list class objects created vctrs::new_list_of() checking lists sf objects. function allow_list parameter supports type input.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating and checking sf lists — sf_list","text":"","code":"as_sf_list( x, nm = \"data\", col = NULL, crs = NULL, clean_names = TRUE, .name_repair = \"check_unique\", call = caller_env() ) new_sf_list( x, nm = \"data\", col = NULL, clean_names = TRUE, .name_repair = \"check_unique\", call = caller_env() ) is_sf_list(x, ext = TRUE, allow_null = FALSE) sf_list_rbind(x, ...) map_as_sf_list(x, .f, ...) map_as_sf(x, .f, ...)"},{"path":"https://elipousson.github.io/sfext/reference/sf_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating and checking sf lists — sf_list","text":"x sf, sfc, bbox object. nm as_sf_list, name(s) sf list; defaults \"data\". col provided, values grouping column used names. col as_sf_list, name column used group data x sf object used group nest data passing x. crs character numeric reference coordinate reference system supported sf::st_crs() another sf, sfc, bbox object used provide crs. clean_names TRUE, clean names provided nm created based value col using janitor::clean_names. FALSE, use names provided. .name_repair One \"unique\", \"universal\", \"check_unique\". See vctrs::vec_as_names() meaning options. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. ext TRUE, check x sf, sfc, bbox class object ; defaults FALSE. (used is_sf) allow_null TRUE x NULL, return TRUE; defaults FALSE. ... sf_list_rbind(), additional parameters passed purrr::list_rbind(). map_as_sf(), additional parameters passed map. .f function, specified one following ways: named function, e.g. mean. anonymous function, e.g. \\(x) x + 1 function(x) x + 1. formula, e.g. ~ .x + 1. must use .x refer first argument. recommended require backward compatibility older versions R. string, integer, list, e.g. \"idx\", 1, list(\"idx\", 1) shorthand \\(x) pluck(x, \"idx\"), \\(x) pluck(x, 1), \\(x) pluck(x, \"idx\", 1) respectively. Optionally supply .default set default value indexed element NULL exist.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/sf_to_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert between simple feature and data frame objects — sf_to_df","title":"Convert between simple feature and data frame objects — sf_to_df","text":"sf_to_df() converts simple feature object data.frame dropping geometry , using get_coords(), converting geometry well known text, (geometry type POINT) getting coordinates centroid point surface. sfc object provided,\"drop\" geometry option supported. df_to_sf() converts data.frame simple feature object using geometry column (named \"geometry\"), address column (name matching address parameter), well known text column (named \"wkt\"), coords (must columns matching coords values). Related helper functions include check_coords() suggest appropriate coordinate column names based column names provided data frame; has_coords() check data frame specified coordinates.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_to_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert between simple feature and data frame objects — sf_to_df","text":"","code":"sf_to_df( x, crs = 4326, coords = c(\"lon\", \"lat\"), geometry = \"centroid\", keep_all = TRUE ) df_to_sf( x, crs = NULL, coords = c(\"lon\", \"lat\"), from_crs = 4326, into = NULL, sep = \",\", rev = TRUE, remove_coords = FALSE, geo = FALSE, address = \"address\", y = NULL, by = NULL, ..., as_tibble = TRUE, .name_repair = \"unique\", call = caller_env() )"},{"path":"https://elipousson.github.io/sfext/reference/sf_to_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert between simple feature and data frame objects — sf_to_df","text":"x sf sfc object data frame lat/lon coordinates single column two separated columns. crs Cordinate reference system return, Default: 4326 sf_to_df() NULL df_to_sf(). coords Coordinate columns input data.frame output sf object (geometry 'centroid' 'point') Default: c(\"lon\", \"lat\"). geometry Type geometry include data frame. options include \"drop\", \"wkt\", \"centroid\", \"point\", Default: 'centroid'. keep_all FALSE, drop columns named coords, Default: TRUE. from_crs df_to_sf(), coordinate reference system used coordinates well known text data frame. coords single column name longitude latitude, used names new columns coords separated . Passed tidyr::separate(). sep coords single column name longitude latitude, sep used separator coordinate values. Passed tidyr::separate(). rev TRUE, reverse c(\"lat\", \"lon\") coords c(\"lon\", \"lat\"). check_coords() . remove_coords df_to_sf(), TRUE, remove coordinate columns converting data frame simple feature object; defaults FALSE. geo TRUE, use address_to_sf() geocode address column; defaults FALSE. address Address column name passed tidygeocoder::geocode() tidygeocoder::geo y sf object passed y argument dplyr::left_join(). character vector variables join passed dplyr::left_join(). ... parameters passed onto methods. as_tibble TRUE, use tibble::as_tibble() make sure sf tibble returned. .name_repair Passed tibble::as_tibble(). call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/sf_to_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert between simple feature and data frame objects — sf_to_df","text":"sf_to_df() returns data frame geometry dropped converted wkt coordinates centroid point surface; df_to_sf() returns simple feature object POINT geometry.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/sf_to_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert between simple feature and data frame objects — sf_to_df","text":"","code":"nc <- read_sf_path(system.file(\"shape/nc.shp\", package = \"sf\")) # Convert a sf object to a data frame nc_df <- sf_to_df(nc) # Convert a data frame to a sf object df_to_sf(nc_df, coords = c(\"lon\", \"lat\"), remove_coords = TRUE) #> Simple feature collection with 100 features and 14 fields #> Attribute-geometry relationships: constant (14) #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -84.05977 ymin: 34.07688 xmax: -75.80913 ymax: 36.49124 #> Geodetic CRS: WGS 84 #> # A tibble: 100 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> * #> 1 0.114 1.44 1825 1825 Ashe 37009 37009 5 1091 1 10 #> 2 0.061 1.23 1827 1827 Alle… 37005 37005 3 487 0 10 #> 3 0.143 1.63 1828 1828 Surry 37171 37171 86 3188 5 208 #> 4 0.07 2.97 1831 1831 Curr… 37053 37053 27 508 1 123 #> 5 0.153 2.21 1832 1832 Nort… 37131 37131 66 1421 9 1066 #> 6 0.097 1.67 1833 1833 Hert… 37091 37091 46 1452 7 954 #> 7 0.062 1.55 1834 1834 Camd… 37029 37029 15 286 0 115 #> 8 0.091 1.28 1835 1835 Gates 37073 37073 37 420 0 254 #> 9 0.118 1.42 1836 1836 Warr… 37185 37185 93 968 4 748 #> 10 0.124 1.43 1837 1837 Stok… 37169 37169 85 1612 1 160 #> # ℹ 90 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry # If lon and lat values are present in a single column, use the into parameter # to split the values back into separate columns nc_df$xy <- paste(nc_df$lon, nc_df$lat, sep = \",\") df_to_sf(nc_df, coords = \"xy\", into = c(\"lon\", \"lat\")) #> Simple feature collection with 100 features and 16 fields #> Attribute-geometry relationships: constant (16) #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -84.05977 ymin: 34.07688 xmax: -75.80913 ymax: 36.49124 #> Geodetic CRS: WGS 84 #> # A tibble: 100 × 17 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> * #> 1 0.114 1.44 1825 1825 Ashe 37009 37009 5 1091 1 10 #> 2 0.061 1.23 1827 1827 Alle… 37005 37005 3 487 0 10 #> 3 0.143 1.63 1828 1828 Surry 37171 37171 86 3188 5 208 #> 4 0.07 2.97 1831 1831 Curr… 37053 37053 27 508 1 123 #> 5 0.153 2.21 1832 1832 Nort… 37131 37131 66 1421 9 1066 #> 6 0.097 1.67 1833 1833 Hert… 37091 37091 46 1452 7 954 #> 7 0.062 1.55 1834 1834 Camd… 37029 37029 15 286 0 115 #> 8 0.091 1.28 1835 1835 Gates 37073 37073 37 420 0 254 #> 9 0.118 1.42 1836 1836 Warr… 37185 37185 93 968 4 748 #> 10 0.124 1.43 1837 1837 Stok… 37169 37169 85 1612 1 160 #> # ℹ 90 more rows #> # ℹ 6 more variables: BIR79 , SID79 , NWBIR79 , lon , #> # lat , geometry "},{"path":"https://elipousson.github.io/sfext/reference/sfext-package.html","id":null,"dir":"Reference","previous_headings":"","what":"sfext: Extra Functions for Simple Feature Data — sfext-package","title":"sfext: Extra Functions for Simple Feature Data — sfext-package","text":"Extra functions additional options reading, writing, transforming spatial data. Includes variety utility functions working tabular data coordinates distance area units.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/sfext-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"sfext: Extra Functions for Simple Feature Data — sfext-package","text":"Maintainer: Eli Pousson eli.pousson@gmail.com (ORCID) [copyright holder]","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_bbox_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a bounding box buffered a set distance or to match an aspect ratio — st_bbox_ext","title":"Get a bounding box buffered a set distance or to match an aspect ratio — st_bbox_ext","text":"st_bbox_ext() converts input bounding box as_bbox(), applies buffer (based specified distance proportion diagonal distance across bounding box) adjusts bounding box aspect ratio returning bounding box (another class specified class parameter). input object list sf_list object, function always returns list sf_list.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_bbox_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a bounding box buffered a set distance or to match an aspect ratio — st_bbox_ext","text":"","code":"st_bbox_ext( x, dist = NULL, diag_ratio = NULL, asp = NULL, unit = NULL, crs = NULL, class = \"bbox\", nudge = NULL, allow_null = TRUE, allow_list = TRUE ) st_bbox_asp( x, asp = NULL, class = \"bbox\", allow_null = TRUE, allow_list = TRUE )"},{"path":"https://elipousson.github.io/sfext/reference/st_bbox_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get a bounding box buffered a set distance or to match an aspect ratio — st_bbox_ext","text":"x sf, sfc, bbox, sfg, Raster, Spatial, Extent, numeric, character object (place name passed osmdata::getbb()). See as_bbox() details. dist buffer distance units. Optional. diag_ratio ratio diagonal distance area's bounding box used buffer distance. e.g. diagonal distance 3000 meters \"diag_ratio = 0.1\" 300 meter used. Ignored dist provided. asp Aspect ratio width height numeric value (e.g. 0.33) character (e.g. \"1:3\"). numeric, get_asp() returns value without modification. unit Units buffer. Supported options include \"meter\", \"foot\", \"kilometer\", \"mile\", \"nautical mile\" Common abbreviations (e.g. \"km\" instead \"kilometer\") also supported. Distance units converted units matching GDAL units x; defaults \"meter\" crs Coordinate reference system bounding box return; defaults NULL maintains crs input object. class Class object return passed as_sf_class(); defaults \"bbox\". nudge Passed parameter st_nudge() NULL. numeric vector, sf object, object can converted simple feature collection as_sfc().. allow_null TRUE (default) x NULL, return NULL , FALSE, abort function. allow_list TRUE (default), allow sf list objects input use purrr::map() apply provided parameters object within list return new sf list object.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_bbox_ext.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a bounding box buffered a set distance or to match an aspect ratio — st_bbox_ext","text":"bbox object converted match class class parameter.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_bbox_ext.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get a bounding box buffered a set distance or to match an aspect ratio — st_bbox_ext","text":"st_bbox_asp() supports aspect ratio adjustments without applying buffer. asp can supplied number string matching format \"width:height\". Common aspect ratios include \"1:1\" (1), \"4:6\" (0.666), \"8.5:11\", \"16:9\" (1.777).","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_buffer_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Buffer a simple feature or bounding box object — st_buffer_ext","title":"Buffer a simple feature or bounding box object — st_buffer_ext","text":"Return sf object buffer based dist proportion diagonal distance defined diag_ratio. x uses geographic coordinates, coordinate reference system transformed EPSG:3857 transformed back original CRS buffer applied.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_buffer_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Buffer a simple feature or bounding box object — st_buffer_ext","text":"","code":"st_buffer_ext( x, dist = NULL, diag_ratio = NULL, unit = \"meter\", dist_limits = NULL, end_style = NULL, join_style = NULL, single_side = FALSE, allow_null = TRUE, allow_list = TRUE, ... ) # Default S3 method st_buffer_ext( x, dist = NULL, diag_ratio = NULL, unit = \"meter\", dist_limits = NULL, end_style = NULL, join_style = NULL, single_side = FALSE, allow_null = TRUE, ... ) # S3 method for class 'bbox' st_buffer_ext( x, dist = NULL, diag_ratio = NULL, unit = \"meter\", dist_limits = NULL, end_style = NULL, join_style = NULL, single_side = FALSE, ... ) # S3 method for class 'list' st_buffer_ext( x, dist = NULL, diag_ratio = NULL, unit = \"meter\", dist_limits = NULL, end_style = NULL, join_style = NULL, single_side = FALSE, allow_null = TRUE, allow_list = TRUE, ... ) # S3 method for class 'sf_list' st_buffer_ext( x, dist = NULL, diag_ratio = NULL, unit = \"meter\", dist_limits = NULL, end_style = NULL, join_style = NULL, single_side = FALSE, allow_null = TRUE, allow_list = TRUE, ... ) st_edge(x, dist = NULL, diag_ratio = NULL, unit = \"meter\", ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_buffer_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Buffer a simple feature or bounding box object — st_buffer_ext","text":"x sf, sfc, bbox object list sf objects. dist buffer distance units. Optional. diag_ratio ratio diagonal distance area's bounding box used buffer distance. e.g. diagonal distance 3000 meters \"diag_ratio = 0.1\" 300 meter used. Ignored dist provided. unit Units buffer. Supported options include \"meter\", \"foot\", \"kilometer\", \"mile\", \"nautical mile\" Common abbreviations (e.g. \"km\" instead \"kilometer\") also supported. Distance units converted units matching GDAL units x; defaults \"meter\" dist_limits Numeric vector length (minimum maximum values used lower upper limits distance buffer). Units must match provided units; defaults NULL. end_style \"round\" (default), \"flat\", \"square\" passed endCapStyle parameter sf::st_buffer(). join_style \"round\" (default), \"mitre\", \"bevel\" passed joinStyle parameter sf::st_buffer(). single_side TRUE, single-sided buffers returned linear geometries, case negative dist values give buffers right-hand side, positive left. allow_null TRUE (default) x NULL, NULL value returned error. allow_list TRUE (default), allow sf list objects input use purrr::map() apply provided parameters object within list return new sf list object. ... Additional parameters passed sf::st_buffer()","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_buffer_ext.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Buffer a simple feature or bounding box object — st_buffer_ext","text":"st_edge() variation st_buffer_ext() dist diag_ratio used define width edge return either outside existing geometry (positive dist values) inside existing geometry (negative dist values).","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_cast_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Cast geometry of a simple feature object or simple feature collection to another type — st_cast_ext","title":"Cast geometry of a simple feature object or simple feature collection to another type — st_cast_ext","text":"Wrapper sf::st_cast() currently supports casting MULTIPOLYGON POLYGON MULTIPOLYGON POLYGON POINT , simplify = FALSE, can cast MULTIPOINT LINESTRING. different basic functionality st_cast development may improve utility function.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_cast_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cast geometry of a simple feature object or simple feature collection to another type — st_cast_ext","text":"","code":"st_cast_ext(x, to = \"POINT\", simplify = TRUE, ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_cast_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cast geometry of a simple feature object or simple feature collection to another type — st_cast_ext","text":"x sf sfc object cast another type. character; target type, missing, simplification tried; x type sfg (.e., single geometry) needs specified. simplify TRUE, simplify geometry type; defaults TRUE. ... Arguments passed sf::st_cast","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_clip.html","id":null,"dir":"Reference","previous_headings":"","what":"Clip the side or corner of a simple feature or bounding box object — st_clip","title":"Clip the side or corner of a simple feature or bounding box object — st_clip","text":"Clip based corner object bounding box.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_clip.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clip the side or corner of a simple feature or bounding box object — st_clip","text":"","code":"st_clip( x, clip = NULL, keep = NULL, flip = FALSE, dist = NULL, diag_ratio = NULL, unit = \"meter\" )"},{"path":"https://elipousson.github.io/sfext/reference/st_clip.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clip the side or corner of a simple feature or bounding box object — st_clip","text":"x sf bbox object clip clip Character string describing part area clip remove. Options include c(\"top\", \"right\", \"bottom\", \"left\", \"topright\", \"bottomright\", \"bottomleft\", \"topleft\"). NULL, area clipped full edge can returned. keep Alternate way defining clip (naming section keep). flip Logical. Default FALSE. TRUE, clip area kept instead removed. keep provided, flip automatically set TRUE. dist Numeric. Distance use edge. Default NULL meters. Use negative values inside edge positive numbers outside edge. diag_ratio Alternate way define edge distance. unit Units buffer. Supported options include \"meter\", \"foot\", \"kilometer\", \"mile\", \"nautical mile\" Common abbreviations (e.g. \"km\" instead \"kilometer\") also supported. Distance units converted units matching GDAL units x; defaults \"meter\"","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_clip.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clip the side or corner of a simple feature or bounding box object — st_clip","text":"sf object clipped based parameters","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_concave_hull_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a concave hull around simple feature object by attribute — st_concave_hull_ext","title":"Make a concave hull around simple feature object by attribute — st_concave_hull_ext","text":"Make concave hull around simple feature object attribute","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_concave_hull_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a concave hull around simple feature object by attribute — st_concave_hull_ext","text":"","code":"st_concave_hull_ext( x, by = NULL, centroid = FALSE, ratio = 0.5, allow_holes = FALSE )"},{"path":"https://elipousson.github.io/sfext/reference/st_concave_hull_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a concave hull around simple feature object by attribute — st_concave_hull_ext","text":"x sf object. Column name use grouping combining geometry, Default: NULL centroid TRUE, use centroids geometry x, Default: FALSE ratio numeric; fraction convex: 1 returns convex hulls, 0 maximally concave hulls allow_holes logical; TRUE, resulting concave hull may holes","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_dissolve.html","id":null,"dir":"Reference","previous_headings":"","what":"Dissolve geometry preserving existing or supplied grouping variables — st_dissolve","title":"Dissolve geometry preserving existing or supplied grouping variables — st_dissolve","text":"st_dissolve() dissolves sf sfc objects. input object sf object, existing grouping variables added grouping variables passed .parameter included output sf data frame.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_dissolve.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dissolve geometry preserving existing or supplied grouping variables — st_dissolve","text":"","code":"st_dissolve( x, ..., .by = NULL, .keep = \"nest\", do_union = TRUE, .data_key = \"data\", .dissolve_key = \"group.comp.id\", call = caller_env )"},{"path":"https://elipousson.github.io/sfext/reference/st_dissolve.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dissolve geometry preserving existing or supplied grouping variables — st_dissolve","text":"x sf sfc object. sf object, grouped data frame allowed. ... Arguments passed spdep::poly2nb pl list polygons class extending SpatialPolygons, sf sfc object containing non-empty (multi-)polygon objects row.names character vector region ids added neighbours list attribute region.id, default seq(1, nrow(x)); pl row.names, used instead default sequence. snap boundary points less snap distance apart considered indicate contiguity; used find candidate actual neighbours planar geometries, actual neighbours spherical geometries, spherical spatial indexing injects fuzzyness. set, SpatialPolygons objects, default sqrt(.Machine$double.eps), value also used sf objects coordinate reference system. sf objects defined coordinate reference system, default value 1e-7 geographical coordinates (approximately 10mm), 10mm projected coordinates metre units, converted 10mm distance units coordinates. conversion fail, snap reverts sqrt(.Machine$double.eps). queen TRUE, single shared boundary point meets contiguity condition, FALSE, one shared point required; note one shared boundary point necessarily mean shared boundary line useC default TRUE, work loop C, may set false revert R code calling two C functions n*k work loop, k average number candidate neighbours foundInBox default NULL using R code st_intersects() generate candidate neighbours (using snap= geometries spherical); NULL (legacy purposes) list length (n-1) integer vectors candidate neighbours (j > ) (created poly_findInBoxGEOS function rgeos clean polygons) . Optionally, selection columns group just operation, functioning alternative group_by(). details examples, see ?dplyr_by. .keep Method handling attributes input data. default (\"nest\"), input data converted nested list column name .data_key. values do_union Use sf::st_union() dissolve geometry TRUE (default). Use sf::st_combine() FALSE. .data_key Passed .data argument tidyr::nest() .dissolve_key Used column name dissolve grouping variable. x existing columns name. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_erase.html","id":null,"dir":"Reference","previous_headings":"","what":"Erase or trim geometry of a sf or sfc object — st_erase","title":"Erase or trim geometry of a sf or sfc object — st_erase","text":"st_erase() extends sf::st_difference() unioning second parameter default, checking validity inputs, optionally (flip = TRUE) using sf::st_intersection() instead sf::st_difference. st_trim() equivalent st_erase() flip set TRUE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_erase.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Erase or trim geometry of a sf or sfc object — st_erase","text":"","code":"st_erase(x, y, flip = FALSE, union = TRUE, combine = FALSE, ...) st_trim(x, y, union = TRUE, combine = FALSE, ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_erase.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Erase or trim geometry of a sf or sfc object — st_erase","text":"x sf, sfc, bbox object erase trim. y sf, sfc, bbox object use erase trim. flip TRUE, use sf::st_intersection() \"erase\" geometry x intersects y; FALSE use sf::st_difference() trim x y geometry, Default: FALSE. union TRUE, union y sf::st_union() applying difference/intersection; defaults TRUE. combine TRUE union = TRUE, combine y sf::st_combine() unioning. Defaults FALSE. ... arguments passed s2_options","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_erase.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Erase or trim geometry of a sf or sfc object — st_erase","text":"","code":"nc <- read_sf_ext(system.file(\"shape/nc.shp\", package = \"sf\")) nc <- st_transform_ext(nc, 3657) plot( st_erase( sf::st_buffer(nc[1, ], 1000), nc[1, ] ), max.plot = 1 ) plot( st_trim( nc, sf::st_buffer(nc[1, ], 2000) ), max.plot = 1 )"},{"path":"https://elipousson.github.io/sfext/reference/st_filter_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter, crop, trim, or erase a simple feature object or list — st_filter_ext","title":"Filter, crop, trim, or erase a simple feature object or list — st_filter_ext","text":"Extend sf::st_filter() filter sf list sf, sfc, bbox options crop, trim erase geometry input object based predicate function. Returns x transformed match crs y NULL.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_filter_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter, crop, trim, or erase a simple feature object or list — st_filter_ext","text":"","code":"st_filter_ext( x, y = NULL, crop = FALSE, trim = FALSE, erase = FALSE, crs = NULL, .predicate = sf::st_intersects, type = NULL, allow_list = TRUE, ... ) st_filter_geom_type(x, type = NULL)"},{"path":"https://elipousson.github.io/sfext/reference/st_filter_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter, crop, trim, or erase a simple feature object or list — st_filter_ext","text":"x, y sf, sfc, bbox object. x may also sf list objects. x sf list, additional parameters ... ignored. crop TRUE, x cropped y using sf::st_crop(). trim TRUE, x trimmed y st_trim(). erase TRUE, x erased y st_erase(). crs Coordinate reference system return. .predicate geometry predicate function profile sf::st_intersects(); see details sf::st_filter() options. type Geometry type. allow_list TRUE, x can list sf, sfc, bbox objects. FALSE, sf, sfc, bbox objects supported. Defaults TRUE. ... Arguments passed sf::st_filter","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_filter_ext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Filter, crop, trim, or erase a simple feature object or list — st_filter_ext","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) plot( st_filter_ext( nc, nc[c(1:10), ] ), max.plot = 1 ) plot( st_filter_ext( nc, nc[c(1:10), ], crop = TRUE ), max.plot = 1 ) plot( st_filter_ext( nc, nc[c(1:10), ], erase = TRUE ), max.plot = 1 ) plot( st_filter_ext( nc, sf::st_union(nc[c(1:10), ]), .predicate = sf::st_disjoint ), max.plot = 1 ) st_filter_geom_type(nc, \"POINT\") #> Simple feature collection with 0 features and 14 fields #> Bounding box: xmin: NA ymin: NA xmax: NA ymax: NA #> Geodetic CRS: NAD27 #> # A tibble: 0 × 15 #> # ℹ 15 variables: AREA , PERIMETER , CNTY_ , CNTY_ID , #> # NAME , FIPS , FIPSNO , CRESS_ID , BIR74 , #> # SID74 , NWBIR74 , BIR79 , SID79 , NWBIR79 , #> # geometry st_filter_geom_type(nc, \"MULTIPOLYGON\") #> Simple feature collection with 100 features and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965 #> Geodetic CRS: NAD27 #> # A tibble: 100 × 15 #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> #> 1 0.114 1.44 1825 1825 Ashe 37009 37009 5 1091 1 10 #> 2 0.061 1.23 1827 1827 Alle… 37005 37005 3 487 0 10 #> 3 0.143 1.63 1828 1828 Surry 37171 37171 86 3188 5 208 #> 4 0.07 2.97 1831 1831 Curr… 37053 37053 27 508 1 123 #> 5 0.153 2.21 1832 1832 Nort… 37131 37131 66 1421 9 1066 #> 6 0.097 1.67 1833 1833 Hert… 37091 37091 46 1452 7 954 #> 7 0.062 1.55 1834 1834 Camd… 37029 37029 15 286 0 115 #> 8 0.091 1.28 1835 1835 Gates 37073 37073 37 420 0 254 #> 9 0.118 1.42 1836 1836 Warr… 37185 37185 93 968 4 748 #> 10 0.124 1.43 1837 1837 Stok… 37169 37169 85 1612 1 160 #> # ℹ 90 more rows #> # ℹ 4 more variables: BIR79 , SID79 , NWBIR79 , #> # geometry "},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/st_filter_pct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter by share of length or area of one geometry overlapping with a second geometry — st_filter_pct","text":"","code":"st_filter_pct(x, y, pct = NULL, ...) st_filter_pct_area(x, y, pct = NULL) st_filter_pct_length(x, y, pct = NULL)"},{"path":"https://elipousson.github.io/sfext/reference/st_filter_pct.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter by share of length or area of one geometry overlapping with a second geometry — st_filter_pct","text":"x sf object filter. y sf sfc object filter . pct Percent length area use threshold value filter. Numeric value 1 less. ... Additional parameters. used currently.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_filter_pct.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter by share of length or area of one geometry overlapping with a second geometry — st_filter_pct","text":"filtered version input sf object.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_join_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Complete a spatial join using a simple feature objects or an object and list — st_join_ext","title":"Complete a spatial join using a simple feature objects or an object and list — st_join_ext","text":"Wrapper sf::st_join() works sf lists.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_join_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Complete a spatial join using a simple feature objects or an object and list — st_join_ext","text":"","code":"st_join_ext(x, y, col = NULL, .id = \"name\", join = NULL, ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_join_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Complete a spatial join using a simple feature objects or an object and list — st_join_ext","text":"x sf, sfc, bbox object. y sf object column named \"name\" list sf objects items list \"name\" column. col Column name used convert y sf list already. .id Column name values added column input sf object. join geometry predicate function; defaults NULL, set sf::st_intersects() y contains POLYGON MULTIPOLYGON objects sf::st_nearest_feature() y contains types. ... Additional parameters passed sf::st_join()","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_make_grid_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a grid over a simple feature bounding box — st_make_grid_ext","title":"Make a grid over a simple feature bounding box — st_make_grid_ext","text":"Create grid id column optionally set number columns rows. documentation incomplete function may change.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_make_grid_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a grid over a simple feature bounding box — st_make_grid_ext","text":"","code":"st_make_grid_ext( x, ..., unit = NULL, crs = NULL, ncol = NULL, nrow = NULL, n = NULL, gutter = 0, desc = FALSE, cellsize = NULL, what = NULL, style = \"rect\", .id = \"id\", filter = FALSE, trim = FALSE )"},{"path":"https://elipousson.github.io/sfext/reference/st_make_grid_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a grid over a simple feature bounding box — st_make_grid_ext","text":"x sf, sfc, bbox object, Default: NULL. Required. ... Arguments passed st_bbox_ext nudge Passed parameter st_nudge() NULL. numeric vector, sf object, object can converted simple feature collection as_sfc().. dist buffer distance units. Optional. diag_ratio ratio diagonal distance area's bounding box used buffer distance. e.g. diagonal distance 3000 meters \"diag_ratio = 0.1\" 300 meter used. Ignored dist provided. allow_list TRUE (default), allow sf list objects input use purrr::map() apply provided parameters object within list return new sf list object. asp Aspect ratio width height numeric value (e.g. 0.33) character (e.g. \"1:3\"). numeric, get_asp() returns value without modification. unit Units buffer. Supported options include \"meter\", \"foot\", \"kilometer\", \"mile\", \"nautical mile\" Common abbreviations (e.g. \"km\" instead \"kilometer\") also supported. Distance units converted units matching GDAL units x; defaults \"meter\" crs Coordinate reference system bounding box return; defaults NULL maintains crs input object. ncol, nrow Used set n either NULL; defaults NULL. row id added columns grid provided. n n NULL square TRUE, grid set automatically 10 cells wide, Default: NULL gutter Distance units column cell; gutter effectively serves margin negative buffer applied cells (including edges grid). desc TRUE, reverse standard order cell id numbering; defaults FALSE cellsize numeric length 1 2 target cellsize: square rectangular cells width height, hexagonal cells distance opposite edges (edge length cellsize/sqrt(3)). length units object can passed, area unit object area size square hexagonal cell. \"polygons\", \"corners\", \"centers\"; set centers automatically style \"circle\", \"circle_offset\" buffer applied return circular polygons. style Style cell return options including \"rect\", \"square\", \"hex\", \"flat_top_hex\", \"circle\", \"circle_offset\" .id name use cell id column. Defaults \"id\". filter TRUE (trim TRUE) filter grid geometry x using st_filter_ext trim TRUE, x trimmed y st_trim().","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/st_make_grid_ext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make a grid over a simple feature bounding box — st_make_grid_ext","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) # Make a 2 by 2 grid across a location with a 1000 meter gutter between each cell plot( st_make_grid_ext( x = nc[24, ], dist = 500, unit = \"meter\", ncol = 2, nrow = 2, gutter = 1000 ) ) # Make a 5 by 5 grid with a 8.5 by 11 aspect ratio filtered to x plot( st_make_grid_ext( x = nc[24, ], asp = 8.5 / 11, ncol = 5, nrow = 5, filter = TRUE ) ) # Make a 4 by 5 grid of circles trimmed to x boundaries plot( st_make_grid_ext( x = nc[24, ], ncol = 4, nrow = 5, style = \"circle_offset\", trim = TRUE ), max.plot = 1 )"},{"path":"https://elipousson.github.io/sfext/reference/st_make_valid_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if all geometries are already valid and make valid if not — st_make_valid_ext","title":"Checks if all geometries are already valid and make valid if not — st_make_valid_ext","text":"Checks geometries already valid make valid ","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_make_valid_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if all geometries are already valid and make valid if not — st_make_valid_ext","text":"","code":"st_make_valid_ext(x, ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_make_valid_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if all geometries are already valid and make valid if not — st_make_valid_ext","text":"x object class sfg, sfc sf ... passed s2_options","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_misc.html","id":null,"dir":"Reference","previous_headings":"","what":"Modify the geometry of a simple feature or bounding box object — st_misc","title":"Modify the geometry of a simple feature or bounding box object — st_misc","text":"Support sf, sfc, bbox objects inputs. Get center point sf object Get circumscribed circle inscribed circle sf object Get donut sf object (may work inscribed = TRUE) st_inscribed_square wraps sf::st_inscribed_circle() limits circle 1 segment per quadrant (nQuadSegs = 1) rotates resulting geometry 45 degrees provide (mostly) inscribed square. different rotation value can provided change orientation shape, e.g. rotate = -45 return diamond shape. st_square() wraps st_bbox_ext() asp = 1.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_misc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modify the geometry of a simple feature or bounding box object — st_misc","text":"","code":"st_center(x, class = \"list\", ext = TRUE, ...) st_circle( x, scale = 1, inscribed = TRUE, dTolerance = 0.01, by_feature = FALSE, use_hull = FALSE, use_lwgeom = FALSE ) st_circumscribed_circle(x, scale = 1, dTolerance = 0, by_feature = FALSE) st_donut(x, width = 0.4, scale = 1, inscribed = FALSE, by_feature = TRUE, ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_misc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modify the geometry of a simple feature or bounding box object — st_misc","text":"x sf, sfc, bbox object class Class return st_center(): \"sfc\", \"sf\", \"geometry\" (original input geometry), \"x\" (original input object), \"crs\" (original input crs), \"list\" (including class types). ext TRUE, st_center returns list centroid sfc object, sf object (lon lat values), original geometry (x), original crs. objects; defaults TRUE. FALSE, return sf object. ... Additional parameters passed sf::st_centroid() st_center() st_circle() st_donut(). scale st_donut(), scale apply donut using st_circle(). Defaults 1 keeps donut size input object. inscribed TRUE, make circle, square, donut inscribed within x, FALSE, make circumscribed. dTolerance numeric; tolerance parameter, specified feature geometry. run st_simplify, input data specified long-lat coordinates sf_use_s2() returns TRUE, value dTolerance must specified meters. by_feature st_donut(), TRUE input object x unioned converting donut geometry. FALSE, feature input data remains separate feature output. use_hull st_circle(), TRUE use geometry sf::st_convex_hull() (address issues MULTIPOLYGON objects). use_lwgeom TRUE, by_feature = TRUE inscribed = FALSE, use lwgeom::st_minimum_bounding_circle(). width Donut width proportion outer size.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/st_misc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Modify the geometry of a simple feature or bounding box object — st_misc","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc <- sf::st_transform(nc, crs = 3857) plot(nc, max.plot = 1) plot(st_circumscribed_circle(nc, by_feature = FALSE), max.plot = 1) plot(st_circle(nc, by_feature = FALSE), max.plot = 1, add = TRUE) plot(st_donut(nc[1:10,], by_feature = TRUE), max.plot = 1)"},{"path":"https://elipousson.github.io/sfext/reference/st_nudge.html","id":null,"dir":"Reference","previous_headings":"","what":"Nudge a simple feature to the center of another feature and/or a set distance — st_nudge","title":"Nudge a simple feature to the center of another feature and/or a set distance — st_nudge","text":"Nudge, move, shift sf, sfc, bbox object center another feature /set distance.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_nudge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Nudge a simple feature to the center of another feature and/or a set distance — st_nudge","text":"","code":"st_nudge( x, to = NULL, nudge_y = 0, nudge_x = 0, unit = NULL, scale = 1, rotate = 0, crs = NULL ) # Default S3 method st_nudge( x, to = NULL, nudge_y = 0, nudge_x = 0, unit = NULL, scale = 1, rotate = 0, crs = NULL ) # S3 method for class 'bbox' st_nudge(x, ...) # S3 method for class 'sf' st_nudge(x, ...)"},{"path":"https://elipousson.github.io/sfext/reference/st_nudge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Nudge a simple feature to the center of another feature and/or a set distance — st_nudge","text":"x Object convert sf, sfc, bbox sf list object. sf object use new center x length 2 numeric vector nudge_y nudge_x distance (order). nudge_y, nudge_x Distance nudge geometry unit. unit NULL, distance assumed units coordinate reference system input object. unit Units nudge_y nudge_x distance (also used numeric). scale numeric; scale factor, Default: 1 rotate numeric; degrees rotate (-360 360), Default: 0 crs Coordinate reference system sf, bbox, sfc sf list object return. ... Additional parameters passed as_sf, as_sfc, as_bbox, as_sf_list","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_nudge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Nudge a simple feature to the center of another feature and/or a set distance — st_nudge","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc <- sf::st_transform(nc, crs = 3857) plot(sf::st_union(st_nudge(nc, to = nc[1, ]), nc), max.plot = 1) #> Warning: attribute variables are assumed to be spatially constant throughout all geometries"},{"path":"https://elipousson.github.io/sfext/reference/st_scale_rotate.html","id":null,"dir":"Reference","previous_headings":"","what":"Scale and rotate a simple feature object, simple feature collection, or bounding box — st_scale_rotate","title":"Scale and rotate a simple feature object, simple feature collection, or bounding box — st_scale_rotate","text":"Scale rotate simple feature bounding box object using affine transformations.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_scale_rotate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scale and rotate a simple feature object, simple feature collection, or bounding box — st_scale_rotate","text":"","code":"st_scale_rotate(x, scale = 1, rotate = 0, call = caller_env())"},{"path":"https://elipousson.github.io/sfext/reference/st_scale_rotate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scale and rotate a simple feature object, simple feature collection, or bounding box — st_scale_rotate","text":"x sf, sfc, bbox object another object coercible simple feature collection as_sfc(). scale numeric; scale factor, Default: 1 rotate numeric; degrees rotate (-360 360), Default: 0 call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_scale_rotate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scale and rotate a simple feature object, simple feature collection, or bounding box — st_scale_rotate","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc <- sf::st_transform(nc, crs = 3857) plot(st_scale_rotate(nc, scale = 0.75, rotate = 15), max.plot = 1)"},{"path":"https://elipousson.github.io/sfext/reference/st_square.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a square within or around a simple feature object or collection — st_square","title":"Create a square within or around a simple feature object or collection — st_square","text":"Get circumscribed square approximate inscribed square sf object. inscribed TRUE, square geometry returned may contained wholly within original geometry. inscribed square created bounding box inscribed circle rotated 45 degrees.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_square.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a square within or around a simple feature object or collection — st_square","text":"","code":"st_square( x, scale = 1, rotate = 0, inscribed = FALSE, by_feature = FALSE, call = caller_env() ) # Default S3 method st_square(x, ...) # S3 method for class 'sfc' st_square( x, scale = 1, rotate = 0, inscribed = FALSE, by_feature = FALSE, call = caller_env() ) # S3 method for class 'sf' st_square(x, ..., by_feature = FALSE) # S3 method for class 'bbox' st_square(x, ...) st_inscribed_square(x, scale = 1, rotate = 0, by_feature = FALSE)"},{"path":"https://elipousson.github.io/sfext/reference/st_square.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a square within or around a simple feature object or collection — st_square","text":"x sf, sfc, bbox object another object coercible simple feature collection as_sfc(). scale numeric; scale factor, Default: 1 rotate numeric; degrees rotate (-360 360), Default: 0 inscribed TRUE, returned geometry inscribed within x, FALSE (default), geometry circumscribed. by_feature TRUE, create new geometry feature. FALSE, create new geometry features combine st_union_ext(). call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. ... Additional parameters passed st_square() sfc method x sf bbox object.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_square.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a square within or around a simple feature object or collection — st_square","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc <- sf::st_transform(nc, crs = 3857) plot(st_square(nc), max.plot = 1) plot(st_square(nc[1:10, ], by_feature = TRUE), max.plot = 1)"},{"path":"https://elipousson.github.io/sfext/reference/st_transform_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Transform or convert coordinates of a simple feature or bounding box object — st_transform_ext","title":"Transform or convert coordinates of a simple feature or bounding box object — st_transform_ext","text":"function wraps sf::st_transform() supports wider range input objects , using as_sf_class() function, returns wider range objects. Typically, takes sf, sfc, bbox object transform coordinate reference system match value crs object provided crs. x data.frame x NULL allow_null TRUE (defaults FALSE) returned .","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_transform_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transform or convert coordinates of a simple feature or bounding box object — st_transform_ext","text":"","code":"st_transform_ext( x, crs = NULL, class = NULL, rotate = 0, allow_null = FALSE, allow_list = TRUE ) st_omerc(x, rotate = 0) st_wgs84(x)"},{"path":"https://elipousson.github.io/sfext/reference/st_transform_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transform or convert coordinates of a simple feature or bounding box object — st_transform_ext","text":"x sf, sfc, bbox object, list sf objects, data.frame object (always returned ). crs character numeric reference coordinate reference system supported sf::st_crs() another sf, sfc, bbox object used provide crs. class Class object return (sf bbox). x sf list, returned object remains list may converted bbox class = \"sf\". rotate rotate greater less 0, st_transform_ext() calls st_omerc() returns object Oblique Mercator projection passing value rotate gamma parameter projection. rotate must -45 45 degrees. allow_null TRUE x NULL return x without error. Defaults FALSE. allow_list TRUE, x can list sf, sfc, bbox objects. FALSE, sf, sfc, bbox objects supported. Defaults TRUE.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_transform_ext.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transform or convert coordinates of a simple feature or bounding box object — st_transform_ext","text":"sf, sfc, bbox object transformed new coordinate reference system.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/st_transform_ext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transform or convert coordinates of a simple feature or bounding box object — st_transform_ext","text":"","code":"nc <- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\")) nc_bbox <- sf::st_bbox(nc) nc_3857 <- st_transform_ext(nc, 3857) st_transform_ext(nc_bbox, crs = 4326) #> xmin ymin xmax ymax #> -84.32379 33.88210 -75.45656 36.58981 sf::st_crs(st_transform_ext(nc_3857, crs = nc))$input #> [1] \"NAD27\" sf::st_crs(st_wgs84(nc_3857))$input #> [1] \"EPSG:4326\""},{"path":"https://elipousson.github.io/sfext/reference/st_union_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Union simple feature objects and combine name column values — st_union_ext","title":"Union simple feature objects and combine name column values — st_union_ext","text":"Wrapper sf::st_union() supporting additional feature combined name column collapsed single vector cli::pluralize(). st_union_by() wraps dplyr::group_by() dplyr::summarise() allow quick unioning geometry passed parameters.","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_union_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Union simple feature objects and combine name column values — st_union_ext","text":"","code":"st_union_ext( x, y = NULL, name_col = \"name\", .sf_col = NULL, label = NULL, ext = TRUE, ... ) st_union_by(x, ..., .sf_col = NULL)"},{"path":"https://elipousson.github.io/sfext/reference/st_union_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Union simple feature objects and combine name column values — st_union_ext","text":"x sf, sfc, bbox object sf st_union_by() Required. y sf sfc object, defaults NULL. name_col Column name collapse new name_col value, Default: 'name' .sf_col Geometry column name use x sf object, Default: NULL. label Length 1 character vector used name_col NULL. ext FALSE, st_union_ext() functions sf::st_union(), Default: TRUE ... Additional parameters passed sf::st_union() dplyr::group_by().","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_union_ext.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Union simple feature objects and combine name column values — st_union_ext","text":"sfc object y NULL ext FALSE. tibble sf x sf object y NULL. y provided, st_union_ext() identical sf::st_union()","code":""},{"path":"https://elipousson.github.io/sfext/reference/st_union_ext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Union simple feature objects and combine name column values — st_union_ext","text":"","code":"nc <- read_sf_path(system.file(\"shape/nc.shp\", package = \"sf\")) nc_union <- st_union_ext(nc[10:15,], name_col = \"NAME\") nc_union #> Simple feature collection with 1 feature and 1 field #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -80.45301 ymin: 36.01413 xmax: -78.28293 ymax: 36.55104 #> Geodetic CRS: NAD27 #> # A tibble: 1 × 2 #> NAME geometry #> #> 1 Stokes, Caswell, Rockingham, Granville, Person, and… ((-79.2585 36.23569, -79… plot(nc_union)"},{"path":"https://elipousson.github.io/sfext/reference/standard_scales.html","id":null,"dir":"Reference","previous_headings":"","what":"Standard map, architectural, and engineering scales — standard_scales","title":"Standard map, architectural, and engineering scales — standard_scales","text":"Standard map scales derived USGS 2002 report map scales https://pubs.usgs.gov/fs/2002/0015/report.pdf","code":""},{"path":"https://elipousson.github.io/sfext/reference/standard_scales.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standard map, architectural, and engineering scales — standard_scales","text":"","code":"standard_scales"},{"path":"https://elipousson.github.io/sfext/reference/standard_scales.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Standard map, architectural, and engineering scales — standard_scales","text":"data frame 36 rows 16 variables: scale Scale name standard Standard (USGS, architectural, engineering) series Series name (USGS map scales ) actual_ft Scale distance 1 ft actual. actual_ft_unit Unit scale 1 ft actual. scale_in Actual distance 1 scale. scale_in_unit Unit actual distance 1 scale. scale_in_accuracy Accuracy 1 scale (approximate exact) scale_cm Actual distance 1 cm scale. scale_cm_unit Unit actual distance 1 cm scale. scale_cm_accuracy Accuracy 1 cm scale (approximate exact) size_latlon Standard size latitude/longitude size_latlon_unit Unit latitude/longitude size (minutes degrees) area_approx Approximate actual area area_approx_unit Approximate area unit series_status Series status (select USGS map series \"abandoned\")","code":""},{"path":"https://elipousson.github.io/sfext/reference/standard_scales.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standard map, architectural, and engineering scales — standard_scales","text":"Common architectural engineering scales derived FEMA guide using scales https://www.usfa.fema.gov/downloads/pdf/nfa/engineer-architect-scales.pdf","code":""},{"path":"https://elipousson.github.io/sfext/reference/write_exif_from.html","id":null,"dir":"Reference","previous_headings":"","what":"Write EXIF data for photos on spatial join with a sf object or list of sf objects — write_exif_from","title":"Write EXIF data for photos on spatial join with a sf object or list of sf objects — write_exif_from","text":"Extends read_sf_exif() filenamr::write_exif()","code":""},{"path":"https://elipousson.github.io/sfext/reference/write_exif_from.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write EXIF data for photos on spatial join with a sf object or list of sf objects — write_exif_from","text":"","code":"write_exif_from( path, fileext = NULL, filetype = NULL, from, .id = \"name\", tag = \"keywords\", join = NULL, overwrite = TRUE )"},{"path":"https://elipousson.github.io/sfext/reference/write_exif_from.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write EXIF data for photos on spatial join with a sf object or list of sf objects — write_exif_from","text":"path path folder file. fileext, filetype File extension file type. filetype used fileext NULL. sf object list sf objects object column name matching .id parameter. attribute value column used assign tag parameter file provided path based spatial relationship set join. example, may boundary data used assign keywords based photo locations. .id Column name values use tag values. tag EXIF tag update, supported options include \"keywords\", \"title\", \"description\". join geometry predicate function; defaults NULL, set sf::st_intersects contains POLYGON MULTIPOLYGON objects sf::st_nearest_feature contains types. overwrite TRUE, overwrite existing EXIF metadata present provided fields; defaults TRUE","code":""},{"path":"https://elipousson.github.io/sfext/reference/write_sf_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Write or cache a simple feature object to a file — write_sf_ext","title":"Write or cache a simple feature object to a file — write_sf_ext","text":"write_sf_ext write_sf_cache helper functions wrap sf::write_sf() function provide additional options including consistent file naming make_filename() features including:","code":""},{"path":"https://elipousson.github.io/sfext/reference/write_sf_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write or cache a simple feature object to a file — write_sf_ext","text":"","code":"write_sf_ext( data, name = NULL, label = NULL, prefix = NULL, postfix = NULL, filename = NULL, fileext = NULL, filetype = NULL, description = NULL, path = NULL, cache = FALSE, pkg = \"sfext\", overwrite = FALSE, onefile = FALSE, ... ) write_sf_list( data, name = NULL, label = NULL, prefix = NULL, postfix = NULL, filename = NULL, fileext = NULL, filetype = NULL, path = NULL, overwrite = FALSE, onefile = FALSE, cache = FALSE, ... ) write_sf_cache( data, name = NULL, label = NULL, prefix = NULL, postfix = NULL, filename = NULL, fileext = NULL, filetype = NULL, data_dir = NULL, pkg = \"sfext\", overwrite = FALSE, create = TRUE, ... ) write_sf_gist( data, name = NULL, label = NULL, prefix = NULL, postfix = NULL, filename = NULL, fileext = \"geojson\", filetype = NULL, description = NULL, public = TRUE, browse = FALSE, token = Sys.getenv(\"GITHUB_PAT\") ) write_sf_gsheet( data, name = NULL, label = NULL, prefix = NULL, postfix = NULL, filename = NULL, sheet = 1, ask = FALSE, key = NULL, ... )"},{"path":"https://elipousson.github.io/sfext/reference/write_sf_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write or cache a simple feature object to a file — write_sf_ext","text":"data sf object, data frame, object write. name Name make file name converted snake case janitor::make_clean_names(), e.g. \"Residential zoning map\" becomes \"residential_zoning_map\". name includes file extension assumed filename provided name parameter. label Label combine name converted snake case janitor::make_clean_names(). label designed identify area shared characteristics across multiple data files, maps, plots. label ignored name NULL name includes file extension. prefix File name prefix. \"date\" adds date prefix, \"time\" adds date/time prefix; defaults NULL. postfix File name postfix; defaults NULL. filename, fileext, filetype File name /file extension write. filetype superseded favor fileext. optional path includes filename type, e.g. \"~/Documents/data.geojson\". fileext can provided part filename, e.g. \"data.geojson\". filename includes file extensions separate fileext also provided, separate fileext parameter used. Supported file extensions include \"csv\", \"xlsx\", \"gsheet\" (writes Google Sheet), \"rda\", fileext supported available drivers (use sf::st_drivers() list drivers). description (character) Brief description gist (optional) path Path file data directory. Optional. path includes file extension filename fileext NULL, filename extension included path used instead. multiple file extensions provided filename, path, fileext, make_filename() abort. cache TRUE, write sf object file cache directory; defaults FALSE. pkg name package cache directory use write_sf_cache write_sf_ext cache = TRUE. overwrite Logical. Default FALSE. TRUE, overwrite existing cached files use file name. onefile TRUE fileext \"gpkg\" (directly filename), save sf list multilayer GeoPackage file names list items used layer names. ... data sf object fileext \"csv\" \"xlsx\", ... parameters passed sf_to_df() sf::write_sf() otherwise. fileext \"rda\" ... parameters passed readr::write_rds(). data_dir cache data directory, defaults rappdirs::user_cache_dir() data_dir NULL. (used write_sf_cache(); default used cache = TRUE write_sf_ext()) create FALSE path exist, return path warning. TRUE rlang::is_interactive() TRUE, ask user directory created. session interactive create TRUE, new directory created. public (logical) Whether gist public (default: TRUE) browse (logical) open newly create gist default browser (default: TRUE) token personal access token GitHub permission create gists; defaults Sys.getenv(\"GITHUB_PAT\") sheet Sheet write , sense \"worksheet\" \"tab\". can identify sheet name, string, position, number. ask TRUE, user prompted make revisions created Google Sheet. user responds prompt, date read back environment using read_sf_gsheet joined provided data column name provided key. Defaults FALSE. key ask TRUE, key required join sheet data provided data.","code":""},{"path":"https://elipousson.github.io/sfext/reference/write_sf_ext.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Write or cache a simple feature object to a file — write_sf_ext","text":"fileext \"csv\", \"xlsx\", \"gsheet\" file converted dataframe using df_to_sf() data sf object none filenames provided, user prompted save file rda file readr::write_rds(). cache TRUE use write_sf_cache() cache file writing copy path provided. data named sf list, pass name sf object list name parameter keep parameters consistent write file object list. ... parameters passed data sf list.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/reference/write_sf_svg.html","id":null,"dir":"Reference","previous_headings":"","what":"Write an sf object to an svg file — write_sf_svg","title":"Write an sf object to an svg file — write_sf_svg","text":"write_sf_svg() uses plot() svg() create simple plot sf object geometry. function convenient working designers collaborators interested using spatial data outside R desktop GIS application.","code":""},{"path":"https://elipousson.github.io/sfext/reference/write_sf_svg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write an sf object to an svg file — write_sf_svg","text":"","code":"write_sf_svg(data, filename = NULL, path = NULL, ..., width = 10, height = 10)"},{"path":"https://elipousson.github.io/sfext/reference/write_sf_svg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write an sf object to an svg file — write_sf_svg","text":"data sf object save svg file. filename file path output file(s). page number substituted C integer format included character string, default. (Depending platform, result must less PATH_MAX characters long, may truncated . See pdf details.) Tilde expansion performed supported platform. path File path combine filename. Optional filename provided. filename optional path includes svg file extension. ... Arguments passed grDevices::svg pointsize default pointsize plotted text (big points). onefile plots appear one file separate files? family one device-independent font families, \"sans\", \"serif\" \"mono\", character string specify font family searched system-dependent way. unix-alikes (incl.\\ macOS), see ‘Cairo fonts’ section help X11. bg initial background colour: can overridden setting par(\"bg\"). antialias string, type anti-aliasing () used; defaults \"default\". symbolfamily length-one character string specifies font family used \"symbol\" font (e.g., plotmath output). width width device inches. height height device inches.","code":""},{"path":[]},{"path":"https://elipousson.github.io/sfext/news/index.html","id":"fixes-development-version","dir":"Changelog","previous_headings":"","what":"Fixes","title":"sfext (development version)","text":"Correct several small typos standalone sf utilities. Correct typo id_arg default value bind_sf_coverage() Correct typos internal cli_abort_ifnot() cli_warn_ifnot() functions.","code":""},{"path":"https://elipousson.github.io/sfext/news/index.html","id":"changes-development-version","dir":"Changelog","previous_headings":"","what":"Changes","title":"sfext (development version)","text":"Replace st_concave_hull st_concave_hull_ext() Avoid using .onLoad load packaged data (use namespacing per guidance R Packages book)","code":""},{"path":"https://elipousson.github.io/sfext/news/index.html","id":"new-features-development-version","dir":"Changelog","previous_headings":"","what":"New features","title":"sfext (development version)","text":"Add rdeck helper functions rdeck_edit() rdeck_select() Add mapview helper functions mapview_ext() mapview_exif() Add new read_sf_felt() function (#5) Add new st_dissolve() function.","code":""},{"path":"https://elipousson.github.io/sfext/news/index.html","id":"sfext-011-2023-03-28","dir":"Changelog","previous_headings":"","what":"sfext 0.1.1 (2023-03-28)","title":"sfext 0.1.1 (2023-03-28)","text":"Add is_wgs84() + as_wgs84() functions. Export st_edge() function. Deprecate get_data_dir() function (superseded ) filenamr::get_data_dir(). Removed write_exif() function (moved filenamr::write_exif()). Replace null.ok parameter allow_null list.ok parameter allow_list. Stop importing purrr::map() purrr::map_lgl() (replaced standalone-purrr.R). Add new pkg parameter read_sf_pkg() alternative package parameter.","code":""},{"path":"https://elipousson.github.io/sfext/news/index.html","id":"sfext-0109000-2023-03-15","dir":"Changelog","previous_headings":"","what":"sfext 0.1.0.9000 (2023-03-15)","title":"sfext 0.1.0.9000 (2023-03-15)","text":"Initial release!","code":""}]