-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
110 lines (110 loc) · 4.38 KB
/
.Rhistory
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
sapply(list("sf", "tidyverse", "terra", "here"),
library, character.only = TRUE, logical.return = TRUE)
station_grosskreutz <- st_as_sf(x = data.frame(y = 52.39606624576463, x = 12.766103593149202),
coords = c("x", "y"),
crs = 4326,
sf_column_name = "geometry") %>%
st_transform(3035) %>%
mutate(name = "Großkreuz",
x = st_coordinates(.)[,1],
y = st_coordinates(.)[,2])
großkreuz_buf <- st_buffer(station_grosskreutz, 10000)
#remotes::install_github("EcoDynIZW/d6atlas")
landuse_reclass_table <- d6atlas::landuse_reclass_table
lu_poly <- st_read("T:/wenzler/GeoData/data-raw/brandenburg/landuse_brandenburg_2009_polygons_25833_gpkg/landuse_brandenburg_2009_polygons_25833.gpkg") %>%
dplyr::select("BIOTYP8") %>%
st_transform(3035) %>%
left_join(y = landuse_reclass_table, by = "BIOTYP8") %>%
dplyr::select(biotoptype, name_class_eng)
lu_line <-
sf::st_read("T:/wenzler/GeoData/data-raw/brandenburg/landuse_brandenburg_2009_lines_25833_gpkg/landuse_brandenburg_2009_lines_25833.gpkg"
) %>%
dplyr::select("BIOTYP8") %>%
st_transform(3035) %>%
left_join(y = landuse_reclass_table, by = "BIOTYP8") %>%
dplyr::select(biotoptype, name_class_eng)
lu_poly_c <- st_crop(lu_poly, st_bbox(großkreuz_buf))
lu_line_c <- st_crop(lu_line, st_bbox(großkreuz_buf))
unique(lu_poly_c$name_class_eng)
lu_tab %>%
group_by(biotoptype, name_class_eng, Name_Klasse) %>%
summarise()
landuse_reclass_table %>%
group_by(biotoptype, name_class_eng, Name_Klasse) %>%
summarise()
## grassland_05_line <- lu_line_c %>% filter(biotoptype %in% "05") # not existing
## shrubs_06_line <- lu_line_c %>% filter(biotoptype %in% "06") # not existing
# hedges_07_line <- lu_line_c %>% filter(biotoptype %in% "07")
## forest_08_line <- lu_line_c %>% filter(biotoptype %in% "08") # not existing
## agriculture_09_line <- lu_line_c %>% filter(biotoptype %in% "09") # not existing
## open_areas_10_line <- lu_line_c %>% filter(biotoptype %in% "10") # not existing
## other_11_line <- lu_line_c %>% filter(biotoptype %in% "11") # not existing
# build_areas_12_line <- lu_line_c %>% filter(biotoptype %in% "12")
#
#
usethis::use_data(
river_01_poly,
standing_water_02_poly,
ruderal_03_poly,
peatlands_04_poly,
grassland_05_poly,
shrubs_06_poly,
hedges_07_poly,
forest_08_poly,
agriculture_09_poly,
open_areas_10_poly,
other_11_poly,
build_areas_12_poly,
river_01_line,
standing_water_02_line,
hedges_07_line,
build_areas_12_line,
landuse_reclass_table,
station_grosskreutz,
overwrite = TRUE
)
river_01_poly <- lu_poly_c %>% filter(biotoptype %in% "01")
standing_water_02_poly <- lu_poly_c %>% filter(biotoptype %in% "02")
ruderal_03_poly <- lu_poly_c %>% filter(biotoptype %in% "03")
peatlands_04_poly <- lu_poly_c %>% filter(biotoptype %in% "04")
grassland_05_poly <- lu_poly_c %>% filter(biotoptype %in% "05")
shrubs_06_poly <- lu_poly_c %>% filter(biotoptype %in% "06")
hedges_07_poly <- lu_poly_c %>% filter(biotoptype %in% "07")
forest_08_poly <- lu_poly_c %>% filter(biotoptype %in% "08")
agriculture_09_poly <- lu_poly_c %>% filter(biotoptype %in% "09")
open_areas_10_poly <- lu_poly_c %>% filter(biotoptype %in% "10")
other_11_poly <- lu_poly_c %>% filter(biotoptype %in% "11")
build_areas_12_poly <- lu_poly_c %>% filter(biotoptype %in% "12")
river_01_line <- lu_line_c %>% filter(biotoptype %in% "01")
standing_water_02_line <- lu_line_c %>% filter(biotoptype %in% "02")
# ruderal_03_line <- lu_line_c %>% filter(biotoptype %in% "03") # not existing
# peatlands_04_line <- lu_line_c %>% filter(biotoptype %in% "04") # not existing
# grassland_05_line <- lu_line_c %>% filter(biotoptype %in% "05") # not existing
# shrubs_06_line <- lu_line_c %>% filter(biotoptype %in% "06") # not existing
hedges_07_line <- lu_line_c %>% filter(biotoptype %in% "07")
# forest_08_line <- lu_line_c %>% filter(biotoptype %in% "08") # not existing
# agriculture_09_line <- lu_line_c %>% filter(biotoptype %in% "09") # not existing
# open_areas_10_line <- lu_line_c %>% filter(biotoptype %in% "10") # not existing
# other_11_line <- lu_line_c %>% filter(biotoptype %in% "11") # not existing
build_areas_12_line <- lu_line_c %>% filter(biotoptype %in% "12")
usethis::use_data(
river_01_poly,
standing_water_02_poly,
ruderal_03_poly,
peatlands_04_poly,
grassland_05_poly,
shrubs_06_poly,
hedges_07_poly,
forest_08_poly,
agriculture_09_poly,
open_areas_10_poly,
other_11_poly,
build_areas_12_poly,
river_01_line,
standing_water_02_line,
hedges_07_line,
build_areas_12_line,
landuse_reclass_table,
station_grosskreutz,
overwrite = TRUE
)