pcomp1 <- create_component("MULTIPOINT(1 2, 3 2)", 0.4)
pcomp2 <- create_component("POINT(2 1)", 0.3)
ppoint <- create_pgeometry(list(pcomp1, pcomp2), "PLATEAUPOINT")
spa_get_type(ppoint)
lcomp1 <- create_component("LINESTRING(1 2, 3 3, 3 4)", 1)
lcomp2 <- create_component("LINESTRING(0 0, 5 5)", 0.5)
pline <- create_pgeometry(list(lcomp1, lcomp2), "PLATEAULINE")
spa_get_type(pline)
pcomposition <- create_pgeometry(list(ppoint, pline), "PLATEAUCOMPOSITION")
spa_get_type(pcomposition)
Run the code above in your browser using DataLab