library("readr")
library("sf")
library(tidyverse)
<- read_delim("data/wildschwein_BE_2056.csv", ",") |>
wildschwein_BE st_as_sf(coords = c("E", "N"), crs = 2056, remove = FALSE)
<- read_sf("data/Feldaufnahmen_Fanel.gpkg")
Fanel
# Information dataset incl. georeference-system:
Fanel
Simple feature collection with 975 features and 2 fields
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: 2568099 ymin: 1199766 xmax: 2578824 ymax: 1207836
Projected CRS: CH1903+ / LV95
# A tibble: 975 × 3
FieldID Frucht geom
<dbl> <chr> <POLYGON [m]>
1 1 Roggen ((2570914 1202743, 2570917 1202749, 2570985 1202833, 2571294 …
2 0 <NA> ((2570893 1202758, 2570893 1202758, 2570959 1202845, 2570985 …
3 0 <NA> ((2570868 1202776, 2570872 1202781, 2570913 1202828, 2570946 …
4 2 Wiese ((2570882 1203234, 2570641 1202974, 2570630 1202983, 2570606 …
5 3 Weide ((2570249 1203116, 2570371 1203328, 2570481 1203197, 2570390 …
6 5 Weide ((2570378 1203320, 2570466 1203436, 2570552 1203289, 2570481 …
7 6 Weide ((2570466 1203436, 2570572 1203495, 2570659 1203433, 2570659 …
8 4 Weide ((2569706 1203278, 2569706 1203342, 2570199 1203198, 2570223 …
9 7 Wiese ((2570804 1203310, 2570805 1203312, 2570900 1203608, 2571208 …
10 0 Wald ((2571004 1202990, 2571041 1203029, 2571073 1203003, 2571035 …
# ℹ 965 more rows
# Information types data of all collumns:
str(Fanel)
sf [975 × 3] (S3: sf/tbl_df/tbl/data.frame)
$ FieldID: num [1:975] 1 0 0 2 3 5 6 4 7 0 ...
$ Frucht : chr [1:975] "Roggen" NA NA "Wiese" ...
$ geom :sfc_POLYGON of length 975; first list element: List of 1
..$ : num [1:12, 1:2] 2570914 2570917 2570985 2571294 2571719 ...
..- attr(*, "class")= chr [1:3] "XY" "POLYGON" "sfg"
- attr(*, "sf_column")= chr "geom"
- attr(*, "agr")= Factor w/ 3 levels "constant","aggregate",..: NA NA
..- attr(*, "names")= chr [1:2] "FieldID" "Frucht"
plot(Fanel[2])