Description Usage Arguments Value Examples
This function draws a regular pointlayer, with the following helperfuction st_make_grid
1 | basic_regular_point(polygon, cellnumber = c(10, 10), rotation = 45)
|
polygon |
polygon A Simple Feature or just a "sfc_MULTIPOLYGON" or "sfc_POLYGON" geometry. |
cellnumber |
integer of length 1 or 2, number of grid cells in x and y direction (columns, rows) |
rotation |
the angle of the point |
A unit point Simple Feature with a parID column
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | df_example <- data.frame(name = c(1, 2),
from1 = c(0,20),
to1 = c(20, 40)
)
#Set coordinates, four points on each horizon
cord_example <- cord_setting(df_example, plot_width = 2)
#create a simple feature: Each line represents a horizon
#with one polygon as geometry.
sf_example <- sf_polygon(df_geom = cord_example,
df_attri = df_example)
#modification of the lines:
lattri_example <- data.frame(name= c(1,2),
numberX = c(2, 5),
sd = c(1,1),
sm = c(TRUE, TRUE)
)
line_example <- line_mod(df = cord_example,
line_attri = lattri_example)
#split the polygon by the new lines
example_profile <- split_polygon(polygon = sf_example,
line = line_example)
#create same regular points with different rotations:
poly_example1 <- basic_regular_point(polygon = example_profile[2,],
cellnumber = c(10, 10),
rotation = 45)
poly_example2 <- basic_regular_point(polygon = example_profile[1,],
cellnumber = c(10, 10),
rotation = 0)
plot(example_profile$geometry)
plot(poly_example1$geometry, add =TRUE, col = "darkblue")
plot(poly_example2$geometry, add =TRUE, col = "darkred")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.