constructs an sfc of POLYGON objects

sfc_polygon(obj = NULL, x = NULL, y = NULL, z = NULL, m = NULL,
  polygon_id = NULL, linestring_id = NULL, close = TRUE)

Arguments

obj

sorted matrix or data.frame

x

x geometry column

y

y geometry column

z

z geometry column

m

m geometry column

polygon_id

column of ids for polygons

linestring_id

column of ids for lines (within polygons)

close

logical indicating whether polygons should be closed. If TRUE, all polygons will be checked and force closed if possible

Value

sfc object of POLYGON geometries

notes

sfheaders functions do not perform any validity checks on the geometries. Nor do they set Coordinate Reference Systems, EPSG, PROJ4 or precision attributes.

The data.frame and matrices you send into the sfheader functions must be ordered.

Examples

m <- matrix(c(0,0,0,0,1,1), ncol = 2 ) sfc_polygon( m )
#> [[1]] #> [[1]] #> [,1] [,2] #> [1,] 0 0 #> [2,] 0 1 #> [3,] 0 1 #> [4,] 0 0 #> #> attr(,"class") #> [1] "XY" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> 0 0 0 1 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> NA NA #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> NA NA #> attr(,"class") #> [1] "m_range"
m <- matrix(c(0,0,0,0,0,1,0,1,1,1,2,2,1,2,3,1,3,2), ncol = 3, byrow = TRUE) sfc_polygon( obj = m )
#> [[1]] #> [[1]] #> [,1] [,2] [,3] #> [1,] 0 0 0 #> [2,] 0 0 1 #> [3,] 0 1 1 #> [4,] 1 2 2 #> [5,] 1 2 3 #> [6,] 1 3 2 #> [7,] 0 0 0 #> #> attr(,"class") #> [1] "XYZ" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> 0 0 1 3 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> 0 3 #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> NA NA #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = m, polygon_id = 1 )
#> [[1]] #> [[1]] #> [,1] [,2] #> [1,] 0 0 #> [2,] 0 1 #> [3,] 1 1 #> [4,] 0 0 #> #> attr(,"class") #> [1] "XY" "POLYGON" "sfg" #> #> [[2]] #> [[1]] #> [,1] [,2] #> [1,] 2 2 #> [2,] 2 3 #> [3,] 3 2 #> [4,] 2 2 #> #> attr(,"class") #> [1] "XY" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> 0 0 3 3 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> NA NA #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> NA NA #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = m, linestring_id = 1 )
#> [[1]] #> [[1]] #> [,1] [,2] #> [1,] 0 0 #> [2,] 0 1 #> [3,] 1 1 #> [4,] 0 0 #> #> [[2]] #> [,1] [,2] #> [1,] 2 2 #> [2,] 2 3 #> [3,] 3 2 #> [4,] 2 2 #> #> attr(,"class") #> [1] "XY" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> 0 0 3 3 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> NA NA #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> NA NA #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = m, linestring_id = 1, polygon_id = 1 )
#> [[1]] #> [[1]] #> [,1] [,2] #> [1,] 0 0 #> [2,] 0 1 #> [3,] 1 1 #> [4,] 0 0 #> #> attr(,"class") #> [1] "XY" "POLYGON" "sfg" #> #> [[2]] #> [[1]] #> [,1] [,2] #> [1,] 2 2 #> [2,] 2 3 #> [3,] 3 2 #> [4,] 2 2 #> #> attr(,"class") #> [1] "XY" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> 0 0 3 3 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> NA NA #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> NA NA #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = m, x = 2, y = 3 )
#> [[1]] #> [[1]] #> [,1] [,2] #> [1,] 0 0 #> [2,] 0 1 #> [3,] 1 1 #> [4,] 2 2 #> [5,] 2 3 #> [6,] 3 2 #> [7,] 0 0 #> #> attr(,"class") #> [1] "XY" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> 0 0 3 3 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> NA NA #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> NA NA #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = m, x = 1, y = 2, z = 3 )
#> [[1]] #> [[1]] #> [,1] [,2] [,3] #> [1,] 0 0 0 #> [2,] 0 0 1 #> [3,] 0 1 1 #> [4,] 1 2 2 #> [5,] 1 2 3 #> [6,] 1 3 2 #> [7,] 0 0 0 #> #> attr(,"class") #> [1] "XYZ" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> 0 0 1 3 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> 0 3 #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> NA NA #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = m, x = 2, y = 3, linestring_id = 1, polygon_id = 1 )
#> [[1]] #> [[1]] #> [,1] [,2] #> [1,] 0 0 #> [2,] 0 1 #> [3,] 1 1 #> [4,] 0 0 #> #> attr(,"class") #> [1] "XY" "POLYGON" "sfg" #> #> [[2]] #> [[1]] #> [,1] [,2] #> [1,] 2 2 #> [2,] 2 3 #> [3,] 3 2 #> [4,] 2 2 #> #> attr(,"class") #> [1] "XY" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> 0 0 3 3 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> NA NA #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> NA NA #> attr(,"class") #> [1] "m_range"
df <- data.frame( ml_id = c(1,1,1,1,1,1,1,1,1,2,2,2,2,2,2) , l_id = c(1,1,1,2,2,2,3,3,3,1,1,1,2,2,2) , x = rnorm(15) , y = rnorm(15) , z = rnorm(15) , m = rnorm(15) ) sfc_polygon( obj = df, x = "x", y = "y")
#> [[1]] #> [[1]] #> [,1] [,2] #> [1,] -0.99843255 -1.68650474 #> [2,] 1.23339006 -0.90281495 #> [3,] 0.34042449 1.31763370 #> [4,] -0.47270248 1.10018974 #> [5,] 0.70875306 1.20376784 #> [6,] -1.52895871 -1.43127078 #> [7,] 0.23742535 1.38291086 #> [8,] -1.31281425 0.00312594 #> [9,] 0.74702859 -0.07788682 #> [10,] -1.56251843 0.44142823 #> [11,] 0.07105336 0.12892290 #> [12,] -0.63953477 -0.83021426 #> [13,] -0.84519574 -0.50359291 #> [14,] 0.67524470 -1.19364118 #> [15,] 1.15337579 -0.75172332 #> [16,] -0.99843255 -1.68650474 #> #> attr(,"class") #> [1] "XY" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> -1.562518 -1.686505 1.233390 1.382911 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> NA NA #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> NA NA #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = df, x = "x", y = "y", z = "z")
#> [[1]] #> [[1]] #> [,1] [,2] [,3] #> [1,] -0.99843255 -1.68650474 1.45584140 #> [2,] 1.23339006 -0.90281495 -0.82860353 #> [3,] 0.34042449 1.31763370 0.28977446 #> [4,] -0.47270248 1.10018974 -0.48005348 #> [5,] 0.70875306 1.20376784 -0.60482935 #> [6,] -1.52895871 -1.43127078 1.46011018 #> [7,] 0.23742535 1.38291086 0.14967935 #> [8,] -1.31281425 0.00312594 -1.43332110 #> [9,] 0.74702859 -0.07788682 -0.01030332 #> [10,] -1.56251843 0.44142823 -0.21223603 #> [11,] 0.07105336 0.12892290 -0.90634018 #> [12,] -0.63953477 -0.83021426 -2.10215248 #> [13,] -0.84519574 -0.50359291 1.89336046 #> [14,] 0.67524470 -1.19364118 -0.96812584 #> [15,] 1.15337579 -0.75172332 -0.10260304 #> [16,] -0.99843255 -1.68650474 1.45584140 #> #> attr(,"class") #> [1] "XYZ" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> -1.562518 -1.686505 1.233390 1.382911 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> -2.102152 1.893360 #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> NA NA #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = df, x = "x", y = "y", z = "z", m = "m")
#> [[1]] #> [[1]] #> [,1] [,2] [,3] [,4] #> [1,] -0.99843255 -1.68650474 1.45584140 0.239959572 #> [2,] 1.23339006 -0.90281495 -0.82860353 0.060898893 #> [3,] 0.34042449 1.31763370 0.28977446 -2.177576028 #> [4,] -0.47270248 1.10018974 -0.48005348 -0.117860143 #> [5,] 0.70875306 1.20376784 -0.60482935 0.112294787 #> [6,] -1.52895871 -1.43127078 1.46011018 0.007886198 #> [7,] 0.23742535 1.38291086 0.14967935 1.877743872 #> [8,] -1.31281425 0.00312594 -1.43332110 2.158756554 #> [9,] 0.74702859 -0.07788682 -0.01030332 0.709714522 #> [10,] -1.56251843 0.44142823 -0.21223603 0.766983379 #> [11,] 0.07105336 0.12892290 -0.90634018 -0.308211421 #> [12,] -0.63953477 -0.83021426 -2.10215248 1.012001849 #> [13,] -0.84519574 -0.50359291 1.89336046 -0.919051597 #> [14,] 0.67524470 -1.19364118 -0.96812584 0.563380077 #> [15,] 1.15337579 -0.75172332 -0.10260304 0.322482749 #> [16,] -0.99843255 -1.68650474 1.45584140 0.239959572 #> #> attr(,"class") #> [1] "XYZM" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> -1.562518 -1.686505 1.233390 1.382911 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> -2.102152 1.893360 #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> -2.177576 2.158757 #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = df, x = 2, y = 3)
#> [[1]] #> [[1]] #> [,1] [,2] #> [1,] 1 -0.99843255 #> [2,] 1 1.23339006 #> [3,] 1 0.34042449 #> [4,] 2 -0.47270248 #> [5,] 2 0.70875306 #> [6,] 2 -1.52895871 #> [7,] 3 0.23742535 #> [8,] 3 -1.31281425 #> [9,] 3 0.74702859 #> [10,] 1 -1.56251843 #> [11,] 1 0.07105336 #> [12,] 1 -0.63953477 #> [13,] 2 -0.84519574 #> [14,] 2 0.67524470 #> [15,] 2 1.15337579 #> [16,] 1 -0.99843255 #> #> attr(,"class") #> [1] "XY" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> 1.000000 -1.562518 3.000000 1.233390 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> NA NA #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> NA NA #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = df, x = 2, y = 3, z = 4)
#> [[1]] #> [[1]] #> [,1] [,2] [,3] #> [1,] 1 -0.99843255 -1.68650474 #> [2,] 1 1.23339006 -0.90281495 #> [3,] 1 0.34042449 1.31763370 #> [4,] 2 -0.47270248 1.10018974 #> [5,] 2 0.70875306 1.20376784 #> [6,] 2 -1.52895871 -1.43127078 #> [7,] 3 0.23742535 1.38291086 #> [8,] 3 -1.31281425 0.00312594 #> [9,] 3 0.74702859 -0.07788682 #> [10,] 1 -1.56251843 0.44142823 #> [11,] 1 0.07105336 0.12892290 #> [12,] 1 -0.63953477 -0.83021426 #> [13,] 2 -0.84519574 -0.50359291 #> [14,] 2 0.67524470 -1.19364118 #> [15,] 2 1.15337579 -0.75172332 #> [16,] 1 -0.99843255 -1.68650474 #> #> attr(,"class") #> [1] "XYZ" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> 1.000000 -1.562518 3.000000 1.233390 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> -1.686505 1.382911 #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> NA NA #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = df, x = 2, y = 3, z = 4, m = 5)
#> [[1]] #> [[1]] #> [,1] [,2] [,3] [,4] #> [1,] 1 -0.99843255 -1.68650474 1.45584140 #> [2,] 1 1.23339006 -0.90281495 -0.82860353 #> [3,] 1 0.34042449 1.31763370 0.28977446 #> [4,] 2 -0.47270248 1.10018974 -0.48005348 #> [5,] 2 0.70875306 1.20376784 -0.60482935 #> [6,] 2 -1.52895871 -1.43127078 1.46011018 #> [7,] 3 0.23742535 1.38291086 0.14967935 #> [8,] 3 -1.31281425 0.00312594 -1.43332110 #> [9,] 3 0.74702859 -0.07788682 -0.01030332 #> [10,] 1 -1.56251843 0.44142823 -0.21223603 #> [11,] 1 0.07105336 0.12892290 -0.90634018 #> [12,] 1 -0.63953477 -0.83021426 -2.10215248 #> [13,] 2 -0.84519574 -0.50359291 1.89336046 #> [14,] 2 0.67524470 -1.19364118 -0.96812584 #> [15,] 2 1.15337579 -0.75172332 -0.10260304 #> [16,] 1 -0.99843255 -1.68650474 1.45584140 #> #> attr(,"class") #> [1] "XYZM" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> 1.000000 -1.562518 3.000000 1.233390 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> -1.686505 1.382911 #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> -2.102152 1.893360 #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = df, polygon_id = "ml_id", linestring_id = "l_id" )
#> [[1]] #> [[1]] #> [,1] [,2] [,3] [,4] #> [1,] -0.9984326 -1.6865047 1.4558414 0.23995957 #> [2,] 1.2333901 -0.9028149 -0.8286035 0.06089889 #> [3,] 0.3404245 1.3176337 0.2897745 -2.17757603 #> [4,] -0.9984326 -1.6865047 1.4558414 0.23995957 #> #> [[2]] #> [,1] [,2] [,3] [,4] #> [1,] -0.4727025 1.100190 -0.4800535 -0.117860143 #> [2,] 0.7087531 1.203768 -0.6048294 0.112294787 #> [3,] -1.5289587 -1.431271 1.4601102 0.007886198 #> [4,] -0.4727025 1.100190 -0.4800535 -0.117860143 #> #> [[3]] #> [,1] [,2] [,3] [,4] #> [1,] 0.2374253 1.38291086 0.14967935 1.8777439 #> [2,] -1.3128142 0.00312594 -1.43332110 2.1587566 #> [3,] 0.7470286 -0.07788682 -0.01030332 0.7097145 #> [4,] 0.2374253 1.38291086 0.14967935 1.8777439 #> #> attr(,"class") #> [1] "XYZM" "POLYGON" "sfg" #> #> [[2]] #> [[1]] #> [,1] [,2] [,3] [,4] #> [1,] -1.56251843 0.4414282 -0.2122360 0.7669834 #> [2,] 0.07105336 0.1289229 -0.9063402 -0.3082114 #> [3,] -0.63953477 -0.8302143 -2.1021525 1.0120018 #> [4,] -1.56251843 0.4414282 -0.2122360 0.7669834 #> #> [[2]] #> [,1] [,2] [,3] [,4] #> [1,] -0.8451957 -0.5035929 1.8933605 -0.9190516 #> [2,] 0.6752447 -1.1936412 -0.9681258 0.5633801 #> [3,] 1.1533758 -0.7517233 -0.1026030 0.3224827 #> [4,] -0.8451957 -0.5035929 1.8933605 -0.9190516 #> #> attr(,"class") #> [1] "XYZM" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> -1.562518 -1.686505 1.233390 1.382911 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> -2.102152 1.893360 #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> -2.177576 2.158757 #> attr(,"class") #> [1] "m_range"
sfc_polygon( obj = df, polygon_id = 1, linestring_id = 2 )
#> [[1]] #> [[1]] #> [,1] [,2] [,3] [,4] #> [1,] -0.9984326 -1.6865047 1.4558414 0.23995957 #> [2,] 1.2333901 -0.9028149 -0.8286035 0.06089889 #> [3,] 0.3404245 1.3176337 0.2897745 -2.17757603 #> [4,] -0.9984326 -1.6865047 1.4558414 0.23995957 #> #> [[2]] #> [,1] [,2] [,3] [,4] #> [1,] -0.4727025 1.100190 -0.4800535 -0.117860143 #> [2,] 0.7087531 1.203768 -0.6048294 0.112294787 #> [3,] -1.5289587 -1.431271 1.4601102 0.007886198 #> [4,] -0.4727025 1.100190 -0.4800535 -0.117860143 #> #> [[3]] #> [,1] [,2] [,3] [,4] #> [1,] 0.2374253 1.38291086 0.14967935 1.8777439 #> [2,] -1.3128142 0.00312594 -1.43332110 2.1587566 #> [3,] 0.7470286 -0.07788682 -0.01030332 0.7097145 #> [4,] 0.2374253 1.38291086 0.14967935 1.8777439 #> #> attr(,"class") #> [1] "XYZM" "POLYGON" "sfg" #> #> [[2]] #> [[1]] #> [,1] [,2] [,3] [,4] #> [1,] -1.56251843 0.4414282 -0.2122360 0.7669834 #> [2,] 0.07105336 0.1289229 -0.9063402 -0.3082114 #> [3,] -0.63953477 -0.8302143 -2.1021525 1.0120018 #> [4,] -1.56251843 0.4414282 -0.2122360 0.7669834 #> #> [[2]] #> [,1] [,2] [,3] [,4] #> [1,] -0.8451957 -0.5035929 1.8933605 -0.9190516 #> [2,] 0.6752447 -1.1936412 -0.9681258 0.5633801 #> [3,] 1.1533758 -0.7517233 -0.1026030 0.3224827 #> [4,] -0.8451957 -0.5035929 1.8933605 -0.9190516 #> #> attr(,"class") #> [1] "XYZM" "POLYGON" "sfg" #> #> attr(,"n_empty") #> [1] 0 #> attr(,"crs") #> $epsg #> [1] NA #> #> $proj4string #> [1] NA #> #> attr(,"class") #> [1] "crs" #> attr(,"class") #> [1] "sfc_POLYGON" "sfc" #> attr(,"precision") #> [1] 0 #> attr(,"bbox") #> xmin ymin xmax ymax #> -1.562518 -1.686505 1.233390 1.382911 #> attr(,"class") #> [1] "bbox" #> attr(,"z_range") #> zmin zmax #> -2.102152 1.893360 #> attr(,"class") #> [1] "z_range" #> attr(,"m_range") #> mmin mmax #> -2.177576 2.158757 #> attr(,"class") #> [1] "m_range"