In the context of the AGROMET project, we need CORINE land cover data and digital terrain model to improve models.
I refer you to my other posts about CORINE land cover (CLC) :
How to get CLC data from Wallonia
Solve a problem in computing the area of each polygon inside a buffer
This post deals with the methodology which was applied to prepare data before using them in our models.
CLC
First, I was focused on CORINE land cover data. My work has two parts :
A part about physical stations, i.e. stations from PAMESEB network where data are available
Another part on the grid of Wallonia with virtual stations (one for each km²)
Virtual stations
Different methods were used to observe CORINE land cover near to each virtual station.
First, a grid of Wallonia with cells of 1km² has been created. It is a simple feature sf
.
Using centroid of each cell and creating a buffer around
I refer you to the bottom of this page where I have already explained the method.
The limit of this method is that we have a loss of information between every virtual station with gap in the map. That is an important problem for the future predictions.

Buffers
## sid Agricultural areas Herbaceous vegetation Forest
## 1 vs_1 53.715238 44.050842 0.000000
## 2 vs_10 9.880474 55.039849 33.858245
## 3 vs_100 74.292621 23.349854 1.167155
## 4 vs_1000 0.000000 0.000000 99.995888
## 5 vs_10000 15.540447 3.680151 0.000000
## 6 vs_10001 9.923178 48.652962 5.173979
## Artificials surfaces Water
## 1 0.000000 0
## 2 1.217319 0
## 3 1.186258 0
## 4 0.000000 0
## 5 80.775290 0
## 6 36.245769 0
Using entire cell
This time, I will use all the cell and not only its centroid.
The method was close to the precedent one with buffers but I will have no gap in my map.
I used simple features sf
for computations but I had a problem with the function st_intersection()
. Indeed, an error appeared :
Error in CPL_geos_op2(op, st_geometry(x), st_geometry(y)) : TopologyException: Input geom 1 is invalid: Ring Self-intersection at or near point [coordinates of the point]
.
After a long investigation, the solution we found was to install a new package : lwgeom
to use a function which works with st_intersection()
. Then, the issue was solved.

Grid
## sid Agricultural areas Artificials surfaces Forest
## 1 vs_1 2.884731 0.0000000 0.00000
## 2 vs_10 40.573362 0.0000000 59.42664
## 3 vs_100 0.000000 0.2237628 99.73470
## 4 vs_1000 0.000000 0.0000000 100.00000
## 5 vs_10000 0.000000 0.0000000 100.00000
## 6 vs_10001 0.000000 0.0000000 81.60053
## Herbaceous vegetation Water
## 1 97.11526925 0
## 2 0.00000000 0
## 3 0.04153773 0
## 4 0.00000000 0
## 5 0.00000000 0
## 6 18.39947191 0