diff --git a/news/index.html b/news/index.html
index 6b3cd35..a7c3318 100644
--- a/news/index.html
+++ b/news/index.html
@@ -44,14 +44,10 @@
Source: NEWS.md
-
st_geom_from_geohash()
; #37digits
in st_astext()
-fix default for argument digits
in st_astext()
CRAN release: 2024-02-21
diff --git a/pkgdown.yml b/pkgdown.yml index 62669f5..8879409 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 3.1.11 pkgdown: 2.0.9 pkgdown_sha: ~ articles: {} -last_built: 2024-05-11T20:55Z +last_built: 2024-05-11T20:58Z urls: reference: https://r-spatial.github.io/lwgeom/reference article: https://r-spatial.github.io/lwgeom/articles diff --git a/search.json b/search.json index 4366066..ab7d7fc 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://r-spatial.github.io/lwgeom/CONDUCT.html","id":null,"dir":"","previous_headings":"","what":"Contributor Code of Conduct","title":"Contributor Code of Conduct","text":"contributors maintainers project, pledge respect people contribute reporting issues, posting feature requests, updating documentation, submitting pull requests patches, activities. committed making participation project harassment-free experience everyone, regardless level experience, gender, gender identity expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion. Examples unacceptable behavior participants include use sexual language imagery, derogatory comments personal attacks, trolling, public private harassment, insults, unprofessional conduct. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct. Project maintainers follow Code Conduct may removed project team. Instances abusive, harassing, otherwise unacceptable behavior may reported opening issue contacting one project maintainers. Code Conduct adapted Contributor Covenant (http:contributor-covenant.org), version 1.0.0, available http://contributor-covenant.org/version/1/0/0/","code":""},{"path":"https://r-spatial.github.io/lwgeom/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Edzer Pebesma. Author, maintainer. Colin Rundel. Contributor. Andy Teucher. Contributor. liblwgeom developers. Copyright holder.","code":""},{"path":"https://r-spatial.github.io/lwgeom/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Pebesma E (2024). lwgeom: Bindings Selected 'liblwgeom' Functions Simple Features. R package version 0.2-15, https://github.com/r-spatial/lwgeom, https://r-spatial.github.io/lwgeom/.","code":"@Manual{, title = {lwgeom: Bindings to Selected 'liblwgeom' Functions for Simple Features}, author = {Edzer Pebesma}, year = {2024}, note = {R package version 0.2-15, https://github.com/r-spatial/lwgeom}, url = {https://r-spatial.github.io/lwgeom/}, }"},{"path":"https://r-spatial.github.io/lwgeom/index.html","id":"lwgeom","dir":"","previous_headings":"","what":"Bindings to Selected liblwgeom Functions for Simple Features","title":"Bindings to Selected liblwgeom Functions for Simple Features","text":"R bindings liblwgeom library package provides functions use liblwgeom, including st_geohash(), st_minimum_bounding_circle(), st_split(), st_subdivide(), st_transform_proj() (transform proj, omitting GDAL) st_as_sfc.TWKB() (creates sfc tiny wkb), well geodetic (spherical/ellipsoidal) geometry functions st_geod_area(), st_geod_length(), st_geod_distance(), st_geod_covers(), st_geod_azimuth(), st_geod_segmentize(). previously offered st_make_valid() now generic package sf (sf::st_make_valid()).","code":""},{"path":"https://r-spatial.github.io/lwgeom/index.html","id":"installing","dir":"","previous_headings":"","what":"Installing","title":"Bindings to Selected liblwgeom Functions for Simple Features","text":"lwgeom depends sf, installed first. package uses liblwgeom library, compiles shipped (modified) version liblwgeom. links GEOS PROJ libraries. install source, enough installed sf source; resources package (PROJ, GEOS) reused.","code":""},{"path":"https://r-spatial.github.io/lwgeom/index.html","id":"lwgeom-source-now-included","dir":"","previous_headings":"","what":"lwgeom source now included","title":"Bindings to Selected liblwgeom Functions for Simple Features","text":"Previous version 0.1-6, lwgeom also try link system library liblwgeom; 0.1-6 shipped version used.","code":""},{"path":"https://r-spatial.github.io/lwgeom/index.html","id":"contributing","dir":"","previous_headings":"","what":"Contributing","title":"Bindings to Selected liblwgeom Functions for Simple Features","text":"Contributions sorts welcome, issues pull requests preferred ways sharing . contributing pull requests, please adhere package style (package code use = rather <-; don’t change indentation; tab stops 4 spaces preferred) project released Contributor Code Conduct. participating project agree abide terms.","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/bounding_circle.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate the minimum bounding circle — bounding_circle","title":"Generate the minimum bounding circle — bounding_circle","text":"Generate minimum bounding circle","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/bounding_circle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate the minimum bounding circle — bounding_circle","text":"","code":"st_minimum_bounding_circle(x, nQuadSegs = 30)"},{"path":"https://r-spatial.github.io/lwgeom/reference/bounding_circle.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate the minimum bounding circle — bounding_circle","text":"x object class sfg, sfg sf nQuadSegs number segments per quadrant (passed st_buffer)","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/bounding_circle.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate the minimum bounding circle — bounding_circle","text":"Object class x","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/bounding_circle.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate the minimum bounding circle — bounding_circle","text":"st_minimum_bounding_circle uses lwgeom_calculate_mbc method also used PostGIS command ST_MinimumBoundingCircle.","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/bounding_circle.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate the minimum bounding circle — bounding_circle","text":"","code":"library(sf) #> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE x = st_multipoint(matrix(c(0,1,0,1),2,2)) y = st_multipoint(matrix(c(0,0,1,0,1,1),3,2)) mbcx = st_minimum_bounding_circle(x) mbcy = st_minimum_bounding_circle(y) if (.Platform$OS.type != \"windows\") { plot(mbcx, axes=TRUE); plot(x, add=TRUE) plot(mbcy, axes=TRUE); plot(y, add=TRUE) } nc = st_read(system.file(\"gpkg/nc.gpkg\", package=\"sf\")) #> Reading layer `nc.gpkg' from data source #> `/home/runner/work/_temp/Library/sf/gpkg/nc.gpkg' using driver `GPKG' #> 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 state = st_union(st_geometry(nc)) if (.Platform$OS.type != \"windows\") { plot(st_minimum_bounding_circle(state), asp=1) plot(state, add=TRUE) }"},{"path":"https://r-spatial.github.io/lwgeom/reference/geod.html","id":null,"dir":"Reference","previous_headings":"","what":"liblwgeom geodetic functions — geod","title":"liblwgeom geodetic functions — geod","text":"liblwgeom geodetic functions length, area, segmentizing, covers","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/geod.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"liblwgeom geodetic functions — geod","text":"","code":"st_geod_area(x) st_geod_length(x) st_geod_segmentize(x, max_seg_length) st_geod_covers(x, y, sparse = TRUE) st_geod_covered_by(x, y, sparse = TRUE) st_geod_distance(x, y, tolerance = 0, sparse = FALSE)"},{"path":"https://r-spatial.github.io/lwgeom/reference/geod.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"liblwgeom geodetic functions — geod","text":"x object class sf, sfc sfg max_seg_length segment length degree, radians, length unit (e.g., m) y object class sf, sfc sfg sparse logical; TRUE, return sparse matrix (object class sgbp), otherwise, return dense logical matrix. tolerance double length units value: positive, first distance less tolerance returned, rather true distance","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/geod.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"liblwgeom geodetic functions — geod","text":"st_area give error message area spans equator lwgeom linked proj.4 version older 4.9.0 (see lwgeom_extSoftVersion) longitude coordinates returned rescaled [-180,180)","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/geod.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"liblwgeom geodetic functions — geod","text":"function used st_distance, use directly","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/geod.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"liblwgeom geodetic functions — geod","text":"","code":"library(sf) nc = st_read(system.file(\"gpkg/nc.gpkg\", package=\"sf\")) #> Reading layer `nc.gpkg' from data source #> `/home/runner/work/_temp/Library/sf/gpkg/nc.gpkg' using driver `GPKG' #> 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 st_geod_area(nc[1:3,]) #> Units: [m^2] #> [1] 1137388604 611077263 1423489919 # st_area(nc[1:3,]) l = st_sfc(st_linestring(rbind(c(7,52), c(8,53))), crs = 4326) st_geod_length(l) #> 130359.3 [m] library(units) #> udunits database from /usr/share/xml/udunits/udunits2.xml pol = st_polygon(list(rbind(c(0,0), c(0,60), c(60,60), c(0,0)))) x = st_sfc(pol, crs = 4326) seg = st_geod_segmentize(x[1], set_units(10, km)) plot(seg, graticule = TRUE, axes = TRUE) pole = st_polygon(list(rbind(c(0,80), c(120,80), c(240,80), c(0,80)))) pt = st_point(c(0,90)) x = st_sfc(pole, pt, crs = 4326) st_geod_covers(x[c(1,1,1)], x[c(2,2,2,2)]) #> Sparse geometry binary predicate list of length 3, where the predicate #> was `covers' #> 1: 1, 2, 3, 4 #> 2: 1, 2, 3, 4 #> 3: 1, 2, 3, 4 pole = st_polygon(list(rbind(c(0,80), c(120,80), c(240,80), c(0,80)))) pt = st_point(c(30,70)) x = st_sfc(pole, pt, crs = 4326) st_geod_distance(x, x) #> Units: [m] #> [,1] [,2] #> [1,] 0 1378923 #> [2,] 1378923 0"},{"path":"https://r-spatial.github.io/lwgeom/reference/lwgeom_extSoftVersion.html","id":null,"dir":"Reference","previous_headings":"","what":"Provide the external dependencies versions of the libraries linked to sf — lwgeom_extSoftVersion","title":"Provide the external dependencies versions of the libraries linked to sf — lwgeom_extSoftVersion","text":"Provide external dependencies versions libraries linked sf","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/lwgeom_extSoftVersion.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Provide the external dependencies versions of the libraries linked to sf — lwgeom_extSoftVersion","text":"","code":"lwgeom_extSoftVersion()"},{"path":"https://r-spatial.github.io/lwgeom/reference/lwgeom_make_valid.html","id":null,"dir":"Reference","previous_headings":"","what":"Make an invalid geometry valid — lwgeom_make_valid","title":"Make an invalid geometry valid — lwgeom_make_valid","text":"Make invalid geometry valid","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/lwgeom_make_valid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make an invalid geometry valid — lwgeom_make_valid","text":"","code":"lwgeom_make_valid(x)"},{"path":"https://r-spatial.github.io/lwgeom/reference/lwgeom_make_valid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make an invalid geometry valid — lwgeom_make_valid","text":"x object class sfc","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/perimeter.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute perimeter from polygons or other geometries — perimeter","title":"Compute perimeter from polygons or other geometries — perimeter","text":"Compute perimeter polygons geometries","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/perimeter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute perimeter from polygons or other geometries — perimeter","text":"","code":"st_perimeter_lwgeom(x) st_perimeter_2d(x)"},{"path":"https://r-spatial.github.io/lwgeom/reference/perimeter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute perimeter from polygons or other geometries — perimeter","text":"x object class sf, sfc sfg","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/perimeter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute perimeter from polygons or other geometries — perimeter","text":"numerical vector perimeter feature (geometry), unit measure possible","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_as_sfc.TWKB.html","id":null,"dir":"Reference","previous_headings":"","what":"create sfc object from tiny well-known binary (twkb) — st_as_sfc.TWKB","title":"create sfc object from tiny well-known binary (twkb) — st_as_sfc.TWKB","text":"create sfc object tiny well-known binary (twkb)","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_as_sfc.TWKB.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"create sfc object from tiny well-known binary (twkb) — st_as_sfc.TWKB","text":"","code":"# S3 method for TWKB st_as_sfc(x, ...)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_as_sfc.TWKB.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"create sfc object from tiny well-known binary (twkb) — st_as_sfc.TWKB","text":"x list raw vectors, class TWKB ... ignored","code":""},{"path":[]},{"path":"https://r-spatial.github.io/lwgeom/reference/st_as_sfc.TWKB.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"create sfc object from tiny well-known binary (twkb) — st_as_sfc.TWKB","text":"","code":"l = structure(list(as.raw(c(0x02, 0x00, 0x02, 0x02, 0x02, 0x08, 0x08))), class = \"TWKB\") library(sf) # load generic st_as_sfc(l) #> Geometry set for 1 feature #> Geometry type: LINESTRING #> Dimension: XY #> Bounding box: xmin: 1 ymin: 1 xmax: 5 ymax: 5 #> CRS: NA #> LINESTRING (1 1, 5 5)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_astext.html","id":null,"dir":"Reference","previous_headings":"","what":"Return Well-known Text representation of simple feature geometry — st_astext","title":"Return Well-known Text representation of simple feature geometry — st_astext","text":"Return Well-known Text representation simple feature geometry coordinate reference system","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_astext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return Well-known Text representation of simple feature geometry — st_astext","text":"","code":"st_astext(x, digits = getOption(\"digits\"), ..., EWKT = FALSE) st_asewkt(x, digits = options(\"digits\"))"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_astext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return Well-known Text representation of simple feature geometry — st_astext","text":"x object class sfg, sfc, sf digits integer; number decimal digits print ... ignored EWKT logical; use PostGIS Enhanced WKT (includes srid)","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_astext.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Return Well-known Text representation of simple feature geometry — st_astext","text":"returned WKT representation simple feature geometry conforms simple features access specification extensions (EWKT = TRUE), known EWKT, supported PostGIS simple features implementations addition SRID WKT string. st_asewkt() returns Well-Known Text (WKT) representation geometry SRID meta data.","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_astext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return Well-known Text representation of simple feature geometry — st_astext","text":"","code":"library(sf) pt <- st_sfc(st_point(c(1.0002,2.3030303)), crs = 4326) st_astext(pt, 3) #> [1] \"POINT(1 2.303)\" st_asewkt(pt, 3) #> [1] \"SRID=4326;POINT(1 2.303)\""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_force_polygon_cw.html","id":null,"dir":"Reference","previous_headings":"","what":"Force a POLYGON or MULTIPOLYGON to be clockwise — st_force_polygon_cw","title":"Force a POLYGON or MULTIPOLYGON to be clockwise — st_force_polygon_cw","text":"Check POLYGON MULTIPOLYGON clockwise, make . According 'Right-hand-rule', outer rings clockwise, inner holes counter-clockwise","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_force_polygon_cw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Force a POLYGON or MULTIPOLYGON to be clockwise — st_force_polygon_cw","text":"","code":"st_force_polygon_cw(x)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_force_polygon_cw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Force a POLYGON or MULTIPOLYGON to be clockwise — st_force_polygon_cw","text":"x object polygon geometries","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_force_polygon_cw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Force a POLYGON or MULTIPOLYGON to be clockwise — st_force_polygon_cw","text":"object class x","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_force_polygon_cw.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Force a POLYGON or MULTIPOLYGON to be clockwise — st_force_polygon_cw","text":"","code":"library(sf) polys <- st_sf(cw = c(FALSE, TRUE), st_as_sfc(c('POLYGON ((0 0, 1 0, 1 1, 0 0))', 'POLYGON ((1 1, 2 2, 2 1, 1 1))'))) st_force_polygon_cw(polys) #> Simple feature collection with 2 features and 1 field #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: 0 ymin: 0 xmax: 2 ymax: 2 #> CRS: NA #> cw #> 1 FALSE #> 2 TRUE #> st_as_sfc.c..POLYGON...0.0..1.0..1.1..0.0......POLYGON...1.1..2.2..2.1..1.1..... #> 1 POLYGON ((0 0, 1 1, 1 0, 0 0)) #> 2 POLYGON ((1 1, 2 2, 2 1, 1 1)) st_force_polygon_cw(st_geometry(polys)) #> Geometry set for 2 features #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: 0 ymin: 0 xmax: 2 ymax: 2 #> CRS: NA #> POLYGON ((0 0, 1 1, 1 0, 0 0)) #> POLYGON ((1 1, 2 2, 2 1, 1 1)) st_force_polygon_cw(st_geometry(polys)[[1]]) #> POLYGON ((0 0, 1 1, 1 0, 0 0))"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geod_azimuth.html","id":null,"dir":"Reference","previous_headings":"","what":"compute azimuth between sequence of points — st_geod_azimuth","title":"compute azimuth between sequence of points — st_geod_azimuth","text":"compute azimuth sequence points","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geod_azimuth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"compute azimuth between sequence of points — st_geod_azimuth","text":"","code":"st_geod_azimuth(x)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geod_azimuth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"compute azimuth between sequence of points — st_geod_azimuth","text":"x object class sf, sfc sfg","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geod_azimuth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"compute azimuth between sequence of points — st_geod_azimuth","text":"","code":"library(sf) p = st_sfc(st_point(c(7,52)), st_point(c(8,53)), crs = 4326) st_geod_azimuth(p) #> 0.5410385 [rad]"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geohash.html","id":null,"dir":"Reference","previous_headings":"","what":"compute geohash from (average) coordinates — st_geohash","title":"compute geohash from (average) coordinates — st_geohash","text":"compute geohash (average) coordinates","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geohash.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"compute geohash from (average) coordinates — st_geohash","text":"","code":"st_geohash(x, precision = 0) st_geom_from_geohash(hash, precision = -1, crs = st_crs(\"OGC:CRS84\"))"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geohash.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"compute geohash from (average) coordinates — st_geohash","text":"x object class sf, sfc sfg precision integer; precision (length) geohash returned. liblwgeom source: ``precision non-positive, precision based bounds feature. Big features loose precision. Small features tight precision.'' hash character vector geohashes crs object class `crs`","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geohash.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"compute geohash from (average) coordinates — st_geohash","text":"character vector geohashes","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geohash.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"compute geohash from (average) coordinates — st_geohash","text":"see http://geohash.org/ https://en.wikipedia.org/wiki/Geohash.","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geohash.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"compute geohash from (average) coordinates — st_geohash","text":"","code":"library(sf) lwgeom::st_geohash(st_sfc(st_point(c(1.5,3.5)), st_point(c(0,90))), 2) #> [1] \"s0\" \"up\" lwgeom::st_geohash(st_sfc(st_point(c(1.5,3.5)), st_point(c(0,90))), 10) #> [1] \"s095fjhkbx\" \"upbpbpbpbp\" o = options(digits = 20) st_geom_from_geohash(c('9qqj7nmxncgyy4d0dbxqz0', 'u1hzz631zyd63zwsd7zt')) #> Geometry set for 2 features #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -115.172816 ymin: 36.114646 xmax: 7.00000000000014 ymax: 52.0000000000001 #> Geodetic CRS: WGS 84 #> POLYGON ((-115.17281600000001163 36.11464599999... #> POLYGON ((6.9999999999998152589 51.999999999999... st_geom_from_geohash('9qqj7nmxncgyy4d0dbxqz0', 4) #> Geometry set for 1 feature #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -115.3125 ymin: 36.03515625 xmax: -114.9609375 ymax: 36.2109375 #> Geodetic CRS: WGS 84 #> POLYGON ((-115.3125 36.03515625, -114.9609375 3... st_geom_from_geohash('9qqj7nmxncgyy4d0dbxqz0', 10) #> Geometry set for 1 feature #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -115.17282128334 ymin: 36.1146408319473 xmax: -115.172810554504 ymax: 36.1146461963654 #> Geodetic CRS: WGS 84 #> POLYGON ((-115.1728212833404541 36.114640831947... options(o)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_is_polygon_cw.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a POLYGON or MULTIPOLYGON is clockwise — st_is_polygon_cw","title":"Check if a POLYGON or MULTIPOLYGON is clockwise — st_is_polygon_cw","text":"Check POLYGON MULTIPOLYGON clockwise. According 'Right-hand-rule', outer rings clockwise, inner holes counter-clockwise","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_is_polygon_cw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a POLYGON or MULTIPOLYGON is clockwise — st_is_polygon_cw","text":"","code":"st_is_polygon_cw(x)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_is_polygon_cw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a POLYGON or MULTIPOLYGON is clockwise — st_is_polygon_cw","text":"x object polygon geometries","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_is_polygon_cw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a POLYGON or MULTIPOLYGON is clockwise — st_is_polygon_cw","text":"logical length number features `x`","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_is_polygon_cw.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check if a POLYGON or MULTIPOLYGON is clockwise — st_is_polygon_cw","text":"","code":"library(sf) polys <- st_sf(cw = c(FALSE, TRUE), st_as_sfc(c('POLYGON ((0 0, 1 0, 1 1, 0 0))', 'POLYGON ((1 1, 2 2, 2 1, 1 1))'))) st_is_polygon_cw(polys) #> [1] FALSE TRUE st_is_polygon_cw(st_geometry(polys)) #> [1] FALSE TRUE st_is_polygon_cw(st_geometry(polys)[[1]]) #> [1] FALSE"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_linesubstring.html","id":null,"dir":"Reference","previous_headings":"","what":"get substring from linestring — st_linesubstring","title":"get substring from linestring — st_linesubstring","text":"get substring linestring","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_linesubstring.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get substring from linestring — st_linesubstring","text":"","code":"st_linesubstring(x, from, to, tolerance, ...)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_linesubstring.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get substring from linestring — st_linesubstring","text":"x object class sfc, sf sfg relative distance origin ([0,1]) relative distance origin ([0,1]) tolerance tolerance parameter, snap line node node ... ignored","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_linesubstring.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get substring from linestring — st_linesubstring","text":"object class sfc","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_linesubstring.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get substring from linestring — st_linesubstring","text":"","code":"library(sf) lines = st_sfc(st_linestring(rbind(c(0,0), c(1,2), c(2,0))), crs = 4326) spl = st_linesubstring(lines, 0.2, 0.8) # should warn #> Warning: st_linesubstring does not follow a geodesic; you may want to use st_geod_segmentize first plot(st_geometry(lines), col = 'red', lwd = 3) plot(spl, col = 'black', lwd = 3, add = TRUE) st_linesubstring(lines, 0.49999, 0.8) # three points #> Warning: st_linesubstring does not follow a geodesic; you may want to use st_geod_segmentize first #> Geometry set for 1 feature #> Geometry type: LINESTRING #> Dimension: XY #> Bounding box: xmin: 0.99998 ymin: 0.8 xmax: 1.6 ymax: 2 #> Geodetic CRS: WGS 84 #> LINESTRING (0.99998 1.99996, 1 2, 1.6 0.8) st_linesubstring(lines, 0.49999, 0.8, 0.001) # two points: snap start to second node #> Warning: st_linesubstring does not follow a geodesic; you may want to use st_geod_segmentize first #> Geometry set for 1 feature #> Geometry type: LINESTRING #> Dimension: XY #> Bounding box: xmin: 1 ymin: 0.8 xmax: 1.6 ymax: 2 #> Geodetic CRS: WGS 84 #> LINESTRING (1 2, 1.6 0.8)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_snap_to_grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Snap geometries to a grid — st_snap_to_grid","title":"Snap geometries to a grid — st_snap_to_grid","text":"Snap geometries grid","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_snap_to_grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Snap geometries to a grid — st_snap_to_grid","text":"","code":"st_snap_to_grid(x, size, origin)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_snap_to_grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Snap geometries to a grid — st_snap_to_grid","text":"x object geometries snapped size numeric (length) units object; grid cell size x-, y- (possibly z- m-) directions origin numeric; origin grid","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_snap_to_grid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Snap geometries to a grid — st_snap_to_grid","text":"object class x","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_snap_to_grid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Snap geometries to a grid — st_snap_to_grid","text":"","code":"# obtain data library(sf) x = st_read(system.file(\"gpkg/nc.gpkg\", package=\"sf\"), quiet = TRUE)[1, ] %>% st_geometry %>% st_transform(3395) # snap to a grid of 5000 m err = try(y <- st_snap_to_grid(x, 5000)) # plot data for visual comparison if (!inherits(err, \"try-error\")) { opar = par(mfrow = c(1, 2)) plot(x, main = \"orginal data\") plot(y, main = \"snapped to 5000 m\") par(opar) }"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_split.html","id":null,"dir":"Reference","previous_headings":"","what":"Return a collection of geometries resulting by splitting a geometry — st_split","title":"Return a collection of geometries resulting by splitting a geometry — st_split","text":"Return collection geometries resulting splitting geometry","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_split.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return a collection of geometries resulting by splitting a geometry — st_split","text":"","code":"st_split(x, y)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_split.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return a collection of geometries resulting by splitting a geometry — st_split","text":"x object geometries splitted y object split (blade); y contains one feature geometry, geometries st_combine 'd","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_split.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return a collection of geometries resulting by splitting a geometry — st_split","text":"object class x","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_split.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return a collection of geometries resulting by splitting a geometry — st_split","text":"","code":"library(sf) l = st_as_sfc('MULTILINESTRING((10 10, 190 190), (15 15, 30 30, 100 90))') pt = st_sfc(st_point(c(30,30))) st_split(l, pt) #> Geometry set for 1 feature #> Geometry type: GEOMETRYCOLLECTION #> Dimension: XY #> Bounding box: xmin: 10 ymin: 10 xmax: 190 ymax: 190 #> CRS: NA #> GEOMETRYCOLLECTION (LINESTRING (10 10, 30 30), ..."},{"path":"https://r-spatial.github.io/lwgeom/reference/st_startpoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Return the start and end points from lines — st_startpoint","title":"Return the start and end points from lines — st_startpoint","text":"Return start end points lines","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_startpoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return the start and end points from lines — st_startpoint","text":"","code":"st_startpoint(x) st_endpoint(x)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_startpoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return the start and end points from lines — st_startpoint","text":"x line class sf, sfc sfg","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_startpoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return the start and end points from lines — st_startpoint","text":"sf object representing start end points","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_startpoint.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Return the start and end points from lines — st_startpoint","text":"see https://postgis.net/docs/ST_StartPoint.html https://postgis.net/docs/ST_EndPoint.html.","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_startpoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return the start and end points from lines — st_startpoint","text":"","code":"library(sf) m = matrix(c(0, 1, 2, 0, 1, 4), ncol = 2) l = st_sfc(st_linestring(m)) lwgeom::st_startpoint(l) #> Geometry set for 1 feature #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: 0 ymin: 0 xmax: 0 ymax: 0 #> CRS: NA #> POINT (0 0) lwgeom::st_endpoint(l) #> Geometry set for 1 feature #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: 2 ymin: 4 xmax: 2 ymax: 4 #> CRS: NA #> POINT (2 4) l2 = st_sfc(st_linestring(m), st_linestring(m[3:1, ])) lwgeom::st_startpoint(l2) #> Geometry set for 2 features #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: 0 ymin: 0 xmax: 2 ymax: 4 #> CRS: NA #> POINT (0 0) #> POINT (2 4) lwgeom::st_endpoint(l2) #> Geometry set for 2 features #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: 0 ymin: 0 xmax: 2 ymax: 4 #> CRS: NA #> POINT (2 4) #> POINT (0 0)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_subdivide.html","id":null,"dir":"Reference","previous_headings":"","what":"Return a collection of geometries resulting by subdividing a geometry — st_subdivide","title":"Return a collection of geometries resulting by subdividing a geometry — st_subdivide","text":"Return collection geometries resulting subdividing geometry","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_subdivide.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return a collection of geometries resulting by subdividing a geometry — st_subdivide","text":"","code":"st_subdivide(x, max_vertices)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_subdivide.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return a collection of geometries resulting by subdividing a geometry — st_subdivide","text":"x object geometries subdivided max_vertices integer; maximum size subgeometries (least 8)","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_subdivide.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return a collection of geometries resulting by subdividing a geometry — st_subdivide","text":"object class x","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_subdivide.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return a collection of geometries resulting by subdividing a geometry — st_subdivide","text":"","code":"library(sf) demo(nc, ask = FALSE, echo = FALSE) x = st_subdivide(nc, 10) plot(x[1])"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_transform_proj.html","id":null,"dir":"Reference","previous_headings":"","what":"Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL) — st_transform_proj","title":"Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL) — st_transform_proj","text":"Transform convert coordinates simple features directly Proj.4 (bypassing GDAL)","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_transform_proj.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL) — st_transform_proj","text":"","code":"st_transform_proj(x, crs, ...) # S3 method for sfc st_transform_proj(x, crs, ...) # S3 method for sf st_transform_proj(x, crs, ...) # S3 method for sfg st_transform_proj(x, crs, ...)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_transform_proj.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL) — st_transform_proj","text":"x object class sf, sfc sfg crs character; target CRS, , case length 2 character vector, source target CRS ... ignored","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_transform_proj.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL) — st_transform_proj","text":"Transforms coordinates object new projection, using PROJ directly rather GDAL API used st_transform. crs single CRS, forms target CRS, case source CRS obtained st_crs(x). Since presumes source CRS accepted GDAL (always case), second option specify source target CRS two proj4strings argument crs. latter case, st_crs(x) ignored may well NA. st_transform_proj method sfg objects assumes CRS object available attribute name.","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_transform_proj.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL) — st_transform_proj","text":"","code":"library(sf) p1 = st_point(c(7,52)) p2 = st_point(c(-30,20)) sfc = st_sfc(p1, p2, crs = 4326) sfc #> Geometry set for 2 features #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -30 ymin: 20 xmax: 7 ymax: 52 #> Geodetic CRS: WGS 84 #> POINT (7 52) #> POINT (-30 20) st_transform_proj(sfc, \"+proj=wintri\") #> Geometry set for 2 features #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -3270597 ymin: 2238779 xmax: 665843 ymax: 5789966 #> Projected CRS: +proj=wintri #> POINT (665843 5789966) #> POINT (-3270597 2238779) library(sf) nc = st_read(system.file(\"shape/nc.shp\", package=\"sf\")) #> Reading layer `nc' from data source #> `/home/runner/work/_temp/Library/sf/shape/nc.shp' using driver `ESRI Shapefile' #> 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 st_transform_proj(nc[1,], \"+proj=wintri +over\") #> Simple feature collection with 1 feature and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -6776724 ymin: 4191803 xmax: -6736158 ymax: 4233249 #> Projected CRS: +proj=wintri +over #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> 1 0.114 1.442 1825 1825 Ashe 37009 37009 5 1091 1 10 #> BIR79 SID79 NWBIR79 geometry #> 1 1364 0 19 MULTIPOLYGON (((-6760629 41... st_transform_proj(structure(p1, proj4string = \"+init=epsg:4326\"), \"+init=epsg:3857\") #> Warning: GDAL Message 1: +init=epsg:XXXX syntax is deprecated. It might return a CRS with a non-EPSG compliant axis order. #> POINT (779236.4 6800125)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_wrap_x.html","id":null,"dir":"Reference","previous_headings":"","what":"Splits input geometries by a vertical line and moves components falling on one side of that line by a fixed amount — st_wrap_x","title":"Splits input geometries by a vertical line and moves components falling on one side of that line by a fixed amount — st_wrap_x","text":"Splits input geometries vertical line moves components falling one side line fixed amount","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_wrap_x.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Splits input geometries by a vertical line and moves components falling on one side of that line by a fixed amount — st_wrap_x","text":"","code":"st_wrap_x(x, wrap, move)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_wrap_x.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Splits input geometries by a vertical line and moves components falling on one side of that line by a fixed amount — st_wrap_x","text":"x object geometries split wrap x value split line move amount geometries falling left line translated right","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_wrap_x.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Splits input geometries by a vertical line and moves components falling on one side of that line by a fixed amount — st_wrap_x","text":"object class x","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_wrap_x.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Splits input geometries by a vertical line and moves components falling on one side of that line by a fixed amount — st_wrap_x","text":"","code":"library(sf) demo(nc, ask = FALSE, echo = FALSE) x = st_wrap_x(nc, -78, 10) plot(x[1])"},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-16","dir":"Changelog","previous_headings":"","what":"version 0.2-16","title":"version 0.2-16","text":"add st_geom_from_geohash(); #37","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-15","dir":"Changelog","previous_headings":"","what":"version 0.2-15","title":"version 0.2-15","text":"fix default argument digits st_astext()","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-14","dir":"Changelog","previous_headings":"","what":"version 0.2-14","title":"version 0.2-14","text":"CRAN release: 2024-02-21 st_perimeter() deprecated favor st_perimeter_lwgeom(), sf takes sf::st_perimeter().","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-13","dir":"Changelog","previous_headings":"","what":"version 0.2-13","title":"version 0.2-13","text":"CRAN release: 2023-05-22","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-11","dir":"Changelog","previous_headings":"","what":"version 0.2-11","title":"version 0.2-11","text":"CRAN release: 2023-01-14 replace sprintf() instances snprintf()","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-10","dir":"Changelog","previous_headings":"","what":"version 0.2-10","title":"version 0.2-10","text":"CRAN release: 2022-11-19 fix -Wstrict-prototypes warnings","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-9","dir":"Changelog","previous_headings":"","what":"version 0.2-9","title":"version 0.2-9","text":"CRAN release: 2022-10-01 fix formatting issues long long int","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-8","dir":"Changelog","previous_headings":"","what":"version 0.2-8","title":"version 0.2-8","text":"CRAN release: 2021-10-06 remove PROBLEM … ERROR constructs C code","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-5","dir":"Changelog","previous_headings":"","what":"version 0.2-5","title":"version 0.2-5","text":"CRAN release: 2020-06-12 GEOS requirement lowered 3.5.0, also seems work; #59.","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-4","dir":"Changelog","previous_headings":"","what":"version 0.2-4","title":"version 0.2-4","text":"CRAN release: 2020-05-20 require sf >= 0.9-3, use C API PROJ path setting (work CRAN windows binaries) update new GEOS (3.8.0) PROJ (6.3.1) versions CRAN windows binary builds require GEOS 3.6.0 (required PostGIS 3.0.0), add check configure","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-3","dir":"Changelog","previous_headings":"","what":"version 0.2-3","title":"version 0.2-3","text":"CRAN release: 2020-04-12 fix configure script work ubuntu/bionic PROJ 4.9.3; #28 fix configure script work PROJ 5.x versions","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-2","dir":"Changelog","previous_headings":"","what":"version 0.2-2","title":"version 0.2-2","text":"CRAN release: 2020-04-11 adjust sf >= 0.9-0 new crs representation use st_make_valid() generic package sf; https://github.com/r-spatial/sf/issues/1300","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-1","dir":"Changelog","previous_headings":"","what":"version 0.2-1","title":"version 0.2-1","text":"CRAN release: 2020-01-31 fix PROJ 5.x installation issue (proj.h, shouldn’t use )","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-0","dir":"Changelog","previous_headings":"","what":"version 0.2-0","title":"version 0.2-0","text":"CRAN release: 2020-01-31 export lwgeom_make_valid(), gradually move st_make_valid() lwgeom sf; https://github.com/r-spatial/sf/issues/989 constrain argument crs st_transform_proj() take one two character strings update POSTGIS 3.0.0 liblwgeom version update modern PROJ, use proj.h available","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-01-5","dir":"Changelog","previous_headings":"","what":"version 0.1-5","title":"version 0.1-5","text":"CRAN release: 2018-12-07 check user interrupts st_geod_distance(), #29 Dan Baston add st_astext() fast WKT writing, #25 Etienne Racine add st_is_polygon_cw(), #21 Andy Teucher @ateucher; add Andy Teucher contributors add st_perimeter() st_perimeter_2d() functions compute length measurement boundary surface. allow st_transform_proj() take two proj4 strings crs, c(input_p4s, output_p4s), ignoring CRS x","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-01-4","dir":"Changelog","previous_headings":"","what":"version 0.1-4","title":"version 0.1-4","text":"CRAN release: 2018-01-28 tries fix CRAN error r-release-osx (datum files missing sf; removed test)","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-01-3","dir":"Changelog","previous_headings":"","what":"version 0.1-3","title":"version 0.1-3","text":"CRAN release: 2018-01-21 add st_geod_covered_by() binary geometry predicate","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-01-2","dir":"Changelog","previous_headings":"","what":"version 0.1-2","title":"version 0.1-2","text":"CRAN release: 2017-12-19 try fix OSX compile CRAN, tuning configure.ac","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-01-1","dir":"Changelog","previous_headings":"","what":"version 0.1-1","title":"version 0.1-1","text":"CRAN release: 2017-12-17 add st_length() attempt fix Solaris OSX report proj.4 GEOS versions startup, lwgeom_extSoftwareVersions; #10 add minimum bounding circle, @rundel; #7 add st_subdivide(), see https://github.com/r-spatial/sf/issues/597","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-01-0","dir":"Changelog","previous_headings":"","what":"version 0.1-0","title":"version 0.1-0","text":"CRAN release: 2017-11-16 first CRAN submission","code":""}] +[{"path":"https://r-spatial.github.io/lwgeom/CONDUCT.html","id":null,"dir":"","previous_headings":"","what":"Contributor Code of Conduct","title":"Contributor Code of Conduct","text":"contributors maintainers project, pledge respect people contribute reporting issues, posting feature requests, updating documentation, submitting pull requests patches, activities. committed making participation project harassment-free experience everyone, regardless level experience, gender, gender identity expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion. Examples unacceptable behavior participants include use sexual language imagery, derogatory comments personal attacks, trolling, public private harassment, insults, unprofessional conduct. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct. Project maintainers follow Code Conduct may removed project team. Instances abusive, harassing, otherwise unacceptable behavior may reported opening issue contacting one project maintainers. Code Conduct adapted Contributor Covenant (http:contributor-covenant.org), version 1.0.0, available http://contributor-covenant.org/version/1/0/0/","code":""},{"path":"https://r-spatial.github.io/lwgeom/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Edzer Pebesma. Author, maintainer. Colin Rundel. Contributor. Andy Teucher. Contributor. liblwgeom developers. Copyright holder.","code":""},{"path":"https://r-spatial.github.io/lwgeom/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Pebesma E (2024). lwgeom: Bindings Selected 'liblwgeom' Functions Simple Features. R package version 0.2-15, https://github.com/r-spatial/lwgeom, https://r-spatial.github.io/lwgeom/.","code":"@Manual{, title = {lwgeom: Bindings to Selected 'liblwgeom' Functions for Simple Features}, author = {Edzer Pebesma}, year = {2024}, note = {R package version 0.2-15, https://github.com/r-spatial/lwgeom}, url = {https://r-spatial.github.io/lwgeom/}, }"},{"path":"https://r-spatial.github.io/lwgeom/index.html","id":"lwgeom","dir":"","previous_headings":"","what":"Bindings to Selected liblwgeom Functions for Simple Features","title":"Bindings to Selected liblwgeom Functions for Simple Features","text":"R bindings liblwgeom library package provides functions use liblwgeom, including st_geohash(), st_minimum_bounding_circle(), st_split(), st_subdivide(), st_transform_proj() (transform proj, omitting GDAL) st_as_sfc.TWKB() (creates sfc tiny wkb), well geodetic (spherical/ellipsoidal) geometry functions st_geod_area(), st_geod_length(), st_geod_distance(), st_geod_covers(), st_geod_azimuth(), st_geod_segmentize(). previously offered st_make_valid() now generic package sf (sf::st_make_valid()).","code":""},{"path":"https://r-spatial.github.io/lwgeom/index.html","id":"installing","dir":"","previous_headings":"","what":"Installing","title":"Bindings to Selected liblwgeom Functions for Simple Features","text":"lwgeom depends sf, installed first. package uses liblwgeom library, compiles shipped (modified) version liblwgeom. links GEOS PROJ libraries. install source, enough installed sf source; resources package (PROJ, GEOS) reused.","code":""},{"path":"https://r-spatial.github.io/lwgeom/index.html","id":"lwgeom-source-now-included","dir":"","previous_headings":"","what":"lwgeom source now included","title":"Bindings to Selected liblwgeom Functions for Simple Features","text":"Previous version 0.1-6, lwgeom also try link system library liblwgeom; 0.1-6 shipped version used.","code":""},{"path":"https://r-spatial.github.io/lwgeom/index.html","id":"contributing","dir":"","previous_headings":"","what":"Contributing","title":"Bindings to Selected liblwgeom Functions for Simple Features","text":"Contributions sorts welcome, issues pull requests preferred ways sharing . contributing pull requests, please adhere package style (package code use = rather <-; don’t change indentation; tab stops 4 spaces preferred) project released Contributor Code Conduct. participating project agree abide terms.","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/bounding_circle.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate the minimum bounding circle — bounding_circle","title":"Generate the minimum bounding circle — bounding_circle","text":"Generate minimum bounding circle","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/bounding_circle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate the minimum bounding circle — bounding_circle","text":"","code":"st_minimum_bounding_circle(x, nQuadSegs = 30)"},{"path":"https://r-spatial.github.io/lwgeom/reference/bounding_circle.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate the minimum bounding circle — bounding_circle","text":"x object class sfg, sfg sf nQuadSegs number segments per quadrant (passed st_buffer)","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/bounding_circle.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate the minimum bounding circle — bounding_circle","text":"Object class x","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/bounding_circle.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate the minimum bounding circle — bounding_circle","text":"st_minimum_bounding_circle uses lwgeom_calculate_mbc method also used PostGIS command ST_MinimumBoundingCircle.","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/bounding_circle.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate the minimum bounding circle — bounding_circle","text":"","code":"library(sf) #> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE x = st_multipoint(matrix(c(0,1,0,1),2,2)) y = st_multipoint(matrix(c(0,0,1,0,1,1),3,2)) mbcx = st_minimum_bounding_circle(x) mbcy = st_minimum_bounding_circle(y) if (.Platform$OS.type != \"windows\") { plot(mbcx, axes=TRUE); plot(x, add=TRUE) plot(mbcy, axes=TRUE); plot(y, add=TRUE) } nc = st_read(system.file(\"gpkg/nc.gpkg\", package=\"sf\")) #> Reading layer `nc.gpkg' from data source #> `/home/runner/work/_temp/Library/sf/gpkg/nc.gpkg' using driver `GPKG' #> 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 state = st_union(st_geometry(nc)) if (.Platform$OS.type != \"windows\") { plot(st_minimum_bounding_circle(state), asp=1) plot(state, add=TRUE) }"},{"path":"https://r-spatial.github.io/lwgeom/reference/geod.html","id":null,"dir":"Reference","previous_headings":"","what":"liblwgeom geodetic functions — geod","title":"liblwgeom geodetic functions — geod","text":"liblwgeom geodetic functions length, area, segmentizing, covers","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/geod.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"liblwgeom geodetic functions — geod","text":"","code":"st_geod_area(x) st_geod_length(x) st_geod_segmentize(x, max_seg_length) st_geod_covers(x, y, sparse = TRUE) st_geod_covered_by(x, y, sparse = TRUE) st_geod_distance(x, y, tolerance = 0, sparse = FALSE)"},{"path":"https://r-spatial.github.io/lwgeom/reference/geod.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"liblwgeom geodetic functions — geod","text":"x object class sf, sfc sfg max_seg_length segment length degree, radians, length unit (e.g., m) y object class sf, sfc sfg sparse logical; TRUE, return sparse matrix (object class sgbp), otherwise, return dense logical matrix. tolerance double length units value: positive, first distance less tolerance returned, rather true distance","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/geod.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"liblwgeom geodetic functions — geod","text":"st_area give error message area spans equator lwgeom linked proj.4 version older 4.9.0 (see lwgeom_extSoftVersion) longitude coordinates returned rescaled [-180,180)","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/geod.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"liblwgeom geodetic functions — geod","text":"function used st_distance, use directly","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/geod.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"liblwgeom geodetic functions — geod","text":"","code":"library(sf) nc = st_read(system.file(\"gpkg/nc.gpkg\", package=\"sf\")) #> Reading layer `nc.gpkg' from data source #> `/home/runner/work/_temp/Library/sf/gpkg/nc.gpkg' using driver `GPKG' #> 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 st_geod_area(nc[1:3,]) #> Units: [m^2] #> [1] 1137388604 611077263 1423489919 # st_area(nc[1:3,]) l = st_sfc(st_linestring(rbind(c(7,52), c(8,53))), crs = 4326) st_geod_length(l) #> 130359.3 [m] library(units) #> udunits database from /usr/share/xml/udunits/udunits2.xml pol = st_polygon(list(rbind(c(0,0), c(0,60), c(60,60), c(0,0)))) x = st_sfc(pol, crs = 4326) seg = st_geod_segmentize(x[1], set_units(10, km)) plot(seg, graticule = TRUE, axes = TRUE) pole = st_polygon(list(rbind(c(0,80), c(120,80), c(240,80), c(0,80)))) pt = st_point(c(0,90)) x = st_sfc(pole, pt, crs = 4326) st_geod_covers(x[c(1,1,1)], x[c(2,2,2,2)]) #> Sparse geometry binary predicate list of length 3, where the predicate #> was `covers' #> 1: 1, 2, 3, 4 #> 2: 1, 2, 3, 4 #> 3: 1, 2, 3, 4 pole = st_polygon(list(rbind(c(0,80), c(120,80), c(240,80), c(0,80)))) pt = st_point(c(30,70)) x = st_sfc(pole, pt, crs = 4326) st_geod_distance(x, x) #> Units: [m] #> [,1] [,2] #> [1,] 0 1378923 #> [2,] 1378923 0"},{"path":"https://r-spatial.github.io/lwgeom/reference/lwgeom_extSoftVersion.html","id":null,"dir":"Reference","previous_headings":"","what":"Provide the external dependencies versions of the libraries linked to sf — lwgeom_extSoftVersion","title":"Provide the external dependencies versions of the libraries linked to sf — lwgeom_extSoftVersion","text":"Provide external dependencies versions libraries linked sf","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/lwgeom_extSoftVersion.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Provide the external dependencies versions of the libraries linked to sf — lwgeom_extSoftVersion","text":"","code":"lwgeom_extSoftVersion()"},{"path":"https://r-spatial.github.io/lwgeom/reference/lwgeom_make_valid.html","id":null,"dir":"Reference","previous_headings":"","what":"Make an invalid geometry valid — lwgeom_make_valid","title":"Make an invalid geometry valid — lwgeom_make_valid","text":"Make invalid geometry valid","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/lwgeom_make_valid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make an invalid geometry valid — lwgeom_make_valid","text":"","code":"lwgeom_make_valid(x)"},{"path":"https://r-spatial.github.io/lwgeom/reference/lwgeom_make_valid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make an invalid geometry valid — lwgeom_make_valid","text":"x object class sfc","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/perimeter.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute perimeter from polygons or other geometries — perimeter","title":"Compute perimeter from polygons or other geometries — perimeter","text":"Compute perimeter polygons geometries","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/perimeter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute perimeter from polygons or other geometries — perimeter","text":"","code":"st_perimeter_lwgeom(x) st_perimeter_2d(x)"},{"path":"https://r-spatial.github.io/lwgeom/reference/perimeter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute perimeter from polygons or other geometries — perimeter","text":"x object class sf, sfc sfg","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/perimeter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute perimeter from polygons or other geometries — perimeter","text":"numerical vector perimeter feature (geometry), unit measure possible","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_as_sfc.TWKB.html","id":null,"dir":"Reference","previous_headings":"","what":"create sfc object from tiny well-known binary (twkb) — st_as_sfc.TWKB","title":"create sfc object from tiny well-known binary (twkb) — st_as_sfc.TWKB","text":"create sfc object tiny well-known binary (twkb)","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_as_sfc.TWKB.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"create sfc object from tiny well-known binary (twkb) — st_as_sfc.TWKB","text":"","code":"# S3 method for TWKB st_as_sfc(x, ...)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_as_sfc.TWKB.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"create sfc object from tiny well-known binary (twkb) — st_as_sfc.TWKB","text":"x list raw vectors, class TWKB ... ignored","code":""},{"path":[]},{"path":"https://r-spatial.github.io/lwgeom/reference/st_as_sfc.TWKB.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"create sfc object from tiny well-known binary (twkb) — st_as_sfc.TWKB","text":"","code":"l = structure(list(as.raw(c(0x02, 0x00, 0x02, 0x02, 0x02, 0x08, 0x08))), class = \"TWKB\") library(sf) # load generic st_as_sfc(l) #> Geometry set for 1 feature #> Geometry type: LINESTRING #> Dimension: XY #> Bounding box: xmin: 1 ymin: 1 xmax: 5 ymax: 5 #> CRS: NA #> LINESTRING (1 1, 5 5)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_astext.html","id":null,"dir":"Reference","previous_headings":"","what":"Return Well-known Text representation of simple feature geometry — st_astext","title":"Return Well-known Text representation of simple feature geometry — st_astext","text":"Return Well-known Text representation simple feature geometry coordinate reference system","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_astext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return Well-known Text representation of simple feature geometry — st_astext","text":"","code":"st_astext(x, digits = getOption(\"digits\"), ..., EWKT = FALSE) st_asewkt(x, digits = options(\"digits\"))"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_astext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return Well-known Text representation of simple feature geometry — st_astext","text":"x object class sfg, sfc, sf digits integer; number decimal digits print ... ignored EWKT logical; use PostGIS Enhanced WKT (includes srid)","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_astext.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Return Well-known Text representation of simple feature geometry — st_astext","text":"returned WKT representation simple feature geometry conforms simple features access specification extensions (EWKT = TRUE), known EWKT, supported PostGIS simple features implementations addition SRID WKT string. st_asewkt() returns Well-Known Text (WKT) representation geometry SRID meta data.","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_astext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return Well-known Text representation of simple feature geometry — st_astext","text":"","code":"library(sf) pt <- st_sfc(st_point(c(1.0002,2.3030303)), crs = 4326) st_astext(pt, 3) #> [1] \"POINT(1 2.303)\" st_asewkt(pt, 3) #> [1] \"SRID=4326;POINT(1 2.303)\""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_force_polygon_cw.html","id":null,"dir":"Reference","previous_headings":"","what":"Force a POLYGON or MULTIPOLYGON to be clockwise — st_force_polygon_cw","title":"Force a POLYGON or MULTIPOLYGON to be clockwise — st_force_polygon_cw","text":"Check POLYGON MULTIPOLYGON clockwise, make . According 'Right-hand-rule', outer rings clockwise, inner holes counter-clockwise","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_force_polygon_cw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Force a POLYGON or MULTIPOLYGON to be clockwise — st_force_polygon_cw","text":"","code":"st_force_polygon_cw(x)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_force_polygon_cw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Force a POLYGON or MULTIPOLYGON to be clockwise — st_force_polygon_cw","text":"x object polygon geometries","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_force_polygon_cw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Force a POLYGON or MULTIPOLYGON to be clockwise — st_force_polygon_cw","text":"object class x","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_force_polygon_cw.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Force a POLYGON or MULTIPOLYGON to be clockwise — st_force_polygon_cw","text":"","code":"library(sf) polys <- st_sf(cw = c(FALSE, TRUE), st_as_sfc(c('POLYGON ((0 0, 1 0, 1 1, 0 0))', 'POLYGON ((1 1, 2 2, 2 1, 1 1))'))) st_force_polygon_cw(polys) #> Simple feature collection with 2 features and 1 field #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: 0 ymin: 0 xmax: 2 ymax: 2 #> CRS: NA #> cw #> 1 FALSE #> 2 TRUE #> st_as_sfc.c..POLYGON...0.0..1.0..1.1..0.0......POLYGON...1.1..2.2..2.1..1.1..... #> 1 POLYGON ((0 0, 1 1, 1 0, 0 0)) #> 2 POLYGON ((1 1, 2 2, 2 1, 1 1)) st_force_polygon_cw(st_geometry(polys)) #> Geometry set for 2 features #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: 0 ymin: 0 xmax: 2 ymax: 2 #> CRS: NA #> POLYGON ((0 0, 1 1, 1 0, 0 0)) #> POLYGON ((1 1, 2 2, 2 1, 1 1)) st_force_polygon_cw(st_geometry(polys)[[1]]) #> POLYGON ((0 0, 1 1, 1 0, 0 0))"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geod_azimuth.html","id":null,"dir":"Reference","previous_headings":"","what":"compute azimuth between sequence of points — st_geod_azimuth","title":"compute azimuth between sequence of points — st_geod_azimuth","text":"compute azimuth sequence points","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geod_azimuth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"compute azimuth between sequence of points — st_geod_azimuth","text":"","code":"st_geod_azimuth(x)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geod_azimuth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"compute azimuth between sequence of points — st_geod_azimuth","text":"x object class sf, sfc sfg","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geod_azimuth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"compute azimuth between sequence of points — st_geod_azimuth","text":"","code":"library(sf) p = st_sfc(st_point(c(7,52)), st_point(c(8,53)), crs = 4326) st_geod_azimuth(p) #> 0.5410385 [rad]"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geohash.html","id":null,"dir":"Reference","previous_headings":"","what":"compute geohash from (average) coordinates — st_geohash","title":"compute geohash from (average) coordinates — st_geohash","text":"compute geohash (average) coordinates","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geohash.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"compute geohash from (average) coordinates — st_geohash","text":"","code":"st_geohash(x, precision = 0) st_geom_from_geohash(hash, precision = -1, crs = st_crs(\"OGC:CRS84\"))"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geohash.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"compute geohash from (average) coordinates — st_geohash","text":"x object class sf, sfc sfg precision integer; precision (length) geohash returned. liblwgeom source: ``precision non-positive, precision based bounds feature. Big features loose precision. Small features tight precision.'' hash character vector geohashes crs object class `crs`","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geohash.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"compute geohash from (average) coordinates — st_geohash","text":"character vector geohashes","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geohash.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"compute geohash from (average) coordinates — st_geohash","text":"see http://geohash.org/ https://en.wikipedia.org/wiki/Geohash.","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_geohash.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"compute geohash from (average) coordinates — st_geohash","text":"","code":"library(sf) lwgeom::st_geohash(st_sfc(st_point(c(1.5,3.5)), st_point(c(0,90))), 2) #> [1] \"s0\" \"up\" lwgeom::st_geohash(st_sfc(st_point(c(1.5,3.5)), st_point(c(0,90))), 10) #> [1] \"s095fjhkbx\" \"upbpbpbpbp\" o = options(digits = 20) st_geom_from_geohash(c('9qqj7nmxncgyy4d0dbxqz0', 'u1hzz631zyd63zwsd7zt')) #> Geometry set for 2 features #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -115.172816 ymin: 36.114646 xmax: 7.00000000000014 ymax: 52.0000000000001 #> Geodetic CRS: WGS 84 #> POLYGON ((-115.17281600000001163 36.11464599999... #> POLYGON ((6.9999999999998152589 51.999999999999... st_geom_from_geohash('9qqj7nmxncgyy4d0dbxqz0', 4) #> Geometry set for 1 feature #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -115.3125 ymin: 36.03515625 xmax: -114.9609375 ymax: 36.2109375 #> Geodetic CRS: WGS 84 #> POLYGON ((-115.3125 36.03515625, -114.9609375 3... st_geom_from_geohash('9qqj7nmxncgyy4d0dbxqz0', 10) #> Geometry set for 1 feature #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -115.17282128334 ymin: 36.1146408319473 xmax: -115.172810554504 ymax: 36.1146461963654 #> Geodetic CRS: WGS 84 #> POLYGON ((-115.1728212833404541 36.114640831947... options(o)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_is_polygon_cw.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a POLYGON or MULTIPOLYGON is clockwise — st_is_polygon_cw","title":"Check if a POLYGON or MULTIPOLYGON is clockwise — st_is_polygon_cw","text":"Check POLYGON MULTIPOLYGON clockwise. According 'Right-hand-rule', outer rings clockwise, inner holes counter-clockwise","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_is_polygon_cw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a POLYGON or MULTIPOLYGON is clockwise — st_is_polygon_cw","text":"","code":"st_is_polygon_cw(x)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_is_polygon_cw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a POLYGON or MULTIPOLYGON is clockwise — st_is_polygon_cw","text":"x object polygon geometries","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_is_polygon_cw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a POLYGON or MULTIPOLYGON is clockwise — st_is_polygon_cw","text":"logical length number features `x`","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_is_polygon_cw.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check if a POLYGON or MULTIPOLYGON is clockwise — st_is_polygon_cw","text":"","code":"library(sf) polys <- st_sf(cw = c(FALSE, TRUE), st_as_sfc(c('POLYGON ((0 0, 1 0, 1 1, 0 0))', 'POLYGON ((1 1, 2 2, 2 1, 1 1))'))) st_is_polygon_cw(polys) #> [1] FALSE TRUE st_is_polygon_cw(st_geometry(polys)) #> [1] FALSE TRUE st_is_polygon_cw(st_geometry(polys)[[1]]) #> [1] FALSE"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_linesubstring.html","id":null,"dir":"Reference","previous_headings":"","what":"get substring from linestring — st_linesubstring","title":"get substring from linestring — st_linesubstring","text":"get substring linestring","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_linesubstring.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get substring from linestring — st_linesubstring","text":"","code":"st_linesubstring(x, from, to, tolerance, ...)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_linesubstring.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get substring from linestring — st_linesubstring","text":"x object class sfc, sf sfg relative distance origin ([0,1]) relative distance origin ([0,1]) tolerance tolerance parameter, snap line node node ... ignored","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_linesubstring.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get substring from linestring — st_linesubstring","text":"object class sfc","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_linesubstring.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get substring from linestring — st_linesubstring","text":"","code":"library(sf) lines = st_sfc(st_linestring(rbind(c(0,0), c(1,2), c(2,0))), crs = 4326) spl = st_linesubstring(lines, 0.2, 0.8) # should warn #> Warning: st_linesubstring does not follow a geodesic; you may want to use st_geod_segmentize first plot(st_geometry(lines), col = 'red', lwd = 3) plot(spl, col = 'black', lwd = 3, add = TRUE) st_linesubstring(lines, 0.49999, 0.8) # three points #> Warning: st_linesubstring does not follow a geodesic; you may want to use st_geod_segmentize first #> Geometry set for 1 feature #> Geometry type: LINESTRING #> Dimension: XY #> Bounding box: xmin: 0.99998 ymin: 0.8 xmax: 1.6 ymax: 2 #> Geodetic CRS: WGS 84 #> LINESTRING (0.99998 1.99996, 1 2, 1.6 0.8) st_linesubstring(lines, 0.49999, 0.8, 0.001) # two points: snap start to second node #> Warning: st_linesubstring does not follow a geodesic; you may want to use st_geod_segmentize first #> Geometry set for 1 feature #> Geometry type: LINESTRING #> Dimension: XY #> Bounding box: xmin: 1 ymin: 0.8 xmax: 1.6 ymax: 2 #> Geodetic CRS: WGS 84 #> LINESTRING (1 2, 1.6 0.8)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_snap_to_grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Snap geometries to a grid — st_snap_to_grid","title":"Snap geometries to a grid — st_snap_to_grid","text":"Snap geometries grid","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_snap_to_grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Snap geometries to a grid — st_snap_to_grid","text":"","code":"st_snap_to_grid(x, size, origin)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_snap_to_grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Snap geometries to a grid — st_snap_to_grid","text":"x object geometries snapped size numeric (length) units object; grid cell size x-, y- (possibly z- m-) directions origin numeric; origin grid","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_snap_to_grid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Snap geometries to a grid — st_snap_to_grid","text":"object class x","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_snap_to_grid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Snap geometries to a grid — st_snap_to_grid","text":"","code":"# obtain data library(sf) x = st_read(system.file(\"gpkg/nc.gpkg\", package=\"sf\"), quiet = TRUE)[1, ] %>% st_geometry %>% st_transform(3395) # snap to a grid of 5000 m err = try(y <- st_snap_to_grid(x, 5000)) # plot data for visual comparison if (!inherits(err, \"try-error\")) { opar = par(mfrow = c(1, 2)) plot(x, main = \"orginal data\") plot(y, main = \"snapped to 5000 m\") par(opar) }"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_split.html","id":null,"dir":"Reference","previous_headings":"","what":"Return a collection of geometries resulting by splitting a geometry — st_split","title":"Return a collection of geometries resulting by splitting a geometry — st_split","text":"Return collection geometries resulting splitting geometry","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_split.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return a collection of geometries resulting by splitting a geometry — st_split","text":"","code":"st_split(x, y)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_split.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return a collection of geometries resulting by splitting a geometry — st_split","text":"x object geometries splitted y object split (blade); y contains one feature geometry, geometries st_combine 'd","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_split.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return a collection of geometries resulting by splitting a geometry — st_split","text":"object class x","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_split.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return a collection of geometries resulting by splitting a geometry — st_split","text":"","code":"library(sf) l = st_as_sfc('MULTILINESTRING((10 10, 190 190), (15 15, 30 30, 100 90))') pt = st_sfc(st_point(c(30,30))) st_split(l, pt) #> Geometry set for 1 feature #> Geometry type: GEOMETRYCOLLECTION #> Dimension: XY #> Bounding box: xmin: 10 ymin: 10 xmax: 190 ymax: 190 #> CRS: NA #> GEOMETRYCOLLECTION (LINESTRING (10 10, 30 30), ..."},{"path":"https://r-spatial.github.io/lwgeom/reference/st_startpoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Return the start and end points from lines — st_startpoint","title":"Return the start and end points from lines — st_startpoint","text":"Return start end points lines","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_startpoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return the start and end points from lines — st_startpoint","text":"","code":"st_startpoint(x) st_endpoint(x)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_startpoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return the start and end points from lines — st_startpoint","text":"x line class sf, sfc sfg","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_startpoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return the start and end points from lines — st_startpoint","text":"sf object representing start end points","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_startpoint.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Return the start and end points from lines — st_startpoint","text":"see https://postgis.net/docs/ST_StartPoint.html https://postgis.net/docs/ST_EndPoint.html.","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_startpoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return the start and end points from lines — st_startpoint","text":"","code":"library(sf) m = matrix(c(0, 1, 2, 0, 1, 4), ncol = 2) l = st_sfc(st_linestring(m)) lwgeom::st_startpoint(l) #> Geometry set for 1 feature #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: 0 ymin: 0 xmax: 0 ymax: 0 #> CRS: NA #> POINT (0 0) lwgeom::st_endpoint(l) #> Geometry set for 1 feature #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: 2 ymin: 4 xmax: 2 ymax: 4 #> CRS: NA #> POINT (2 4) l2 = st_sfc(st_linestring(m), st_linestring(m[3:1, ])) lwgeom::st_startpoint(l2) #> Geometry set for 2 features #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: 0 ymin: 0 xmax: 2 ymax: 4 #> CRS: NA #> POINT (0 0) #> POINT (2 4) lwgeom::st_endpoint(l2) #> Geometry set for 2 features #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: 0 ymin: 0 xmax: 2 ymax: 4 #> CRS: NA #> POINT (2 4) #> POINT (0 0)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_subdivide.html","id":null,"dir":"Reference","previous_headings":"","what":"Return a collection of geometries resulting by subdividing a geometry — st_subdivide","title":"Return a collection of geometries resulting by subdividing a geometry — st_subdivide","text":"Return collection geometries resulting subdividing geometry","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_subdivide.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return a collection of geometries resulting by subdividing a geometry — st_subdivide","text":"","code":"st_subdivide(x, max_vertices)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_subdivide.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return a collection of geometries resulting by subdividing a geometry — st_subdivide","text":"x object geometries subdivided max_vertices integer; maximum size subgeometries (least 8)","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_subdivide.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return a collection of geometries resulting by subdividing a geometry — st_subdivide","text":"object class x","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_subdivide.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return a collection of geometries resulting by subdividing a geometry — st_subdivide","text":"","code":"library(sf) demo(nc, ask = FALSE, echo = FALSE) x = st_subdivide(nc, 10) plot(x[1])"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_transform_proj.html","id":null,"dir":"Reference","previous_headings":"","what":"Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL) — st_transform_proj","title":"Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL) — st_transform_proj","text":"Transform convert coordinates simple features directly Proj.4 (bypassing GDAL)","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_transform_proj.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL) — st_transform_proj","text":"","code":"st_transform_proj(x, crs, ...) # S3 method for sfc st_transform_proj(x, crs, ...) # S3 method for sf st_transform_proj(x, crs, ...) # S3 method for sfg st_transform_proj(x, crs, ...)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_transform_proj.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL) — st_transform_proj","text":"x object class sf, sfc sfg crs character; target CRS, , case length 2 character vector, source target CRS ... ignored","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_transform_proj.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL) — st_transform_proj","text":"Transforms coordinates object new projection, using PROJ directly rather GDAL API used st_transform. crs single CRS, forms target CRS, case source CRS obtained st_crs(x). Since presumes source CRS accepted GDAL (always case), second option specify source target CRS two proj4strings argument crs. latter case, st_crs(x) ignored may well NA. st_transform_proj method sfg objects assumes CRS object available attribute name.","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_transform_proj.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL) — st_transform_proj","text":"","code":"library(sf) p1 = st_point(c(7,52)) p2 = st_point(c(-30,20)) sfc = st_sfc(p1, p2, crs = 4326) sfc #> Geometry set for 2 features #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -30 ymin: 20 xmax: 7 ymax: 52 #> Geodetic CRS: WGS 84 #> POINT (7 52) #> POINT (-30 20) st_transform_proj(sfc, \"+proj=wintri\") #> Geometry set for 2 features #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: -3270597 ymin: 2238779 xmax: 665843 ymax: 5789966 #> Projected CRS: +proj=wintri #> POINT (665843 5789966) #> POINT (-3270597 2238779) library(sf) nc = st_read(system.file(\"shape/nc.shp\", package=\"sf\")) #> Reading layer `nc' from data source #> `/home/runner/work/_temp/Library/sf/shape/nc.shp' using driver `ESRI Shapefile' #> 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 st_transform_proj(nc[1,], \"+proj=wintri +over\") #> Simple feature collection with 1 feature and 14 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: -6776724 ymin: 4191803 xmax: -6736158 ymax: 4233249 #> Projected CRS: +proj=wintri +over #> AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74 NWBIR74 #> 1 0.114 1.442 1825 1825 Ashe 37009 37009 5 1091 1 10 #> BIR79 SID79 NWBIR79 geometry #> 1 1364 0 19 MULTIPOLYGON (((-6760629 41... st_transform_proj(structure(p1, proj4string = \"+init=epsg:4326\"), \"+init=epsg:3857\") #> Warning: GDAL Message 1: +init=epsg:XXXX syntax is deprecated. It might return a CRS with a non-EPSG compliant axis order. #> POINT (779236.4 6800125)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_wrap_x.html","id":null,"dir":"Reference","previous_headings":"","what":"Splits input geometries by a vertical line and moves components falling on one side of that line by a fixed amount — st_wrap_x","title":"Splits input geometries by a vertical line and moves components falling on one side of that line by a fixed amount — st_wrap_x","text":"Splits input geometries vertical line moves components falling one side line fixed amount","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_wrap_x.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Splits input geometries by a vertical line and moves components falling on one side of that line by a fixed amount — st_wrap_x","text":"","code":"st_wrap_x(x, wrap, move)"},{"path":"https://r-spatial.github.io/lwgeom/reference/st_wrap_x.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Splits input geometries by a vertical line and moves components falling on one side of that line by a fixed amount — st_wrap_x","text":"x object geometries split wrap x value split line move amount geometries falling left line translated right","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_wrap_x.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Splits input geometries by a vertical line and moves components falling on one side of that line by a fixed amount — st_wrap_x","text":"object class x","code":""},{"path":"https://r-spatial.github.io/lwgeom/reference/st_wrap_x.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Splits input geometries by a vertical line and moves components falling on one side of that line by a fixed amount — st_wrap_x","text":"","code":"library(sf) demo(nc, ask = FALSE, echo = FALSE) x = st_wrap_x(nc, -78, 10) plot(x[1])"},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-15","dir":"Changelog","previous_headings":"","what":"version 0.2-15","title":"version 0.2-15","text":"add st_geom_from_geohash(); #37 fix default argument digits st_astext()","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-14","dir":"Changelog","previous_headings":"","what":"version 0.2-14","title":"version 0.2-14","text":"CRAN release: 2024-02-21 st_perimeter() deprecated favor st_perimeter_lwgeom(), sf takes sf::st_perimeter().","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-13","dir":"Changelog","previous_headings":"","what":"version 0.2-13","title":"version 0.2-13","text":"CRAN release: 2023-05-22","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-11","dir":"Changelog","previous_headings":"","what":"version 0.2-11","title":"version 0.2-11","text":"CRAN release: 2023-01-14 replace sprintf() instances snprintf()","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-10","dir":"Changelog","previous_headings":"","what":"version 0.2-10","title":"version 0.2-10","text":"CRAN release: 2022-11-19 fix -Wstrict-prototypes warnings","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-9","dir":"Changelog","previous_headings":"","what":"version 0.2-9","title":"version 0.2-9","text":"CRAN release: 2022-10-01 fix formatting issues long long int","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-8","dir":"Changelog","previous_headings":"","what":"version 0.2-8","title":"version 0.2-8","text":"CRAN release: 2021-10-06 remove PROBLEM … ERROR constructs C code","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-5","dir":"Changelog","previous_headings":"","what":"version 0.2-5","title":"version 0.2-5","text":"CRAN release: 2020-06-12 GEOS requirement lowered 3.5.0, also seems work; #59.","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-4","dir":"Changelog","previous_headings":"","what":"version 0.2-4","title":"version 0.2-4","text":"CRAN release: 2020-05-20 require sf >= 0.9-3, use C API PROJ path setting (work CRAN windows binaries) update new GEOS (3.8.0) PROJ (6.3.1) versions CRAN windows binary builds require GEOS 3.6.0 (required PostGIS 3.0.0), add check configure","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-3","dir":"Changelog","previous_headings":"","what":"version 0.2-3","title":"version 0.2-3","text":"CRAN release: 2020-04-12 fix configure script work ubuntu/bionic PROJ 4.9.3; #28 fix configure script work PROJ 5.x versions","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-2","dir":"Changelog","previous_headings":"","what":"version 0.2-2","title":"version 0.2-2","text":"CRAN release: 2020-04-11 adjust sf >= 0.9-0 new crs representation use st_make_valid() generic package sf; https://github.com/r-spatial/sf/issues/1300","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-1","dir":"Changelog","previous_headings":"","what":"version 0.2-1","title":"version 0.2-1","text":"CRAN release: 2020-01-31 fix PROJ 5.x installation issue (proj.h, shouldn’t use )","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-02-0","dir":"Changelog","previous_headings":"","what":"version 0.2-0","title":"version 0.2-0","text":"CRAN release: 2020-01-31 export lwgeom_make_valid(), gradually move st_make_valid() lwgeom sf; https://github.com/r-spatial/sf/issues/989 constrain argument crs st_transform_proj() take one two character strings update POSTGIS 3.0.0 liblwgeom version update modern PROJ, use proj.h available","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-01-5","dir":"Changelog","previous_headings":"","what":"version 0.1-5","title":"version 0.1-5","text":"CRAN release: 2018-12-07 check user interrupts st_geod_distance(), #29 Dan Baston add st_astext() fast WKT writing, #25 Etienne Racine add st_is_polygon_cw(), #21 Andy Teucher @ateucher; add Andy Teucher contributors add st_perimeter() st_perimeter_2d() functions compute length measurement boundary surface. allow st_transform_proj() take two proj4 strings crs, c(input_p4s, output_p4s), ignoring CRS x","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-01-4","dir":"Changelog","previous_headings":"","what":"version 0.1-4","title":"version 0.1-4","text":"CRAN release: 2018-01-28 tries fix CRAN error r-release-osx (datum files missing sf; removed test)","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-01-3","dir":"Changelog","previous_headings":"","what":"version 0.1-3","title":"version 0.1-3","text":"CRAN release: 2018-01-21 add st_geod_covered_by() binary geometry predicate","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-01-2","dir":"Changelog","previous_headings":"","what":"version 0.1-2","title":"version 0.1-2","text":"CRAN release: 2017-12-19 try fix OSX compile CRAN, tuning configure.ac","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-01-1","dir":"Changelog","previous_headings":"","what":"version 0.1-1","title":"version 0.1-1","text":"CRAN release: 2017-12-17 add st_length() attempt fix Solaris OSX report proj.4 GEOS versions startup, lwgeom_extSoftwareVersions; #10 add minimum bounding circle, @rundel; #7 add st_subdivide(), see https://github.com/r-spatial/sf/issues/597","code":""},{"path":"https://r-spatial.github.io/lwgeom/news/index.html","id":"version-01-0","dir":"Changelog","previous_headings":"","what":"version 0.1-0","title":"version 0.1-0","text":"CRAN release: 2017-11-16 first CRAN submission","code":""}]