@@ -100,7 +100,16 @@ test_that("sfg objectse convereted to data.frames", {
100100 , m = c(1 )
101101 )
102102
103- mp <- sfg_multipolygon( df2 , x = " x" , y = " y" , z = " z" , polygon_id = " polygon_id" , linestring_id = " line_id" )
103+
104+ mpz <- sfg_multipolygon(
105+ df2 , x = " x" , y = " y" , z = " z"
106+ , polygon_id = " polygon_id" , linestring_id = " line_id"
107+ )
108+
109+ mpzm <- sfg_multipolygon(
110+ df2 , x = " x" , y = " y" , z = " z" , m = " m"
111+ , polygon_id = " polygon_id" , linestring_id = " line_id"
112+ )
104113
105114 df_pt <- sfheaders :: sfg_to_df( pt )
106115 expect_equal( df_pt $ x , 1 )
@@ -122,10 +131,14 @@ test_that("sfg objectse convereted to data.frames", {
122131 expect_equal( df_p $ x , m [,1 ] )
123132 expect_equal( df_p $ y , m [,2 ] )
124133
125- df_mp <- sfheaders :: sfg_to_df( mp )
134+ df_mp <- sfheaders :: sfg_to_df( mpz )
126135 expect_equal( df_mp $ x , df2 $ x )
127136 expect_equal( df_mp $ y , df2 $ y )
128137
138+ df_mpzm <- sfheaders :: sfg_to_df( mpzm )
139+ expect_equal( df_mpzm $ z , df2 $ z )
140+ expect_equal( df_mpzm $ m , df2 $ m )
141+
129142 expect_true( inherits( df_pt , " data.frame" ) )
130143 expect_true( inherits( df_mpt , " data.frame" ) )
131144 expect_true( inherits( df_ls , " data.frame" ) )
@@ -146,7 +159,7 @@ test_that("sfg objectse convereted to data.frames", {
146159 , linestring_id = " linestring_id"
147160 )
148161
149- expect_equal( mp , res )
162+ expect_equal( mpz , res )
150163
151164})
152165
0 commit comments