# NOT RUN {
grid = surfaceGrid(
obstacles = build,
obstacles_height_field = "BLDG_HT",
res = 2
)
plot(grid)
plot(grid, pch = 1, lwd = 0.1, col = "black", add = TRUE)
# When 'res/2' is larger then height, facade will be left unsampled
build_small = build
build_small$BLDG_HT = 1
grid = surfaceGrid(
obstacles = build_small,
obstacles_height_field = "BLDG_HT",
res = 2
)
plot(grid)
plot(grid, pch = 1, lwd = 0.1, col = "black", add = TRUE)
table(grid$type)
grid = surfaceGrid(
obstacles = build_small,
obstacles_height_field = "BLDG_HT",
res = 2.00001 # res/2 > h
)
plot(grid)
plot(grid, pch = 1, lwd = 0.1, col = "black", add = TRUE)
table(grid$type)
# When input already contains 'obs_id', 'type', 'seg_id', 'xy_id', 'facade_az' or 'ZZZ'
build2 = build
build2$ZZZ = 1
grid = surfaceGrid(
obstacles = build2,
obstacles_height_field = "BLDG_HT",
res = 2
)
# }
Run the code above in your browser using DataLab