scieee AI-readable full text Open interactive document viewer

High-resolution ecogeographical variable dataset describing Latvia, 2024

Avotins, Andris; Butkeviča, Jekaterīna; Rubene, Betija; Rusina, Solvita; Starka, Rūta; Šakele, Vita; Vērpēja, Vineta; Vinogradovs, Ivo; Aunins, Ainars

Abstract

Description:This dataset contains 538 ecogeographical variables as raster grids with 100 m cell size. Every layer matches template raster grids (CRS, pixel locations, extent, pixels with values), they cover the whole terrestrial territory of Latvia and are consistent with each other. Files: "HiQBioDiv_EGVs_2024.csv" names ecogeographical variable layers in "HiQBioDiv_EGVlayers_2024.zip"; "HiQBioDiv_EGVs_2024_README.csv" explains fields in "HiQBioDiv_EGVs_2024.csv"; "HiQBioDiv_EGVs_FlowChart_2024.png" visualises relationships between ecogeographical variables in "HiQBioDiv_EGVlayers_2024.zip" "HiQBioDiv-EGVs_Maps_20251203.pdf" describes EGV creation in detail; "HiQBioDiv_EGVlayers_2024.zip" contains geoTiff layers with ecogeographical variables. EGV layer's naming convention: {part1}_{part2}_{part3}.tif part1 is a name of the group of variables; part2 is an abbreviated name of the specific variable; part3 is a categorised spatial resolution: "cell" - information from within the cell only; "r500" - a summary of information from an area with 500 m radius around the cell's centre; "r1250" - a summary of information from an area with 1250 m radius around the cell's centre; "r3000" - a summary of information from an area with 3000 m radius around the cell's centre; "r10000" - a summary of information from an area with 10000 m radius around the cell's centre. File format:The layers are gridded geoTiff files and can be loaded in any conventional geographical information system (GIS) or analytical programming languages (e.g. R or Python). Geographic projection:We use the LKS-92 / Latvia TM by default for all layers in HiQBioDiv. Sourcecode:Detailed description of geodata used and workflows in production of every layer is available in an online document. Related work is available at the project's GitHub repository. Versions:Versions 1.0.1. fixed layernames (sortable, e.g. from "egv_1" to "egv_001"), fixes longnames in English and Latvian, includes a pdf file with layer creation described in details.

Full text

High-resolution ecogeographical variables for species distribution modelling describing Latvia, 2024 Andris A votiņš Jekaterīna Butkeviča Betija Rubene Solvita Rūsiņa Rūta Starka V ita Šakele V ineta Vērpēja Ivo V inogradovs Ainārs Auniņš 2025-12-03 2 Contents Pr eface 19 A b o u t t h i s m a t e r i a l ......................................... 1 9 O u t l i n e ............................................... 2 0 1 T erminology and acronyms 21 2 Utilities 25 2 . 1 R p a c k a g e e g v t o o l s ..................................... 2 5 2.2 Other utility functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3 T emplates files 29 3 . 1 V e c t o r d a t a .......................................... 2 9 3 . 2 R a s t e r d a t a .......................................... 3 0 4 Raw geodata 33 4.1 State Forest Service’ s State Forest Register . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.2 Rural Support Service’ s information on declared fields . . . . . . . . . . . . . . . . . . . 33 4 . 3 M e l i o r a t i o n C a d a s t e r ..................................... 3 4 4 . 4 T o p o g r a p h i c M a p ...................................... 5 9 4 . 5 C o r i n e L a n d C o v e r 2 0 1 8 ................................... 6 4 4.6 Publicly available L VM data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 4 . 7 S o i l d a t a ........................................... 6 5 4 . 8 D y n a m i c W o r l d d a t a ..................................... 6 9 4 . 9 T h e G l o b a l F o r e s t W a t c h .................................. 7 0 4 . 1 0 P a l s a r ............................................ 7 1 4 . 1 1 C H E L S A v 2 . 1 ........................................ 7 2 4 . 1 2 H y d r o C l i m d a t a ....................................... 7 3 4 . 1 3 S e n t i n e l - 2 i n d i c e s ...................................... 7 4 4.14 W aste and garbage disposal sites, landfills . . . . . . . . . . . . . . . . . . . . . . . . . . 75 4.15 Digital elevation/terrain models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 4.16 Latvian Exclusive Economic Zone polygon . . . . . . . . . . . . . . . . . . . . . . . . . 77 4 . 1 7 B o g s a n d M i r e s : E D I .................................... 7 7 3 5 Geodata pr oducts 79 5 . 1 T e r r a i n p r o d u c t s ....................................... 7 9 5 . 2 S o i l t e x t u r e p r o d u c t ..................................... 8 3 5.3 Landscape classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 5 . 4 L a n d s c a p e d i v e r s i t y ..................................... 1 0 1 6 Ecogeographical variables 109 6.1 Climate_CHELSA v2.1-bio1_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 10 6.2 Climate_CHELSA v2.1-bio10_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 1 6.3 Climate_CHELSA v2.1-bio1 1_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 12 6.4 Climate_CHELSA v2.1-bio12_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 13 6.5 Climate_CHELSA v2.1-bio13_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 15 6.6 Climate_CHELSA v2.1-bio14_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 16 6.7 Climate_CHELSA v2.1-bio15_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 17 6.8 Climate_CHELSA v2.1-bio16_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 19 6.9 Climate_CHELSA v2.1-bio17_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 6.10 Climate_CHELSA v2.1-bio18_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 6.1 1 Climate_CHELSA v2.1-bio19_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 6.12 Climate_CHELSA v2.1-bio2_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 6.13 Climate_CHELSA v2.1-bio3_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 6.14 Climate_CHELSA v2.1-bio4_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 6.15 Climate_CHELSA v2.1-bio5_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 6.16 Climate_CHELSA v2.1-bio6_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 6.17 Climate_CHELSA v2.1-bio7_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 6.18 Climate_CHELSA v2.1-bio8_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 6.19 Climate_CHELSA v2.1-bio9_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 6.20 Climate_CHELSA v2.1-clt-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 6.21 Climate_CHELSA v2.1-clt-mean_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 6.22 Climate_CHELSA v2.1-clt-min_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 6.23 Climate_CHELSA v2.1-clt-range_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 6.24 Climate_CHELSA v2.1-cmi-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 6.25 Climate_CHELSA v2.1-cmi-mean_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 6.26 Climate_CHELSA v2.1-cmi-min_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 6.27 Climate_CHELSA v2.1-cmi-range_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 6.28 Climate_CHELSA v2.1-fcf_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 6.29 Climate_CHELSA v2.1-fgd_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 6.30 Climate_CHELSA v2.1-gdd0_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 6.31 Climate_CHELSA v2.1-gdd10_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 6.32 Climate_CHELSA v2.1-gdd5_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 6.33 Climate_CHELSA v2.1-gddlgd0_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 6.34 Climate_CHELSA v2.1-gddlgd10_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 4 6.35 Climate_CHELSA v2.1-gddlgd5_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 6.36 Climate_CHELSA v2.1-gdgfgd0_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 6.37 Climate_CHELSA v2.1-gdgfgd10_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 6.38 Climate_CHELSA v2.1-gdgfgd5_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 6.39 Climate_CHELSA v2.1-gsl_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 6.40 Climate_CHELSA v2.1-gsp_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 6.41 Climate_CHELSA v2.1-gst_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 6.42 Climate_CHELSA v2.1-hurs-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 6.43 Climate_CHELSA v2.1-hurs-mean_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 6.44 Climate_CHELSA v2.1-hurs-min_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 6.45 Climate_CHELSA v2.1-hurs-range_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 6.46 Climate_CHELSA v2.1-lgd_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 6.47 Climate_CHELSA v2.1-ngd0_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 6.48 Climate_CHELSA v2.1-ngd10_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 6.49 Climate_CHELSA v2.1-ngd5_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 6.50 Climate_CHELSA v2.1-npp_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 6.51 Climate_CHELSA v2.1-pet-penman-max_cell . . . . . . . . . . . . . . . . . . . . . . . . 174 6.52 Climate_CHELSA v2.1-pet-penman-mean_cell . . . . . . . . . . . . . . . . . . . . . . . 176 6.53 Climate_CHELSA v2.1-pet-penman-min_cell . . . . . . . . . . . . . . . . . . . . . . . . 177 6.54 Climate_CHELSA v2.1-pet-penman-range_cell . . . . . . . . . . . . . . . . . . . . . . . 178 6.55 Climate_CHELSA v2.1-rsds-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 6.56 Climate_CHELSA v2.1-rsds-mean_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 6.57 Climate_CHELSA v2.1-rsds-min_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 6.58 Climate_CHELSA v2.1-rsds-range_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 6.59 Climate_CHELSA v2.1-scd_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 6.60 Climate_CHELSA v2.1-sfcW ind-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . 186 6.61 Climate_CHELSA v2.1-sfcW ind-mean_cell . . . . . . . . . . . . . . . . . . . . . . . . . 188 6.62 Climate_CHELSA v2.1-sfcW ind-min_cell . . . . . . . . . . . . . . . . . . . . . . . . . . 189 6.63 Climate_CHELSA v2.1-sfcW ind-range_cell . . . . . . . . . . . . . . . . . . . . . . . . . 190 6.64 Climate_CHELSA v2.1-swb_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 6.65 Climate_CHELSA v2.1-swe_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 6.66 Climate_CHELSA v2.1-vpd-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 6.67 Climate_CHELSA v2.1-vpd-mean_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 6.68 Climate_CHELSA v2.1-vpd-min_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 6.69 Climate_CHELSA v2.1-vpd-range_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 6.70 HydroClim_01-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 6.71 HydroClim_02-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 6.72 HydroClim_03-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 6.73 HydroClim_04-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 6.74 HydroClim_05-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 6.75 HydroClim_06-min_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 5 6.76 HydroClim_07-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1 6.77 HydroClim_08-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 6.78 HydroClim_09-min_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 6.79 HydroClim_10-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 6.80 HydroClim_1 1-min_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 6.81 HydroClim_12-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 6.82 HydroClim_13-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 6.83 HydroClim_14-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 6.84 HydroClim_15-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 6.85 HydroClim_16-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 6.86 HydroClim_17-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 6.87 HydroClim_18-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 6.88 HydroClim_19-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 6.89 Distance_Builtup_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 6.90 Distance_ForestInside_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 6.91 Distance_GrasslandPermanent_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 6.92 Distance_Landfill_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 6 . 9 3 D i s t a n c e _ S e a _ c e l l ...................................... 2 4 2 6 . 9 4 D i s t a n c e _ T r e e s _ c e l l ..................................... 2 4 4 6 . 9 5 D i s t a n c e _ W a s t e _ c e l l ..................................... 2 4 5 6 . 9 6 D i s t a n c e _ W a t e r _ c e l l ..................................... 2 4 7 6.97 Distance_W aterInside_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 6.98 Diversity_Farmland_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 6.99 Diversity_Farmland_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 6.100 Diversity_Farmland_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 6.101 Diversity_Farmland_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 6.102 Diversity_Forest_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 6.103 Diversity_Forest_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 6.104 Diversity_Forest_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 6.105 Diversity_Forest_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 6.106 Diversity_T otal_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 6.107 Diversity_T otal_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 6.108 Diversity_T otal_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 6.109 Diversity_T otal_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 6.1 10 Edges_Bogs-T rees_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 6.1 1 1 Edges_Bogs-T rees_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 6.1 12 Edges_Bogs-T rees_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 6.1 13 Edges_Bogs-T rees_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 6.1 14 Edges_Bogs-T rees_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 6.1 15 Edges_Bogs-W ater_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 6.1 16 Edges_Bogs-W ater_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 6 6.1 17 Edges_Bogs-W ater_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 6.1 18 Edges_Bogs-W ater_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 6.1 19 Edges_Bogs-W ater_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 6.120 Edges_Farmland-Builtup_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 6.121 Edges_Farmland-Builtup_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 6.122 Edges_Farmland-Builtup_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 6.123 Edges_Farmland-Builtup_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 6.124 Edges_Farmland-Builtup_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 6.125 Edges_T rees-Builtup_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 6.126 Edges_T rees-Builtup_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 6.127 Edges_T rees-Builtup_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 6.128 Edges_T rees-Builtup_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 6.129 Edges_T rees-Builtup_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 6.130 Edges_CropsFallow_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 6.131 Edges_CropsFallow_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 6.132 Edges_CropsFallow_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 6.133 Edges_CropsFallow_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 6.134 Edges_CropsFallow_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 6.135 Edges_FarmlandShrubs-T rees_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 6.136 Edges_FarmlandShrubs-T rees_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 6.137 Edges_FarmlandShrubs-T rees_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 6.138 Edges_FarmlandShrubs-T rees_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 6.139 Edges_FarmlandShrubs-T rees_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 6.140 Edges_Grasslands_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 6.141 Edges_Grasslands_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 6.142 Edges_Grasslands_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 6.143 Edges_Grasslands_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 6.144 Edges_Grasslands_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 6.145 Edges_OldForests_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 6.146 Edges_OldForests_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 6.147 Edges_OldForests_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 6.148 Edges_OldForests_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 6.149 Edges_OldForests_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 6 . 1 5 0 E d g e s _ R o a d s _ c e l l ...................................... 3 3 1 6 . 1 5 1 E d g e s _ R o a d s _ r 5 0 0 ..................................... 3 3 3 6 . 1 5 2 E d g e s _ R o a d s _ r 1 2 5 0 ..................................... 3 3 4 6 . 1 5 3 E d g e s _ R o a d s _ r 3 0 0 0 ..................................... 3 3 6 6.154 Edges_Roads_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 6 . 1 5 5 E d g e s _ T r e e s _ c e l l ...................................... 3 3 9 6 . 1 5 6 E d g e s _ T r e e s _ r 5 0 0...................................... 3 4 1 6 . 1 5 7 E d g e s _ T r e e s _ r 1 2 5 0 ..................................... 3 4 2 7 6 . 1 5 8 E d g e s _ T r e e s _ r 3 0 0 0 ..................................... 3 4 4 6 . 1 5 9 E d g e s _ T r e e s _ r 1 0 0 0 0 ..................................... 3 4 5 6 . 1 6 0 E d g e s _ W a t e r _ c e l l ...................................... 3 4 7 6 . 1 6 1 E d g e s _ W a t e r _ r 5 0 0 ...................................... 3 4 9 6 . 1 6 2 E d g e s _ W a t e r _ r 1 2 5 0 ..................................... 3 5 0 6 . 1 6 3 E d g e s _ W a t e r _ r 3 0 0 0 ..................................... 3 5 1 6.164 Edges_W ater_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 6.165 Edges_W ater -Farmland_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 6.166 Edges_W ater -Farmland_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 6.167 Edges_W ater -Farmland_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 6.168 Edges_W ater -Farmland_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 6.169 Edges_W ater -Farmland_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 6.170 Edges_W ater -Grassland_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 6.171 Edges_W ater -Grassland_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 6.172 Edges_W ater -Grassland_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 6.173 Edges_W ater -Grassland_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 6.174 Edges_W ater -Grassland_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 6.175 Edges_ReedSedgeRushBeds-W ater_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 6.176 Edges_ReedSedgeRushBeds-W ater_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . 372 6.177 Edges_ReedSedgeRushBeds-W ater_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . 373 6.178 Edges_ReedSedgeRushBeds-W ater_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . 375 6.179 Edges_ReedSedgeRushBeds-W ater_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . 376 6.180 FarmlandCrops_CropsAll_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 6.181 FarmlandCrops_CropsAll_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 6.182 FarmlandCrops_CropsAll_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 6.183 FarmlandCrops_CropsAll_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 6.184 FarmlandCrops_CropsAll_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 6.185 FarmlandCrops_CropsHoed_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 6.186 FarmlandCrops_CropsHoed_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 6.187 FarmlandCrops_CropsHoed_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 6.188 FarmlandCrops_CropsHoed_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 6.189 FarmlandCrops_CropsHoed_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 6.190 FarmlandCrops_CropsOther_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 6.191 FarmlandCrops_CropsOther_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 6.192 FarmlandCrops_CropsOther_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 6.193 FarmlandCrops_CropsOther_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 6.194 FarmlandCrops_CropsOther_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 6.195 FarmlandCrops_CropsSpring_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 6.196 FarmlandCrops_CropsSpring_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 6.197 FarmlandCrops_CropsSpring_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 6.198 FarmlandCrops_CropsSpring_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 8 6.199 FarmlandCrops_CropsSpring_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 6.200 FarmlandCrops_CropsW inter_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 6.201 FarmlandCrops_CropsW inter_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 6.202 FarmlandCrops_CropsW inter_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 6.203 FarmlandCrops_CropsW inter_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 6.204 FarmlandCrops_CropsW inter_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 6.205 FarmlandCrops_RapeseedsSpring_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 6.206 FarmlandCrops_RapeseedsSpring_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 6.207 FarmlandCrops_RapeseedsSpring_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . 421 6.208 FarmlandCrops_RapeseedsSpring_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . 423 6.209 FarmlandCrops_RapeseedsSpring_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . 424 6.210 FarmlandCrops_RapeseedsW inter_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 6.21 1 FarmlandCrops_RapeseedsW inter_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 6.212 FarmlandCrops_RapeseedsW inter_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . 429 6.213 FarmlandCrops_RapeseedsW inter_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . 431 6.214 FarmlandCrops_RapeseedsW inter_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . 432 6.215 FarmlandGrassland_GrasslandsAbandoned_cell . . . . . . . . . . . . . . . . . . . . . . 434 6.216 FarmlandGrassland_GrasslandsAbandoned_r500 . . . . . . . . . . . . . . . . . . . . . . 436 6.217 FarmlandGrassland_GrasslandsAbandoned_r1250 . . . . . . . . . . . . . . . . . . . . . 437 6.218 FarmlandGrassland_GrasslandsAbandoned_r3000 . . . . . . . . . . . . . . . . . . . . . 439 6.219 FarmlandGrassland_GrasslandsAbandoned_r10000 . . . . . . . . . . . . . . . . . . . . . 440 6.220 FarmlandGrassland_GrasslandsAll_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 6.221 FarmlandGrassland_GrasslandsAll_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . 444 6.222 FarmlandGrassland_GrasslandsAll_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . 445 6.223 FarmlandGrassland_GrasslandsAll_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . 446 6.224 FarmlandGrassland_GrasslandsAll_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . 448 6.225 FarmlandGrassland_GrasslandsPermanent_cell . . . . . . . . . . . . . . . . . . . . . . . 449 6.226 FarmlandGrassland_GrasslandsPermanent_r500 . . . . . . . . . . . . . . . . . . . . . . 451 6.227 FarmlandGrassland_GrasslandsPermanent_r1250 . . . . . . . . . . . . . . . . . . . . . . 453 6.228 FarmlandGrassland_GrasslandsPermanent_r3000 . . . . . . . . . . . . . . . . . . . . . . 454 6.229 FarmlandGrassland_GrasslandsPermanent_r10000 . . . . . . . . . . . . . . . . . . . . . 456 6.230 FarmlandGrassland_GrasslandsT emporary_cell . . . . . . . . . . . . . . . . . . . . . . . 457 6.231 FarmlandGrassland_GrasslandsT emporary_r500 . . . . . . . . . . . . . . . . . . . . . . 459 6.232 FarmlandGrassland_GrasslandsT emporary_r1250 . . . . . . . . . . . . . . . . . . . . . . 461 6.233 FarmlandGrassland_GrasslandsT emporary_r3000 . . . . . . . . . . . . . . . . . . . . . . 462 6.234 FarmlandGrassland_GrasslandsT emporary_r10000 . . . . . . . . . . . . . . . . . . . . . 464 6.235 FarmlandParcels_FieldsActive_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 6.236 FarmlandParcels_FieldsActive_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 6.237 FarmlandParcels_FieldsActive_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 6.238 FarmlandParcels_FieldsActive_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 6.239 FarmlandParcels_FieldsActive_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 9 6.240 FarmlandPloughed_CropsFallow_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 6.241 FarmlandPloughed_CropsFallow_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 6.242 FarmlandPloughed_CropsFallow_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 6.243 FarmlandPloughed_CropsFallow_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 6.244 FarmlandPloughed_CropsFallow_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . 479 6.245 FarmlandPloughed_CropsFallowT empGrass_cell . . . . . . . . . . . . . . . . . . . . . . 481 6.246 FarmlandPloughed_CropsFallowT empGrass_r500 . . . . . . . . . . . . . . . . . . . . . 483 6.247 FarmlandPloughed_CropsFallowT empGrass_r1250 . . . . . . . . . . . . . . . . . . . . . 484 6.248 FarmlandPloughed_CropsFallowT empGrass_r3000 . . . . . . . . . . . . . . . . . . . . . 486 6.249 FarmlandPloughed_CropsFallowT empGrass_r10000 . . . . . . . . . . . . . . . . . . . . 487 6.250 FarmlandPloughed_Fallow_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 6.251 FarmlandPloughed_Fallow_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491 6.252 FarmlandPloughed_Fallow_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 6.253 FarmlandPloughed_Fallow_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 6.254 FarmlandPloughed_Fallow_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 6.255 FarmlandSubsidies_BiologicalSubsidies_cell . . . . . . . . . . . . . . . . . . . . . . . . 497 6.256 FarmlandSubsidies_BiologicalSubsidies_r500 . . . . . . . . . . . . . . . . . . . . . . . 499 6.257 FarmlandSubsidies_BiologicalSubsidies_r1250 . . . . . . . . . . . . . . . . . . . . . . . 500 6.258 FarmlandSubsidies_BiologicalSubsidies_r3000 . . . . . . . . . . . . . . . . . . . . . . . 502 6.259 FarmlandSubsidies_BiologicalSubsidies_r10000 . . . . . . . . . . . . . . . . . . . . . . 503 6.260 FarmlandT rees_PermanentCrops_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 6.261 FarmlandT rees_PermanentCrops_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 6.262 FarmlandT rees_PermanentCrops_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 6.263 FarmlandT rees_PermanentCrops_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 6.264 FarmlandT rees_PermanentCrops_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . 51 1 6.265 FarmlandT rees_ShortRotationCoppice_cell . . . . . . . . . . . . . . . . . . . . . . . . . 513 6.266 FarmlandT rees_ShortRotationCoppice_r500 . . . . . . . . . . . . . . . . . . . . . . . . 515 6.267 FarmlandT rees_ShortRotationCoppice_r1250 . . . . . . . . . . . . . . . . . . . . . . . . 516 6.268 FarmlandT rees_ShortRotationCoppice_r3000 . . . . . . . . . . . . . . . . . . . . . . . . 518 6.269 FarmlandT rees_ShortRotationCoppice_r10000 . . . . . . . . . . . . . . . . . . . . . . . 519 6.270 ForestsAge_ClearcutsLowStands_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521 6.271 ForestsAge_ClearcutsLowStands_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . 523 6.272 ForestsAge_ClearcutsLowStands_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 6.273 ForestsAge_ClearcutsLowStands_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 6.274 ForestsAge_ClearcutsLowStands_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . 527 6.275 ForestsAge_Middle_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 6.276 ForestsAge_Middle_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 6.277 ForestsAge_Middle_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533 6.278 ForestsAge_Middle_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534 6.279 ForestsAge_Middle_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536 6.280 ForestsAge_Old_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 10 6.281 ForestsAge_Old_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 6.282 ForestsAge_Old_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 6.283 ForestsAge_Old_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 6.284 ForestsAge_Old_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 6.285 ForestsAge_Y oungT allStandsShrubs_cell . . . . . . . . . . . . . . . . . . . . . . . . . . 546 6.286 ForestsAge_Y oungT allStandsShrubs_r500 . . . . . . . . . . . . . . . . . . . . . . . . . 548 6.287 ForestsAge_Y oungT allStandsShrubs_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . 550 6.288 ForestsAge_Y oungT allStandsShrubs_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . 551 6.289 ForestsAge_Y oungT allStandsShrubs_r10000 . . . . . . . . . . . . . . . . . . . . . . . . 553 6.290 ForestsQuant_AgeProp-average_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 6.291 ForestsQuant_DominantDiameter -max_cell . . . . . . . . . . . . . . . . . . . . . . . . . 557 6.292 ForestsQuant_Lar gestDiameter -max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . 560 6.293 ForestsQuant_T imeSinceDisturbance-average_cell . . . . . . . . . . . . . . . . . . . . . 563 6.294 ForestsQuant_V olumeAspen-sum_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 6.295 ForestsQuant_V olumeBirch-sum_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 6.296 ForestsQuant_V olumeBlackAlder -sum_cell . . . . . . . . . . . . . . . . . . . . . . . . . 572 6.297 ForestsQuant_V olumeBorealDeciduousOther -sum_cell . . . . . . . . . . . . . . . . . . . 575 6.298 ForestsQuant_V olumeBorealDeciduousT otal-sum_cell . . . . . . . . . . . . . . . . . . . 578 6.299 ForestsQuant_V olumeConiferous-sum_cell . . . . . . . . . . . . . . . . . . . . . . . . . 581 6.300 ForestsQuant_V olumeOak-sum_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584 6.301 ForestsQuant_V olumeOakMaple-sum_cell . . . . . . . . . . . . . . . . . . . . . . . . . 587 6.302 ForestsQuant_V olumePine-sum_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 6.303 ForestsQuant_V olumeSpruce-sum_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 6.304 ForestsQuant_V olumeT emperateDeciduousT otal-sum_cell . . . . . . . . . . . . . . . . . 596 6.305 ForestsQuant_V olumeT emperateW ithoutOak-sum_cell . . . . . . . . . . . . . . . . . . . 599 6.306 ForestsQuant_V olumeT emperateW ithoutOakMaple-sum_cell . . . . . . . . . . . . . . . . 602 6.307 ForestsQuant_V olumeT otal-sum_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 6.308 ForestsSoil_EutrophicDrained_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 6.309 ForestsSoil_EutrophicDrained_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 6.310 ForestsSoil_EutrophicDrained_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 1 6.31 1 ForestsSoil_EutrophicDrained_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 6.312 ForestsSoil_EutrophicDrained_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 6.313 ForestsSoil_EutrophicMineral_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 6.314 ForestsSoil_EutrophicMineral_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 6.315 ForestsSoil_EutrophicMineral_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 6.316 ForestsSoil_EutrophicMineral_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 6.317 ForestsSoil_EutrophicMineral_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 6.318 ForestsSoil_EutrophicOr ganic_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624 6.319 ForestsSoil_EutrophicOr ganic_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 6.320 ForestsSoil_EutrophicOr ganic_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 6.321 ForestsSoil_EutrophicOr ganic_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 1 1 6.322 ForestsSoil_EutrophicOr ganic_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 630 6.323 ForestsSoil_MesotrophicMineral_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632 6.324 ForestsSoil_MesotrophicMineral_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . 634 6.325 ForestsSoil_MesotrophicMineral_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . 635 6.326 ForestsSoil_MesotrophicMineral_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 6.327 ForestsSoil_MesotrophicMineral_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . 638 6.328 ForestsSoil_OligotrophicDrained_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640 6.329 ForestsSoil_OligotrophicDrained_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . 642 6.330 ForestsSoil_OligotrophicDrained_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 6.331 ForestsSoil_OligotrophicDrained_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 6.332 ForestsSoil_OligotrophicDrained_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . 646 6.333 ForestsSoil_OligotrophicMineral_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 6.334 ForestsSoil_OligotrophicMineral_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . 650 6.335 ForestsSoil_OligotrophicMineral_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . 651 6.336 ForestsSoil_OligotrophicMineral_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 6.337 ForestsSoil_OligotrophicMineral_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . 654 6.338 ForestsSoil_OligotrophicOr ganic_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 6.339 ForestsSoil_OligotrophicOr ganic_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . 658 6.340 ForestsSoil_OligotrophicOr ganic_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 6.341 ForestsSoil_OligotrophicOr ganic_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 6.342 ForestsSoil_OligotrophicOr ganic_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . 662 6.343 ForestsT reesAge_BorealDeciduousOld_cell . . . . . . . . . . . . . . . . . . . . . . . . . 664 6.344 ForestsT reesAge_BorealDeciduousOld_r500 . . . . . . . . . . . . . . . . . . . . . . . . 667 6.345 ForestsT reesAge_BorealDeciduousOld_r1250 . . . . . . . . . . . . . . . . . . . . . . . 668 6.346 ForestsT reesAge_BorealDeciduousOld_r3000 . . . . . . . . . . . . . . . . . . . . . . . 670 6.347 ForestsT reesAge_BorealDeciduousOld_r10000 . . . . . . . . . . . . . . . . . . . . . . . 671 6.348 ForestsT reesAge_BorealDeciduousY oung_cell . . . . . . . . . . . . . . . . . . . . . . . 673 6.349 ForestsT reesAge_BorealDeciduousY oung_r500 . . . . . . . . . . . . . . . . . . . . . . . 676 6.350 ForestsT reesAge_BorealDeciduousY oung_r1250 . . . . . . . . . . . . . . . . . . . . . . 677 6.351 ForestsT reesAge_BorealDeciduousY oung_r3000 . . . . . . . . . . . . . . . . . . . . . . 679 6.352 ForestsT reesAge_BorealDeciduousY oung_r10000 . . . . . . . . . . . . . . . . . . . . . 680 6.353 ForestsT reesAge_ConiferousOld_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682 6.354 ForestsT reesAge_ConiferousOld_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 6.355 ForestsT reesAge_ConiferousOld_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . 686 6.356 ForestsT reesAge_ConiferousOld_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 688 6.357 ForestsT reesAge_ConiferousOld_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . 689 6.358 ForestsT reesAge_ConiferousY oung_cell . . . . . . . . . . . . . . . . . . . . . . . . . . 691 6.359 ForestsT reesAge_ConiferousY oung_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . 694 6.360 ForestsT reesAge_ConiferousY oung_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . 695 6.361 ForestsT reesAge_ConiferousY oung_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . 697 6.362 ForestsT reesAge_ConiferousY oung_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . 698 12 6.363 ForestsT reesAge_MixedOld_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700 6.364 ForestsT reesAge_MixedOld_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 6.365 ForestsT reesAge_MixedOld_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704 6.366 ForestsT reesAge_MixedOld_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706 6.367 ForestsT reesAge_MixedOld_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 6.368 ForestsT reesAge_MixedY oung_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709 6.369 ForestsT reesAge_MixedY oung_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712 6.370 ForestsT reesAge_MixedY oung_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713 6.371 ForestsT reesAge_MixedY oung_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 6.372 ForestsT reesAge_MixedY oung_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 716 6.373 ForestsT reesAge_T emperateDeciduousOld_cell . . . . . . . . . . . . . . . . . . . . . . . 718 6.374 ForestsT reesAge_T emperateDeciduousOld_r500 . . . . . . . . . . . . . . . . . . . . . . 721 6.375 ForestsT reesAge_T emperateDeciduousOld_r1250 . . . . . . . . . . . . . . . . . . . . . 722 6.376 ForestsT reesAge_T emperateDeciduousOld_r3000 . . . . . . . . . . . . . . . . . . . . . 724 6.377 ForestsT reesAge_T emperateDeciduousOld_r10000 . . . . . . . . . . . . . . . . . . . . . 725 6.378 ForestsT reesAge_T emperateDeciduousY oung_cell . . . . . . . . . . . . . . . . . . . . . 727 6.379 ForestsT reesAge_T emperateDeciduousY oung_r500 . . . . . . . . . . . . . . . . . . . . . 730 6.380 ForestsT reesAge_T emperateDeciduousY oung_r1250 . . . . . . . . . . . . . . . . . . . . 731 6.381 ForestsT reesAge_T emperateDeciduousY oung_r3000 . . . . . . . . . . . . . . . . . . . . 733 6.382 ForestsT reesAge_T emperateDeciduousY oung_r10000 . . . . . . . . . . . . . . . . . . . 734 6.383 ForestsT rees_BorealDeciduous_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736 6.384 ForestsT rees_BorealDeciduous_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739 6.385 ForestsT rees_BorealDeciduous_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740 6.386 ForestsT rees_BorealDeciduous_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 6.387 ForestsT rees_BorealDeciduous_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 743 6.388 ForestsT rees_Coniferous_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745 6.389 ForestsT rees_Coniferous_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748 6.390 ForestsT rees_Coniferous_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749 6.391 ForestsT rees_Coniferous_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751 6.392 ForestsT rees_Coniferous_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 752 6.393 ForestsT rees_Mixed_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754 6.394 ForestsT rees_Mixed_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757 6.395 ForestsT rees_Mixed_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758 6.396 ForestsT rees_Mixed_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760 6.397 ForestsT rees_Mixed_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761 6.398 ForestsT rees_T emperateDeciduous_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 763 6.399 ForestsT rees_T emperateDeciduous_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . 766 6.400 ForestsT rees_T emperateDeciduous_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . 767 6.401 ForestsT rees_T emperateDeciduous_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . 769 6.402 ForestsT rees_T emperateDeciduous_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . 770 6.403 General_AllotmentGardens_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772 13 6.404 General_AllotmentGardens_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773 6.405 General_AllotmentGardens_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775 6.406 General_AllotmentGardens_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776 6.407 General_AllotmentGardens_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778 6.408 General_BareSoilQuarry_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779 6.409 General_BareSoilQuarry_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781 6.410 General_BareSoilQuarry_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782 6.41 1 General_BareSoilQuarry_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784 6.412 General_BareSoilQuarry_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785 6.413 General_Builtup_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787 6.414 General_Builtup_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788 6.415 General_Builtup_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790 6.416 General_Builtup_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791 6.417 General_Builtup_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793 6.418 General_Farmland_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794 6.419 General_Farmland_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796 6.420 General_Farmland_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797 6.421 General_Farmland_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799 6.422 General_Farmland_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800 6.423 General_ForestsW ithoutInventory_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . 802 6.424 General_ForestsW ithoutInventory_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . 804 6.425 General_ForestsW ithoutInventory_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . 805 6.426 General_ForestsW ithoutInventory_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . 807 6.427 General_ForestsW ithoutInventory_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . 808 6.428 General_GardensOrchards_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810 6.429 General_GardensOrchards_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 1 6.430 General_GardensOrchards_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813 6.431 General_GardensOrchards_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814 6.432 General_GardensOrchards_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816 6 . 4 3 3 G e n e r a l _ R o a d s _ c e l l ..................................... 8 1 7 6.434 General_ShrubsOrchards_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819 6.435 General_ShrubsOrchards_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821 6.436 General_ShrubsOrchards_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822 6.437 General_ShrubsOrchards_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824 6.438 General_ShrubsOrchards_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825 6.439 General_ShrubsOrchardsGardens_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827 6.440 General_ShrubsOrchardsGardens_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . 829 6.441 General_ShrubsOrchardsGardens_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . 830 6.442 General_ShrubsOrchardsGardens_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . 832 6.443 General_ShrubsOrchardsGardens_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . 833 6.444 General_SwampsMiresBogsHelophytes_cell . . . . . . . . . . . . . . . . . . . . . . . . 835 14 6.445 General_SwampsMiresBogsHelophytes_r500 . . . . . . . . . . . . . . . . . . . . . . . . 836 6.446 General_SwampsMiresBogsHelophytes_r1250 . . . . . . . . . . . . . . . . . . . . . . . 838 6.447 General_SwampsMiresBogsHelophytes_r3000 . . . . . . . . . . . . . . . . . . . . . . . 839 6.448 General_SwampsMiresBogsHelophytes_r10000 . . . . . . . . . . . . . . . . . . . . . . 841 6 . 4 4 9 G e n e r a l _ T r e e s _ c e l l ..................................... 8 4 2 6 . 4 5 0 G e n e r a l _ T r e e s _ r 5 0 0 ..................................... 8 4 4 6.451 General_T rees_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845 6.452 General_T rees_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847 6.453 General_T rees_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848 6.454 General_T reesOutsideForests_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850 6.455 General_T reesOutsideForests_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851 6.456 General_T reesOutsideForests_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853 6.457 General_T reesOutsideForests_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854 6.458 General_T reesOutsideForests_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856 6 . 4 5 9 G e n e r a l _ W a t e r _ c e l l ..................................... 8 5 7 6 . 4 6 0 G e n e r a l _ W a t e r _ r 5 0 0 ..................................... 8 5 9 6.461 General_W ater_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860 6.462 General_W ater_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862 6.463 General_W ater_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863 6 . 4 6 4 W e t l a n d s _ B o g s _ c e l l ..................................... 8 6 5 6.465 W etlands_Bogs_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866 6.466 W etlands_Bogs_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868 6.467 W etlands_Bogs_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869 6.468 W etlands_Bogs_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 870 6.469 W etlands_Mires_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872 6.470 W etlands_Mires_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873 6.471 W etlands_Mires_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875 6.472 W etlands_Mires_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 876 6.473 W etlands_Mires_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877 6.474 W etlands_ReedSedgeRushBeds_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879 6.475 W etlands_ReedSedgeRushBeds_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881 6.476 W etlands_ReedSedgeRushBeds_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . 882 6.477 W etlands_ReedSedgeRushBeds_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 883 6.478 W etlands_ReedSedgeRushBeds_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 885 6.479 EO_NDMI-L Ymed-average_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 886 6.480 EO_NDMI-L Ymedian-iqr_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887 6.481 EO_NDMI-ST iqr -median_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889 6.482 EO_NDMI-STmedian-average_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890 6.483 EO_NDMI-STmedian-iqr_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891 6.484 EO_NDMI-STp25-min_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893 6.485 EO_NDMI-STp75-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 894 15 6.486 EO_NDVI-L Ymedian-average_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 895 6.487 EO_NDVI-L Ymedian-iqr_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896 6.488 EO_NDVI-ST iqr -median_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898 6.489 EO_NDVI-STmedian-average_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 899 6.490 EO_NDVI-STmedian-iqr_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900 6.491 EO_NDVI-STp25-min_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 902 6.492 EO_NDVI-STp75-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903 6.493 EO_NDWI-L Ymedian-average_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904 6.494 EO_NDWI-L Ymedian-iqr_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905 6.495 EO_NDWI-ST iqr -median_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907 6.496 EO_NDWI-STmedian-average_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908 6.497 EO_NDWI-STmedian-iqr_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909 6.498 EO_NDWI-STp25-min_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 1 6.499 EO_NDWI-STp75-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912 6.500 SoilChemistry_ESDAC-CN_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 913 6.501 SoilChemistry_ESDAC-CaCo3_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 914 6.502 SoilChemistry_ESDAC-K_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916 6.503 SoilChemistry_ESDAC-N_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917 6.504 SoilChemistry_ESDAC-P_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 918 6.505 SoilChemistry_ESDAC-phH2O_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919 6.506 SoilT exture_Clay_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 920 6.507 SoilT exture_Clay_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922 6.508 SoilT exture_Clay_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 923 6.509 SoilT exture_Clay_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 925 6.510 SoilT exture_Clay_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 926 6.51 1 SoilT exture_Or ganic_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928 6.512 SoilT exture_Or ganic_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 929 6.513 SoilT exture_Or ganic_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 931 6.514 SoilT exture_Or ganic_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 932 6.515 SoilT exture_Or ganic_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 934 6.516 SoilT exture_Sand_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 935 6.517 SoilT exture_Sand_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 937 6.518 SoilT exture_Sand_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 938 6.519 SoilT exture_Sand_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 940 6.520 SoilT exture_Sand_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 941 6.521 SoilT exture_Silt_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 943 6.522 SoilT exture_Silt_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 944 6.523 SoilT exture_Silt_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 946 6.524 SoilT exture_Silt_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 947 6.525 SoilT exture_Silt_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 949 6.526 T errain_ASL-average_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 950 16 6.527 T errain_Aspect-average_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 951 6.528 T errain_Aspect-iqr_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 953 6.529 T errain_DiS-area_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 954 6.530 T errain_DiS-area_r500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 956 6.531 T errain_DiS-area_r1250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 957 6.532 T errain_DiS-area_r3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 959 6.533 T errain_DiS-area_r10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 960 6.534 T errain_DiS-max_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 962 6.535 T errain_DiS-mean_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 963 6.536 T errain_Slope-average_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 964 6.537 T errain_Slope-iqr_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 965 6.538 T errain_TWI-average_cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 967 7 Data access 969 Refer ences 971 17 18 Pr eface W elcome! This book documents the geodata and processing workflows used to create ecogeographical variables (EGVs) for species distribution modelling in Latvia (2024). This material presents the results of three University of Latvia projects deeply rooted in species distribution modelling and, more importantly , explains the workflow and decisions made to ensure their repeatability and reproducibility . These projects are: • The project “Preparation of a geospatial data layer covering existing protected areas for the imple- mentation of the EU Biodiversity Strategy 2030” (No. 1-08/73/2023), funded by the Administrations of the Latvian Environmental Protection Fund; • Scientific research service project commissioned by the Joint Stock Company “Latvijas valsts meži” (Latvian State Forests) “Improvement of the monitoring of the northern goshawk Accipiter gen- tilis and creation of a spatial model of habitat suitability” (Latvian State Forests document No. 5- 5.5.1_000r_101_23_27_6); • State research program “Development of research specified in the Biodiversity Priority Action Pro- gram” project “High-resolution quantification of biodiversity for nature conservation and manage- ment: HiQBioDiv” (VPP-V ARAM-DABA-2024/1-0002). The material was developed in R using {bookdown}. The data processing and analysis described in the content was mainly performed in R, and one of the main reasons for creating this material was to transfer the information necessary for reproducing the work using verified command lines. A desirable side effect is to promote openness and reproducibility in scientific practice and practical science. • Home repository of this material: aavotins/HiQBioDiv_EGVs • Cite as needed using book/book.bib . About this material This material is not : • an intr oduction to R or other pr ogramming language . On the contrary , it will be most useful to those who already understand how to use command lines. However , it will also be informative for other users regarding the approaches used; • a tutorial on geopr ocessing . This material summarizes the approaches that, at the time of its devel- opment, were known to the authors as the most effective (in terms of processing time, RAM and hard disk space, performance guarantees, and reliability), but they are certainly not the only ones possible; • copy/paste r eady pr oduct . Although the use and publication of command lines tends to be intended for these purposes, in a situation where large amounts of data and, at least in part, restricted access data are used for the work, this is simply not possible. However , by ensuring data availability and placement in accordance with the file structure of this project (available at root/Data or by forking template repository ), the command lines will be repeatable without changes and will produce the same results. 19 This material has been prepared to provide a reproducible workflow , describing the decisions made and solutions implemented in the preparation of ecogeographical variables for species distribution (habitat suit- ability) modelling for biodiversity conservation planning. For the most part, this material consists of: • explanatory text , which is recognizable as text; • command lines , which are hidden by default to make the text easier to read. The locations of the command lines can be identified by the “|> Code” visible on the left side of the page, just below this paragraph. Clicking on it will open the code area, where the text on a grey background is command lines, for example: object = function (arguments1,arguments2, path= ”./path/file/tree/object.extension” ) # comment In the example above, the first line creates an object (“object”) that is the result of a function (“function()”). The function has three ar guments (“ar guments1”, “ar guments2” and “path”) separated by commas (as with all function ar guments in R). The third argument is the path in the file tree. It is on “a new line” but is a continuation of the function on the previous line, because the parentheses are not closed. Note the beginning “./”, which indicates a relative path - the location in the file tree is relative to the project location. The second line of the example above is a comment - everything after “#” is a comment. Anything in a command line before “#” must be an executable function or object. A comment can contain anything and be on the same line as an executable function (at the end of it). Command lines are the most important part of this material for reproducibility . However , the person using them must ensure the availability of input data and maintain correct paths in the file tree. In this material code chunks are formatted as individual pieces to better pinpoint commands used for a job described in the text around. However , in practical setting the creation of ecogeographical variables will be much faster , if they will be combined in loops or other batch processing setup. Command lines used in practice are available in the home repository of this material at Data/RScripts_final , they can be executed in an alphanumeric order , if not specified differently . W e per - formed parts of the compute on the University of Latvia Institute of Numerical Modelling HPC cluster with the same file tree as in this material. Shell scripts used to run R commands are available in the home repository of this material at Data/hpc_io/Jobs_shell/2024/EGVs . Sometimes we will refer to R packages in the text, we will put them in curly brackets, for example, {pack- age}. • graphics - occasional diagrams that describe the workflow or data characteristics and maps; • links to other r esour ces , especially to higher-level products and results created within the project, as well as any publicly available data. The results are intended for practical use. W ithin reason, the material describes all data sets used and provides metadata related to ensuring repro- ducibility . Since not all data sets are freely available, they are not published as such, but in all cases infor- mation is provided on how they were obtained for the development of this project. Outline 1. T erminology and acronyms 2. Utilities 3. T emplate files 4. Raw geodata 5. Geodata products 6. Ecogeographical variables 7. Data access 20 Chapter 1 T erminology and acr onyms Athough all georeferenced data can be considered geodata , in this material we use the following terms in the order listed below in our workflows: • raw geodata - considered as raw data obtained for a harmonised description of the environment. This may include tables with coordinates, raster or vector data. It can be anything that has been or can be used to create ecogeographical variables , with or without slight processing. • geodata pr oduct - processed raw geodata that have undegone heavy modifications, e.g. spatial over - lays and combinations of dif ferent sets of raw geodata , and are used as input data . In this document, geodata pr oducts are categorical raster layers that match the CRS and the pixel locations of input data . When split by categories, they become input data . The processing step of creating geodata pr oducts is necessary when decisions about the order of spatial overlays are important. For example, in a high-resolution pixel, there can only be water or forest, if the edge between water and forest need to be calculated. • input data or input layers - very-high resolution (multiple times higher than that used for ecogeo- graphical variables ) raster data that are the direct input for the creation of most of the ecogeographical variables . The creation of such layers is particularly useful alongside geodata pr oducts , as dealing with border misalignment or decisions regarding the order of spatial overlays, as well as simple geo- processing, is much faster with raster data. • ecogeographical variables (EGVs) - this is the final product of the workflow describing environment for statistical analysis (e.g. species distribution modelling ). They are suitable also for publishing due to standardisation of the values. In other words, these are standardised landscape ecological variables in the form of high-resolution raster layers (we use 1 ha cells). Each layer contains values representing the environment within the cell footprint or a summary of focal neighbours. In our case, each layer is of quantitative data describing a natural quantity (e.g. timber volume, mean annual temperature), or quantified information of categories (e.g. the fraction of class’ s area in an analysis cell or some neighbourhood, the number of pixels creating an edge of a certain class or between two classes in the analysis cell or some neighbourhood). The values of each layer are standardised: for each cell, the layer mean is subtracted and the result is divided by the root mean square error . Therefore, the values are more suitable for modelling, and the layers can be made publicly available as they do not directly provide exact sensitive information. In this material, we use the term species distribution modelling (SDM) as a more broadly used term, that is synonymous with ecological niche analysis and ecological niche modelling . T ree species groups: conifer ous - following species (codes) as used in the national forest stand-level-inventory database: • pines (1, 14, 22) • spruces (3, 15) • larch (13) 21 • firs (23, 28) bor eal deciduous - following species (codes) as used in the national forest stand-level-inventory database: • birches (4) • black alder (6) • aspens (8, 19, 68) • grey alder (9) • willows (20, 21) • rowan (32) • eve (35) temperate deciduous - following species (codes) as used in the national forest stand-level-inventory database: • oaks (10, 61) • ashes (1 1, 64) • lindens (12, 62) • elms (16, 65) • beech (17) • hornbeam (18) • maples (24, 63) • cherry (25) • apple (26) • pear (27) • yew (29) • acacia (50) • walnut (66) • chestnut (67) • robinia (69) Forest stand age groups (vgr) as used in the national forest stand-level-inventory database: • young stands (vgr = 1) in coniferous trees, ashes and oaks - until 40 years, in grey alder - until 10 years, in other tree species - until 20 years; • medium aged stands (vgr = 2 or vgr = 3) are between young stands (vgr = 1) and legal rotation age; • old stands (vgr = 4 or vgr = 5) are stands exceeding legal rotation age. This is defined in by law based on tree species and site quality class (bonity). Generally for oaks, pines and larches it is 101 or 121 years, for spruces, ashes, limes, elms and maples it is 81 years, for birches it is 71 or 51 years, for black alder it is 71 years, for aspens it is 41 years. Currently , there is no minimum rotation age in grey alder . W e used 35 years, as it is the age of the youngest stand registered as “full grown” in the databse. This was necessary for the harmonization of EGVs throughout forests. 22 Acronyms: CRS - coordinate reference system DW - Dynamic W orld EDI - Institute of Electronics and Computer Sciences EGV - ecogeographical variables GEE - Google Earth Engine SDM - species distribution modelling SDMs - species distribution models LAD - Rural Support Service LĢIA - Latvian Geospatial Information Agency LULC - Land use and land cover LU - University of Latvia LU ĢZZF - University of Latvia Faculty of Geography and Earth Sciences L VM - state owned Joint Stock Company “Latvia’ s State Forests” L VMI Silava - Latvian State Forest Research Institute “Silava” NDMI - normalized difference moisture index NDVI - normalized dif ference vegetation index NDWI - normalized dif ference water index MVR - State Forest Service’ s stand level inventory database “Forest State Registry” VMD - State Forest Service 23 24 Chapter 2 Utilities This chapter provides a brief description of the utility functions used in this material. Most of these functions are available in the R package {egvtools}, which was created specifically for this work. 2.1 R package egvtools {egvtools} provides a coherent set of wrappers and utilities that facilitate the reproducible and efficient creation of lar ge-scale EGVs on real datasets. The package relies on robust building blocks — {terra}, {sf}, {sfarrow}, {exactextractr} and {whitebox} — and standardises input/output data, naming conventions and multi-scale zonal statistics, ensuring that the pipelines are repeatable across machines and projects. The package was developed for the project ‘HiQBioDiv: High-resolution quantification of biodiversity for conservation and management’, which was funded by the Latvian Council of Science (Ref. No. VPP- V ARAM-DABA-2024/1-0002), to simplify our work and to facilitate the reproduction of our results. Five of the functions are strictly for replication, while others are useful for a wider audience. Package can be installed from GitHub with: # install.packages(”pak”) pak :: pak ( ”aavotins/egvtools” ) or obtained as a Docker container with all the necessary system and software dependencies. 2.1.1 Repr oduction only functions These functions are small wrappers, that help to recreate our working environments - template files and their locations in the file tree. These functions are: • download_raster_templates() — fetch template rasters from Zenodo repository and place them in a user specified location on the disk, or by default - the place we used. By default this function links to the version 2.0.0 of the dataset; • download_vector_templates() - fetch template vector grids/points from Zenodo repository and place them in a user specified location on the disk, or by default - the place we used. By default this function links to the version 1.0.1 of the dataset; • radius_function() — extracts summary statistics from raster layers using buffered polygon zones of multiple radii and rasterises them onto a common template grid. Internally hard coded to use filenames (first and second part in the result of tiling functions) as used in this project. If the filenames are kept, function can easily be used for other projects, regions etc. Function can be used to run sequentially , however much faster compute will be with parallel computing. If fast swap disk is available, this function needs only c.a. 5 GiBs of RAM per worker to perform tasks in this project. However , if the swap disk is not available, at least 20 GiBs of RAM per worker need to be assigned. 25 2.1.2 General purpose functions Each of those functions are small workflows themselves that can be combined into lar ger workflows and used more widely than for Latvia. • tile_vector_grid() — tile template (vector) grid for chunked processing. The function internally is linked to our file naming convention. As long as it is maintained, function can be used to create tiled grid from any {sfarrow} parquet grid file; • tiled_buffers() — precompute buffered tiles for multiple radii around points. The function internally is linked to our file naming convention. As long as it is maintained, function can be used to create tiled polygons with buf fers around points from any {sfarrow} parquet grid file. There are three buf fering modes: dense (buf fers the best-matching pts100*.parquet (prefers pts100_sauzeme.parquet) for each tile by radii_dense (default: 500, 1250, 3000, 10000 m ensuring that every analysis grid cell has desired buf fer . Computationally heavy in the following workflows), sparse (uses a file to radius mapping and is highly generalizable), and specified (the same as sparse, but with one single point file). In our workflows we used the sparse mode with default mapping ; • create_backgrounds() — a wrapper around terra::ifel() to build consistent background rasters. This function better guards coordinate reference system and how it is stored, while also guarding spatial cover , resolution, coordinate reference system, exact pixel matching, etc. Creation of layers with default background values is faster than recreating them several times in workflows preparing EGVs; • polygon2input() — rasterise polygons to input layers. Handles only polygon data, other geometry types need to be buf fered. Rasterizes polygon/multipolygon sf data to a raster aligned to a tem- plate GeoTIFF . Rasterization tar gets a raster::RasterLayer built from the template (so grids normally match). Projection is optional (project_mode). Missing values are counted only over valid template cells. User may optionally restrict the result with a raster mask (restrict_to) using numeric values or bracketed range strings (e.g., “(0,5]”, “[10,)”). Remaining NA cells can be filled by covering with a background raster (background_raster) or a constant (background_value). For large rasters, heavy steps (projection/mask/cover) can stream to disk via terra_todisk=TRUE. • input2egv() — normalize/align a fine-resolution input raster to a (coarser) EGV template, optionally cover missing values and/or fill gaps (IDW via Whitebox), and write the result to disk. Designed for lar ge runs: fast gap counting (inside template footprint only), optional filling, tuned GDAL write options, and controlled terra memory/temp behavior . • downscale2egv() — downscale coarse rasters to a template grid (CRS, resolution, extent), masks to the template footprint, and optionally: (1) fills NoData gaps using WhiteboxT ools’ IDW -based fill_missing_data, and (2) applies IDW smoothing to reduce blockiness from low-resolution inputs. • distance2egv() — computes Euclidean distance (in map units) from cells matching a set of class values in an input raster to all cells of an EGV template grid, then writes a Float32 GeoTIFF aligned to the template. Designed to work with rasters produced by polygon2input() . • landscape_function() — computes a {landscapemetrics} metric (default “lsm_l_shdi”), optionally with extra lm_ar gs, that yields one value per zone and per input layer . Runs tile-by-tile (by tile_field), writes per -tile rasters, merges to final per -layer GeoTIFF(s), then performs gap analysis (NA count within the template footprint and optional maximum gap width) and optional IDW gap filling via WhiteboxT ools. Returns a compact data.frame with per-layer stats and timing. Function can be used to run sequentially , however much faster compute will be with parallel computing. If fast swap disk is available, this function needs only 3 GiBs of RAM per worked to perform tasks in this project. However , if the swap disk is not available, at least 20 GiBs of RAM per worker need to be assigned. 2.2 Other utility functions Other handy functions repeatedly used, not included in {egvtools} are stored in egvs02.02_UtilityFunctions.R file, located in Data/RScipts_final . • ensure_multipolygons() - rather agressive function to create MULTIPOLYGON geometries from GEOME- TRYCOLLECTION 26 if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (gdalUtilities)) { install.packages ( ”gdalUtilities” ) ; require (gdalUtilities)} ensure_multipolygons <- function (X) { library (sf) library (gdalUtilities) tmp1 <- tempfile ( fileext = ”.gpkg” ) tmp2 <- tempfile ( fileext = ”.gpkg” ) st_write (X, tmp1) ogr2ogr (tmp1, tmp2, f = ”GPKG” , nlt = ”MULTIPOLYGON” ) Y <- st_read (tmp2) st_sf ( st_drop_geometry (X), geom = st_geometry (Y)) } 27 28 Chapter 3 T emplates files This chapter defines template files. They define the analysis space and ensure harmonisation of georefer - enced data creation, and facilitate connection with other Latvian geodata. 3.1 V ector data Baseline template (or reference) vector grid and point files are publiclly available in the HiQBioDiv’ s Zenodo repository . The command lines and data used to create these files are documented in the HiQBioDiv main code repository’ s file . The easiest way to obtain these files is to run determined function download_vector_templates() from {egv- tools}. if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} download_vector_templates ( url = ”https://zenodo.org/api/records/14277114/files-archive” , grid_dir = ”./Templates/TemplateGrids” , points_dir = ”./Templates/TemplateGridPoints” , gpkg_dir = ”./Templates” , overwrite = FALSE , quiet = FALSE ) Once template vector data are downloaded and unarchived, they need to be tiled: 1. Analysis grid is tiled in tks50km pages if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} tile_vector_grid ( grid_path = ”./Templates/TemplateGrids/tikls100_sauzeme.parquet” , out_dir = ”./Templates/TemplateGrids/tiles” , tile_field = ”tks50km” , chunk_size = 50000 L , overwrite = FALSE , quiet = FALSE ) Expect to see warning: This is an initial implementation of Parquet/Feather file support and geo metadata. This is tracking version 0.1.0 of the metadata (https://github.com/geopandas/geo-arrow- spec). This metadata specification may change and does not yet make stability promises. We do not yet recommend using this in a production setting unless you are able to rewrite your Parquet/Feather files. 29 2. Point files are tiled and buffered. In the workflows creating EGVs described in this document, we used a “sparse” grid: • 500m buf fers around every 100m grid cell’ s centre; • 1250m buf fers around every 100m grid cell’ s centre; • 3000m buf fers around every 300m grid cell’ s centre (to speed up neighbourhood analysis ~9 times, while loosing <0.001% of precission); • 10000m buf fers around every 1000m grid cell’ s centre (to speed up neighbourhood analysis ~100 times, while loosing <0.001% of precission) if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} tiled_buffers ( in_dir = ”./Templates/TemplateGridPoints” , out_dir = ”./Templates/TemplateGridPoints/tiles” , buffer_mode = ”sparse” , mapping_sparse = list ( ”pts100_sauzeme.parquet” = c ( 500 , 1250 ), ”pts300_sauzeme.parquet” = 3000 , ”pts1000_sauzeme.parquet” = 10000 ), split_field = ”tks50km” , n_workers = 4 , future_max_mem_gb = 4 , overwrite = FALSE , quiet = FALSE ) Expect to see warning: This is an initial implementation of Parquet/Feather file support and geo metadata. This is tracking version 0.1.0 of the metadata (https://github.com/geopandas/geo-arrow- spec). This metadata specification may change and does not yet make stability promises. We do not yet recommend using this in a production setting unless you are able to rewrite your Parquet/Feather files. Appearance of file pts300_r3000_NA.parquet , i.e. without a tile number , is expected, due to slight mismatch of 300 m grid with the 50 km one. 3.2 Raster data Baseline template (or reference) raster grid and point files are publically available in the HiQBioDiv’ s Zenodo repository . The command lines and data used to create these files are documented in the HiQBioDiv main code repository’ s file . The easiest way to obtain these files is to run determined function download_raster_templates() from {egv- tools}. if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} download_raster_templates ( url = ”https://zenodo.org/api/records/14497070/files-archive” , out_dir = ”./Templates/TemplateRasters” , overwrite = TRUE , quiet = FALSE ) During EGV creation, background filling to handle missing values may be necessary . For all EGVs de- scribed in this document where such an exercise might be required, the variables can be considered quantities of ratio scale, therefore backgrounds with value 0 are created. if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} 30 create_backgrounds ( in_dir= ”./Templates/TemplateRasters/” , out_dir = ”./Templates/TemplateRasters/” , background_value = 0 , out_prefix = ”nulls_” , overwrite= TRUE ) 31 32 Chapter 4 Raw geodata This chapter describes raw geodata used and the preliminary processing conducted on them. 4.1 State For est Service’ s State For est Register The State Forest Service’ s State Forest Register database (ESRI file geodatabase), which compiles indi- cators and spatial data characterizing forest compartments (stand level inventory database), was received by the University of Latvia on January 7, 2024, to support study and research processes. The structure of the received database version corresponds to the State Forest Register Forest Inventory File Structure , but lowercase letters are used in field names. After downloading, the CRS is guarded, geometries are checked and saved in GeoParquet format. Files are stored at Geodata/2024/MVR/ . # libs if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (gdalUtilities)) { install.packages ( ”gdalUtilities” ) ; require (gdalUtilities)} # database nog = read_sf ( ”./Geodata/2024/MVR/VMD.gdb/” , layer= ”Nogabali_pilna_datubaze” ) # ensuring geometries source ( ”./RScripts_final/egvs02.02_UtilityFunctions.R” ) nogabali <- ensure_multipolygons (nog) # securing geometries nogabali2 = nogabali[ ! st_is_empty (nogabali),,drop =FALS E ] # 108 tukšas ģeometrijas validity = st_is_valid (nogabali2) table (validity) # 1733 invalid ģeometrijas nogabali3 = st_make_valid (nogabali2) # transforming CRS nogabali4 = st_transform (nogabali3, crs= 3059 ) # saving sfarrow :: st_write_parquet (nogabali4, ”./Geodata/2024/MVR/nogabali_2024ja nv.parquet” ) 4.2 Rural Support Service’ s information on declar ed fields The Rural Support Service maintains regularly updated information on their open data portal . An archive (since 2016) is also available there, and the data of interest contain the keyword “deklarētās platības”. 33 After downloading files to Geodata/2024/LAD/downloads/ , they are unzipped and read into R. Files are checked, empty geometries are deleted and the rest are validated. Then, all individual files are combined into one, which is saved in GeoPackage and GeoParquet formats at Geodata/2024/LAD/ . At the end, downloaded files are unlinked. # libs if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (gdalUtilities)) { install.packages ( ”gdalUtilities” ) ; require (gdalUtilities)} # reading all fi les faili = data.frame ( celi= list.files ( ”./Geodata/2024/LAD/downloads” , full.names = TRUE )) dati = st_read (faili $ celi[ 1 ]) for (i in 2 : length (faili $ celi)){ nakosais = st_read (faili $ celi[i]) dati = bind_rows (dati,nakosais) print ( nrow (dati)) } # ensuring geometries source ( ”./RScripts_final/egvs02.02_UtilityFunctions.R” ) nogabali <- ensure_multipolygons (nog) dati2 <- ensure_multipolygons (dati) dati3 = dati2[ ! st_is_empty (dati2),,drop =FALSE ] # viss kārtībā table ( st_is_valid (dati3)) dati4 = st_make_valid (dati3) table ( st_is_valid (dati4)) dati5 <- ensure_multipolygons (dati4) table ( st_is_valid (dati5)) # saving output st_write (dati5, ”./Geodata/2024/LAD/Lauki_2024.gpkg” , append = FALSE ) sfarrow :: st_write_parquet (dati5, ”./Geodata/2024/LAD/Lauki_2024.parq uet” ) # unlinking downloads for (i in seq_along (faili $ celi)){ unlink (faili $ celi[i]) } rm ( list= ls ()) 4.3 Melioration Cadaster The Land Improvement Cadastre Information System database was downloaded layer by layer from Geoserver . Geometries were tested and validated for each layer , and layers were all combined into a single GeoPackage file stored at Geodata/2024/MKIS/ . Initially , no additional processing was performed on this data. It was used to prepare Geodata products - both T errain products and Landscape classification . # libs if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (httr)) { install.packages ( ”httr” ); require (httr)} if ( ! require (ows4R)) { install.packages ( ”ows4R” ); require (ows4R)} # basis information ---- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , #version = ”2.0.0”, # facultative request = ”GetCapabilities” ) 34 request <- build_url (url) request bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client bwk_client $ getFeatureTypes ( pretty = TRUE ) # dams ---- bwk_client $ getFeatureTypes ( pretty = TRUE ) url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_dam” ) request <- build_url (url) aizsargdambji <- read_sf (request) aizsargdambji = aizsargdambji %>% st_set_crs ( st_crs ( 3059 )) aizsargdambji = st_cast (aizsargdambji, ”MULTILINESTRING” ) ggplot (aizsargdambji) + geom_sf () table ( st_is_valid (aizsargdambji)) write_sf (aizsargdambji, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”Aizsargdambji” , append= FALSE ) rm (aizsargdambji) # watercourses ---- bwk_client $ getFeatureTypes ( pretty = TRUE ) url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_watercourses” ) request <- build_url (url) DabiskasUdensteces <- read_sf (request) DabiskasUdensteces = DabiskasUdensteces %>% st_set_crs ( st_crs ( 3059 )) DabiskasUdensteces = st_cast (DabiskasUdensteces, ”MULTILINESTRING” ) ggplot (DabiskasUdensteces) + geom_sf () table ( st_is_valid (DabiskasUdensteces)) write_sf (DabiskasUdensteces, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”DabiskasUdensteces” , append= FALSE ) rm (DabiskasUdensteces) # dam pickets -- -- bwk_client $ getFeatureTypes ( pretty = TRUE ) url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_dampicket” ) request <- build_url (url) DambjuPiketi <- read_sf (request) 35 DambjuPiketi = DambjuPiketi %>% st_set_crs ( st_crs ( 3059 )) DambjuPiketi = st_cast (DambjuPiketi, ”POINT” ) ggplot (DambjuPiketi) + geom_sf () table ( st_is_valid (DambjuPiketi)) write_sf (DambjuPiketi, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”DambjuPiketi” , append= FALSE ) rm (DambjuPiketi) # drainpipes ---- bwk_client $ getFeatureTypes ( pretty = TRUE ) base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_drainpipes” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_Drenas” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) %>% st_cast ( ”MULTILINESTRING” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) Drenas_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , 36 layer= ”temp_Drenas” ) Drenas_all2 = Drenas_all[ ! st_is_empty (Drenas_all),,drop =FALS E ] # 1 table ( st_is_valid (Drenas_all2)) write_sf (Drenas_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”Drenas” , append= FALSE ) rm ( list= ls ()) # drain collectors ---- bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms bwk_client $ getFeatureTypes ( pretty = TRUE ) url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_draincollectors” , count= 1 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam # count url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_draincollectors” , resultType= ”hits” ) request <- build_url (url) result <- GET (request) parsed <- xml2 :: as_list ( content (result, ”parsed” )) n_features <- attr (parsed $ FeatureCollection, ”numberMatched” ) n_features # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_draincollectors” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_DrenuKolektori” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) 37 req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) %>% st_cast ( ”MULTILINESTRING” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) DrenuKolektori_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_DrenuKolektori” ) DrenuKolektori_all2 = DrenuKolektori_all[ ! st_is_empty (DrenuKolektori_all),,drop = FALSE ] # 1 table ( st_is_valid (DrenuKolektori_all2)) write_sf (DrenuKolektori_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”DrenuKolektori” , append= FALSE ) rm ( list= ls ()) # drenage network structures ---- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_networkstructures” , count= 1 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam 38 # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_networkstructures” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_DrenazasTiklaBuves” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) %>% st_cast ( ”POINT” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) DrenazasTiklaBuves_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_DrenazasTiklaBuves” ) DrenazasTiklaBuves_all2 = DrenazasTiklaBuves_all[ ! st_is_empty (DrenazasTiklaBuves_all),,drop =FALSE ] # 0 ↪ table ( st_is_valid (DrenazasTiklaBuves_all2)) write_sf (DrenazasTiklaBuves_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”DrenazasTiklaBuves” , append= FALSE ) rm ( list= ls ()) # dithces ----- 39 link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_ditches” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_ditches” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_Gravji” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) %>% st_cast ( ”MULTILINESTRING” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) 40 i <- i + 1 }, silent = TRUE ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) Gravji_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_Gravji” ) Gravji_all2 = Gravji_all[ ! st_is_empty (Gravji_all),,drop =FALS E ] # 0 table ( st_is_valid (Gravji_all2)) write_sf (Gravji_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”Gravji” , append= FALSE ) rm ( list= ls ()) # hydrometric posts ---- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_hydropost” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_hydropost” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./IevadesDati/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_HidrometriskiePosteni” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, 41 startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) %>% st_cast ( ”POINT” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) HidrometriskiePosteni_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_HidrometriskiePosteni” ) HidrometriskiePosteni_all2 = HidrometriskiePosteni_all[ ! st_is_empty (HidrometriskiePosteni_all),,drop = FALSE ] # 0 ↪ table ( st_is_valid (HidrometriskiePosteni_all2)) write_sf (HidrometriskiePosteni_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”HidrometriskiePosteni” , append= FALSE ) rm ( list= ls ()) # large diameter drain collectors ---- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_bigdraincollectors” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam 42 # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_bigdraincollectors” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_LielaDiametraKolektori” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) %>% st_cast ( ”MULTILINESTRING” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) LielaDiametraKolektori_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_LielaDiametraKolektori” ) LielaDiametraKolektori_all2 = LielaDiametraKolektori_all[ ! st_is_empty (LielaDiametraKolektori_all),,drop = FALSE ] # 0 ↪ table ( st_is_valid (LielaDiametraKolektori_all2)) write_sf (LielaDiametraKolektori_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”LielaDiametraKolektori” , append= FALSE ) rm ( list= ls ()) 43 # river pickets ---- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_stateriverspickets” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_stateriverspickets” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_Piketi” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) %>% st_cast ( ”POINT” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, 44 append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) Piketi_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_Piketi” ) Piketi_all2 = Piketi_all[ ! st_is_empty (Piketi_all),,drop =FALS E ] # 0 table ( st_is_valid (Piketi_all2)) write_sf (Piketi_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”Piketi” , append= FALSE ) rm ( list= ls ()) # polder pumping stations ----- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_polderpumpingstation” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_polderpumpingstation” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_PolderuSuknuStacijas” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, 45 srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) %>% st_cast ( ”POINT” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) PolderuSuknuStacijas_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_PolderuSuknuStacijas” ) PolderuSuknuStacijas_all2 = PolderuSuknuStacijas_all[ ! st_is_empty (PolderuSuknuStacijas_all),,drop = FALSE ] # 0 ↪ table ( st_is_valid (PolderuSuknuStacijas_all2)) write_sf (PolderuSuknuStacijas_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”PolderuSuknuStacijas” , append= FALSE ) rm ( list= ls ()) # polders ----- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_polderterritory” , count= 100 ) request <- build_url (url) 46 geometrijam <- read_sf (request) geometrijam geometrijas = st_set_crs (geometrijam, st_crs ( 3059 )) library (gdalUtilities) ensure_multipolygons <- function (X) { tmp1 <- tempfile ( fileext = ”.gpkg” ) tmp2 <- tempfile ( fileext = ”.gpkg” ) st_write (X, tmp1) ogr2ogr (tmp1, tmp2, f = ”GPKG” , nlt = ”MULTIPOLYGON” ) Y <- st_read (tmp2) st_sf ( st_drop_geometry (X), geom = st_geometry (Y)) } poligoni <- ensure_multipolygons (geometrijas) PolderuTeritorijas_all2 = poligoni[ ! st_is_empty (poligoni),,drop =FALSE ] # 0 table ( st_is_valid (PolderuTeritorijas_all2)) # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_polderterritory” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_PolderuTeritorijas” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) %>% st_cast ( ”MULTIPOLYGON” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) Sys.sleep ( 0.5 ) } 47 message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) PolderuTeritorijas_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_PolderuTeritorijas” ) PolderuTeritorijas_all2 = PolderuTeritorijas_all[ ! st_is_empty (PolderuTeritorijas_all),,drop =FALSE ] # 0 ↪ table ( st_is_valid (PolderuTeritorijas_all2)) write_sf (PolderuTeritorijas_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”PolderuTeritorijas” , append= FALSE ) rm ( list= ls ()) # catchment basins ---- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_catchment” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_catchment” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_SatecesBaseini” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) 48 req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) ensure_multipolygons <- function (X) { tmp1 <- tempfile ( fileext = ”.gpkg” ) tmp2 <- tempfile ( fileext = ”.gpkg” ) st_write (X, tmp1) ogr2ogr (tmp1, tmp2, f = ”GPKG” , nlt = ”MULTIPOLYGON” ) Y <- st_read (tmp2) st_sf ( st_drop_geometry (X), geom = st_geometry (Y)) } chunk <- ensure_multipolygons (chunk) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) Sys.sleep ( 0.5 ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) SatecesBaseini_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_SatecesBaseini” ) SatecesBaseini_all2 = SatecesBaseini_all[ ! st_is_empty (SatecesBaseini_all),,drop = FALSE ] # 0 table ( st_is_valid (SatecesBaseini_all2)) SatecesBaseini_all3 = st_make_valid (SatecesBaseini_all2) table ( st_is_valid (SatecesBaseini_all3)) SatecesBaseini_all3 write_sf (SatecesBaseini_all3, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”SatecesBaseini” , append= FALSE ) rm ( list= ls ()) # drenage connection points ---- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) 49 # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_connectionpoints” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_connectionpoints” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_Savienojumi” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) chunk = st_cast (chunk, ”POINT” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) Sys.sleep ( 0.5 ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) Savienojumi_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , 50 layer= ”temp_Savienojumi” ) Savienojumi_all2 = Savienojumi_all[ ! st_is_empty (Savienojumi_all),,drop =F ALSE ] # 0 table ( st_is_valid (Savienojumi_all2)) write_sf (Savienojumi_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”Savienojumi” , append= FALSE ) rm ( list= ls ()) # state controlled rivers ----- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_statecontrolledrivers” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_statecontrolledrivers” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_ValstsNozimesUdensnotekas” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break 51 # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) chunk = st_cast (chunk, ”MULTILINESTRING” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) Sys.sleep ( 0.5 ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) ValstsNozimesUdensnotekas_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_ValstsNozimesUdensnotekas” ) ValstsNozimesUdensnotekas_all2 = ValstsNozimesUdensnotekas_all[ ! st_is_empty (ValstsNozimesUdensnotekas_all),,drop =FALSE ] # 0 ↪ ↪ table ( st_is_valid (ValstsNozimesUdensnotekas_all2)) write_sf (ValstsNozimesUdensnotekas_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”ValstsNozimesUdensnotekas” , append= FALSE ) rm ( list= ls ()) # zmni regions ---- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_zmniregion” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam library (gdalUtilities) 52 # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_zmniregion” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_ZMNIRegions” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) ensure_multipolygons <- function (X) { tmp1 <- tempfile ( fileext = ”.gpkg” ) tmp2 <- tempfile ( fileext = ”.gpkg” ) st_write (X, tmp1) ogr2ogr (tmp1, tmp2, f = ”GPKG” , nlt = ”MULTIPOLYGON” ) Y <- st_read (tmp2) st_sf ( st_drop_geometry (X), geom = st_geometry (Y)) } chunk <- ensure_multipolygons (chunk) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) Sys.sleep ( 0.5 ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) ZMNIRegions_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_ZMNIRegions” ) ZMNIRegions_all2 = ZMNIRegions_all[ ! st_is_empty (ZMNIRegions_all),,drop =F ALSE ] # 0 table ( st_is_valid (ZMNIRegions_all2)) 53 write_sf (ZMNIRegions_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”ZMNIRegions” , append= FALSE ) rm ( list= ls ()) # water drenage ditches ----- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_waterdrainditches” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_waterdrainditches” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_UdensnotekasNovadgravji” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) 54 chunk = st_cast (chunk, ”MULTILINESTRING” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) Sys.sleep ( 0.5 ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) UdensnotekasNovadgravji_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_UdensnotekasNovadgravji” ) UdensnotekasNovadgravji_all2 = UdensnotekasNovadgravji_all[ ! st_is_empty (UdensnotekasNovadgravji_all),,drop = FALSE ] # 0 ↪ table ( st_is_valid (UdensnotekasNovadgravji_all2)) write_sf (UdensnotekasNovadgravji_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”UdensnotekasNovadgravji” , append= FALSE ) rm ( list= ls ()) # ditch pickets ---- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_ditchpicket” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_ditchpicket” 55 crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_UdensnotekuNovadgravjuPiketi” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) %>% st_cast ( ”POINT” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) UdensnotekuNovadgravjuPiketi_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_UdensnotekuNovadgravjuPiketi” ) UdensnotekuNovadgravjuPiketi_all2 = UdensnotekuNovadgravjuPiketi_all[ ! st_is_empty ⌋ (UdensnotekuNovadgravjuPiketi_all),,drop =FALS E ] # 0 ↪ table ( st_is_valid (UdensnotekuNovadgravjuPiketi_all2)) write_sf (UdensnotekuNovadgravjuPiketi_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”UdensnotekuNovadgravjuPiketi” , append= FALSE ) rm ( list= ls ()) # state river axis ---- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) 56 url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_stateriversline” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_stateriversline” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_UdenstecuAsis” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) chunk = st_cast (chunk, ”MULTILINESTRING” ) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) Sys.sleep ( 0.5 ) 57 } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) UdenstecuAsis_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_UdenstecuAsis” ) UdenstecuAsis_all2 = UdenstecuAsis_all[ ! st_is_empty (UdenstecuAsis_all),,drop = FALSE ] # 0 table ( st_is_valid (UdenstecuAsis_all2)) write_sf (UdenstecuAsis_all2, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”UdenstecuAsis” , append= FALSE ) rm ( list= ls ()) # river surface ---- link = ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” url = parse_url (link) url $ query <- list ( service = ”wfs” , request = ”GetCapabilities” ) request <- build_url (url) bwk_client <- WFSClient $ new (link, serviceVersion = ”2.0.0” ) bwk_client $ getFeatureTypes ( pretty = TRUE ) # geoms url $ query <- list ( service = ”wfs” , request = ”GetFeature” , srsName= ”EPSG:3059” , typename = ”zmni:zmni_stateriverspolygon” , count= 100 ) request <- build_url (url) geometrijam <- read_sf (request) geometrijam # download base_url <- ”https://lvmgeoserver.lvm.lv/geoserver/zmni/ows?” type_name <- ”zmni:zmni_stateriverspolygon” crs_code <- 3059 chunk_size <- 100000 gpkg_path <- ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” layer_name <- ”temp_UdenstecuVirsmasLaukumi” i <- 0 repeat { message ( ”Fetching features ” , i * chunk_size + 1 , ” to ” , (i + 1 ) * chunk_si ze, ”...” ) query <- list ( service = ”WFS” , version = ”2.0.0” , request = ”GetFeature” , typename = type_name, srsName = paste0 ( ”EPSG:” , crs_code), count = chunk_size, startIndex = i * chunk_size ) 58 req_url <- modify_url (base_url, query = query) try ({ chunk <- read_sf (req_url) if ( nrow (chunk) == 0 ) break # Set CRS and cast to MULTILINESTRING, POINT, MULTIPOLYGON chunk <- chunk %>% st_set_crs ( st_crs (crs_code)) ensure_multipolygons <- function (X) { tmp1 <- tempfile ( fileext = ”.gpkg” ) tmp2 <- tempfile ( fileext = ”.gpkg” ) st_write (X, tmp1) ogr2ogr (tmp1, tmp2, f = ”GPKG” , nlt = ”MULTIPOLYGON” ) Y <- st_read (tmp2) st_sf ( st_drop_geometry (X), geom = st_geometry (Y)) } chunk <- ensure_multipolygons (chunk) # Write chunk to GeoPackage (append mode after first) st_write ( chunk, dsn = gpkg_path, layer = layer_name, append = i != 0 , quiet = FALSE ) i <- i + 1 }, silent = TRUE ) Sys.sleep ( 0.5 ) } message ( ”All chunks written to ” , gpkg_path, ” in layer ” , layer_name) UdenstecuVirsmasLaukumi_all = st_read ( ”./Geodata/2024/MKIS/temp_MKIS_2025.gpkg” , layer= ”temp_UdenstecuVirsmasLaukumi” ) UdenstecuVirsmasLaukumi_all2 = UdenstecuVirsmasLaukumi_all[ ! st_is_empty (UdenstecuVirsmasLaukumi_all),,drop = FALSE ] # 0 ↪ table ( st_is_valid (UdenstecuVirsmasLaukumi_all2)) UdenstecuVirsmasLaukumi_all3 = st_make_valid (UdenstecuVirsmasLaukumi_all2) table ( st_is_valid (UdenstecuVirsmasLaukumi_all3)) write_sf (UdenstecuVirsmasLaukumi_all3, ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”UdenstecuVirsmasLaukumi” , append= FALSE ) rm ( list= ls ()) 4.4 T opographic Map T o support research process at the University of Latvia, the third (completed by January 1, 2018) and fourth (unfinished) versions of the Latvian Geospatial Information Agency’ s topographic map M:10000 vector geodatabase were received. The most recent version is available for public viewing , but access to the vector data is restricted. For the purposes of this project, the ESRI geodatabase has been converted to a GeoPackage file. As part of the file format change, geometries (empty , their validity checked and corrected where necessary) and coordinate system have been checked. 59 Files were stored at Geodata/2024/TopographicMap/ . After processing each database separately , we combined the layers used in this project, selecting the most recent layer per map sheet. These layers are: • brigde_L , describing bridges as lines; • bridge_P , describing bridges as points; • hidro_A , describing waterbodies as polygons; • hidro_L , describing ditches and small rivers as lines; • landus_A , describing LULC as polygons; • road_A , describing larger roads as polygons; • road_L , including very small or disused ones, as lines; • swamp_A , describing bogs as polygons; • flora_L , describing linear tree and shrub formations; • build_A , describing types of built-up areas. V ersion 4 available at the University of Latvia does not include all the classes present in V ersion 3, therefore version 3 is used. # libs ---- if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (openxlsx)) { install.packages ( ”openxlsx” ); require (ope nxlsx)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} # v4 ---- slani_v4 = st_layers ( ”./Geodata/2024/TopographicMap/Latvija_LKS92_v4_20250703.gdb/” ) write.xlsx (slani_v4, ”./Geodata/2024/TopographicMap/slani_v4partial.xlsx” ) slani_v4 $ geometrijai = as.character (slani_v4 $ geomtype) table (slani_v4 $ geometrijai) slani_v4 $ geometrijai2 = ifelse (slani_v4 $ geometrijai == ”3D Point” , ”POINT” , ifelse (slani_v4 $ geometrijai == ”Multi Polygon” , ”MULTIPOLYGON” , ifelse (slani_v4 $ geometrijai == ”3D Multi Line String” , ”MULTILINESTRING” , ifelse (slani_v4 $ geometrijai == ”3D Multi Polygon” , ”MULTIPOLYGON” , NA )))) slani4x = data.frame ( name= slani_v4 $ name, geometrija= slani_v4 $ geometrijai2) ciklam4x = levels ( factor (slani4x $ name)) for (i in seq_along (ciklam4x)){ print (i) sakums = Sys.time () nosaukums = ciklam4x[i] objekts = slani4x %>% filter (name == nosaukums) print (nosaukums) slanis = read_sf ( ”./Geodata/2024/TopographicMap/topo10v4/Latvija_LKS92_v4_20250703.gdb/” , layer= nosaukums) slanisZM = st_zm (slanis) slanis2 = st_cast (slanisZM, to= objekts $ geometrija) write_sf (slanis2, ”./Geodata/2024/TopographicMap/LGIAtopo10K_v4partial.gpkg” , layer= nosaukums, append= FALSE ) ilgums = Sys.time () - sakums print (ilgums) } 60 # v3 ---- slani_v3 = st_layers ( ”./Geodata/2024/TopographicMap/Latvija_LKS92_v3_pilnais.gdb/” ) write.xlsx (slani_v3, ”./Geodata/2024/TopographicMap/slani_v3.xlsx” ) slani_v3 $ geometrijai = as.character (slani_v3 $ geomtype) table (slani_v3 $ geometrijai) slani_v3 $ geometrijai2 = ifelse (slani_v3 $ geometrijai == ”3D Point” , ”POINT” , ifelse (slani_v3 $ geometrijai == ”Multi Polygon” , ”MULTIPOLYGON” , ifelse (slani_v3 $ geometrijai == ”3D Multi Line String” , ”MULTILINESTRING” , ifelse (slani_v3 $ geometrijai == ”3D Multi Polygon” , ”MULTIPOLYGON” , ifelse (slani_v3 $ geometrijai == ”Point” , ”POINT” , ifelse (slani_v3 $ geometrijai == ”Multi Line String” , ↪ ”MULTILINESTRING” , ifelse (slani_v3 $ geometrijai == ”3D Measured Point” , ↪ ”POINT” , NA ))))))) slani3x = data.frame ( name= slani_v3 $ name, geometrija= slani_v3 $ geometrijai2) ciklam3x = levels ( factor (slani3x $ name)) for (i in seq_along (ciklam3x)){ print (i) sakums = Sys.time () nosaukums = ciklam3x[i] objekts = slani3x %>% filter (name == nosaukums) print (nosaukums) slanis = read_sf ( ”./Geodata/2024/TopographicMap/Latvija_LKS92_v3_pilnais.gdb/” , layer= nosaukums) slanisZM = st_zm (slanis) slanis2 = st_cast (slanisZM, to= objekts $ geometrija) write_sf (slanis2, ”./Geodata/2024/TopographicMap/LGIAtopo10K_v3.gpkg” , layer= nosaukums, append= FALSE ) ilgums = Sys.time () - sakums print (ilgums) } # combination ---- st_layers ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v3.gpkg” ) pages4 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v4partial.gpkg” , layer= ”Topo10_lapas” ) pages4_united = st_union (pages4) ggplot (pages4_united) + geom_sf () # landus_A landus_3 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v3.gpkg” , layer= ”landus_A” ) landus_not4 = st_difference (landus_3,pages4_united) landus_not4 = landus_not4 %>% dplyr :: select (FNAME,FCODE) landus_4 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v4partial.gpkg” , layer= ”landus_A” ) landus_4 = landus_4 %>% 61 dplyr :: select (FNAME,FCODE) landus_new = rbind (landus_not4,landus_4) sfarrow :: st_write_parquet (landus_new, ”./Geodata/2024/TopographicMap/ LandusA_COMB.parquet” ) # bridge_L data_3 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v3.gpkg” , layer= ”bridge_L” ) data_not4 = st_difference (data_3,pages4_united) data_not4 = data_not4 %>% dplyr :: select (FNAME,FCODE) data_4 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v4partial.gpkg” , layer= ”bridge_L” ) data_4 = data_4 %>% dplyr :: select (FNAME,FCODE) data_new = rbind (data_not4,data_4) sfarrow :: st_write_parquet (data_new, ”./Geodata/2024/TopographicMap/ BridgeL_COMB.parquet” ) # bridge_P data_3 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v3.gpkg” , layer= ”bridge_P” ) data_not4 = st_difference (data_3,pages4_united) data_not4 = data_not4 %>% dplyr :: select (FNAME,FCODE) data_4 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v4partial.gpkg” , layer= ”bridge_P” ) data_4 = data_4 %>% dplyr :: select (FNAME,FCODE) data_new = rbind (data_not4,data_4) sfarrow :: st_write_parquet (data_new, ”./Geodata/2024/TopographicMap/ BridgeP_COMB.parquet” ) # hidro_A data_3 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v3.gpkg” , layer= ”hidro_A” ) data_not4 = st_difference (data_3,pages4_united) data_not4 = data_not4 %>% dplyr :: select (FNAME,FCODE) data_4 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v4partial.gpkg” , layer= ”hidro_A” ) data_4 = data_4 %>% dplyr :: select (FNAME,FCODE) data_new = rbind (data_not4,data_4) sfarrow :: st_write_parquet (data_new, ”./Geodata/2024/TopographicMap/ HidroA_COMB.parquet” ) # hidro_L data_3 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v3.gpkg” , layer= ”hidro_L” ) data_not4 = st_difference (data_3,pages4_united) data_not4 = data_not4 %>% dplyr :: select (FNAME,FCODE) data_4 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v4partial.gpkg” , layer= ”hidro_L” ) data_4 = data_4 %>% dplyr :: select (FNAME,FCODE) data_new = rbind (data_not4,data_4) sfarrow :: st_write_parquet (data_new, ”./Geodata/2024/TopographicMap/ HidroL_COMB.parquet” ) # road_A data_3 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v3.gpkg” , layer= ”road_A” ) data_not4 = st_difference (data_3,pages4_united) 62 data_not4 = data_not4 %>% dplyr :: select (FNAME,FCODE) data_4 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v4partial.gpkg” , layer= ”road_A” ) data_4 = data_4 %>% dplyr :: select (FNAME,FCODE) data_new = rbind (data_not4,data_4) sfarrow :: st_write_parquet (data_new, ”./Geodata/2024/TopographicMap/ RoadA_COMB.parquet” ) # road_L data_3 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v3.gpkg” , layer= ”road_L” ) data_not4 = st_difference (data_3,pages4_united) data_not4 = data_not4 %>% dplyr :: select (FNAME,FCODE) data_4 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v4partial.gpkg” , layer= ”road_L” ) data_4 = data_4 %>% dplyr :: select (FNAME,FCODE) data_new = rbind (data_not4,data_4) sfarrow :: st_write_parquet (data_new, ”./Geodata/2024/TopographicMap/ RoadL_COMB.parquet” ) # swamp_A data_3 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v3.gpkg” , layer= ”swamp_A” ) data_not4 = st_difference (data_3,pages4_united) data_not4 = data_not4 %>% dplyr :: select (FNAME,FCODE) data_4 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v4partial.gpkg” , layer= ”swamp_A” ) data_4 = data_4 %>% dplyr :: select (FNAME,FCODE) data_new = rbind (data_not4,data_4) sfarrow :: st_write_parquet (data_new, ”./Geodata/2024/TopographicMap/ SwampA_COMB.parquet” ) # flora_L data_3 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v3.gpkg” , layer= ”flora_L” ) data_not4 = st_difference (data_3,pages4_united) data_not4 = data_not4 %>% dplyr :: select (FNAME,FCODE) data_4 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v4partial.gpkg” , layer= ”flora_L” ) data_4 = data_4 %>% dplyr :: select (FNAME,FCODE) data_new = rbind (data_not4,data_4) sfarrow :: st_write_parquet (data_new, ”./Geodata/2024/TopographicMap/ FloraL_COMB.parquet” ) # build_A data_3 = st_read ( ”./Geodata/2024/TopographicMap/LGIAtopo10K_v3.gpkg” , layer= ”build_A” ) data_3 = data_3 %>% dplyr :: select (FNAME,FCODE) sfarrow :: st_write_parquet (data_3, ”./Geodata/2024/TopographicMap/Buil dA_v3.parquet” ) 63 4.5 Corine Land Cover 2018 Corine Land Cover is a publicly available geodata that characterizes land cover and land use (LULC) across Europe over a long period of time using a generally consistent (comparable) methodology , providing results for individual years - 1990, 2000, 2006, 2012, 2018. Although the dataset has a coarse resolution – the mapping unit is 25 ha areas that are at least 100 m wide – it provides suf ficient information for general use, such as workflow testing and observation filtering. This project uses data from 2018. The downloaded data set has been transformed into the Latvian coordinate system (EPSG:3059), and the file format has been changed to GeoParquet to facilitate and speed up further work. As part of the file format change, geometries (empty , valid) have been checked. Data are stored at Geodata/2024/CLC/ . # libs ---- if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} # downloaded data clcLV = st_read ( ”./Geodata/2024/CLC/clcLV.gpkg” , layer= ”clcLV” ) # empty geoms clcLV2 = clcLV[ ! st_is_empty (clcLV),,drop =FALSE ] # OK # validation validity = st_is_valid (clcLV2) table (validity) # 3 non-valid clcLV3 = st_make_valid (clcLV2) # crs clcLV3 = st_transform (clcLV3, crs= 3059 ) # saving sfarrow :: st_write_parquet (clcLV3, ”./Geodata/2024/CLC/CLC_LV_2018.parquet ” ) 4.6 Publicly available L VM data Latvian State Forests geospatial data on forest infrastructure and its description . The following datasets were used in the project: • roads: – forest roads; – forest roads to be developed; – turning areas; – changeover areas; – driveways; • drainage systems: – ditches; – drainage systems; – renovated drainage facilities. Initially , no additional processing of this data was performed. It was used to prepare geodata products (more specifically , Landscape classification ). Data were downloaded to Geodata/2024/LVM_OpenData 64 4.7 Soil data Directory Geodata/2024/Soils/ contains various soil related datasets that need to be combined (soil texture) or can be used individually (soil chemistry). These datasets and their location in the file tree are documented in following subchapters. 4.7.1 Soil chemistry Data on soil chemistry are obtained from European Soil Data Centre’ s European Soil database (Panagos et al., 2022). Dataset decribing soil chemistry is derived from LUCAS 2009/2012 topsoil data . There are several chemical properties available for download, however not all of them were choser by experts for SDM: • “P”: used; • “N”: used; • “K”: used; • “CEC”: not used; • “CN”: used; • “pH_CaCl”: not used; • “ph_H2O_ration_ph_CaCl”: not used; • “pH_H2O”: used; • “CaCO3”: used. Files were downloaded to Geodata/2024/Soils/ESDAC/chemistry/ and no preprocessing was carried out. 4.7.2 Soil textur e: Eur ope Data on soil texture were obtained from European Soil Data Centre’ s European Soil database (Panagos et al., 2022). Dataset is available as European Soil Database v2 Raster Library 1kmx1km . There are several properties available for download, TXT was used to create soil texture product . Files were downloaded to Geodata/2024/Soils/ESDAC/texture/ . During the preprocessing (see code below) the layer was projected to match the 10 m template with “near” as interpolation method, value 0 substituted with NA and the result wars masked and cropped to the template. Result was saved for further processing. # libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} # Template ---- template10 = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # ESDAC texture ---- sdTEXT = rast ( paste0 ( ”./Geodata/2024/Soils/ESDAC/texture/SoilDatabaseV2_raster/” , ”ESDB-Raster-Library-1k-GeoTIFF-20240507/TEXT/TEXT.tif” )) plot (sdTEXT) sdTEXT = project (sdTEXT,template10, method= ”near” ) plot (sdTEXT) sdTEXT = subst (sdTEXT, 0 , NA ) 65 plot (sdTEXT) sdTEXT2 = mask (sdTEXT,template10, filename= ”./RasterGrids_10m/2024/SoilTXT_ESDAC.tif” , overwrite= TRUE ) plot (sdTEXT2) 4.7.3 Soil textur e: Farmland T opsoil characteristics in Latvia were mapped in the mid-20th century , almost exclusively in farmlands. W ith time, data were digitised and combined with some other information resulting in artefacts. There- fore preprocessing was necessary . The version we used was obtained from the project “GOODW A TER” C1D1_Deliverable_R2. File is stored at Geodata/2024/Soils/TopSoil_LV/ . Preprocessing included: • reclassification based on the field GrSast : – sand (1): “mS”, “mSp”, “S”, “sS”, “iS”, “Gr”, “mGr”, “D”; – silt (2): “sM”, “sMp”, “sM2”, “sMp2”, “sM3”, “sMp3”; – clay (3): “M”,“M1”,“Mp”,“M2”,“sM1”,“sMp1”; – organic (4): “l”, “vd”, “vj”, “n”,“T”; – and other categories were left unclassified. • coordinate transformation to EPSG:3059; • invsestigation of the resulting layer looking for anomalies by scrolling in interactive GIS, which led to exclusion of land parcels lar ger than 200 ha. • rasterisation to match the 10 m template with the highest class code prevailing. # libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} # Template ---- template10 = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # Farmland soil texture ---- augsnes = st_read ( ”./Geodata/2024/Soils/TopSoil_LV/soil.gpkg” , layer= ”soilunion” ) # calculate parcels area augsnes $ platiba_ha = as.numeric ( st_area (augsnes)) / 10000 # only parcels with existing information on texture tuksas = augsnes %>% filter (GrSast == ”” ) # classification clay = c ( ”M” , ”M1” , ”Mp” , ”M2” , ”sM1” , ”sMp1” ) silt = c ( ”sM” , ”sMp” , ”sM2” , ”sMp2” , ”sM3” , ”sMp3” ) sand = c ( ”mS” , ”mSp” , ”S” , ”sS” , ”iS” , ”Gr” , ”mGr” , ”D” ) peat = c ( ”l” , ”vd” , ”vj” , ”n” , ”T” ) augsnes = augsnes %>% mutate ( grupas= case_when (GrSast %in% sand ~ ”Sand” , GrSast %in% silt ~ ”Silt” , GrSast %in% clay ~ ”Clay” , GrSast %in% peat ~ ”organika” , 66 .default= NA )) %>% mutate ( grupas_num= case_when (GrSast %in% sand ~ ”1” , GrSast %in% silt ~ ”2” , GrSast %in% clay ~ ”3” , GrSast %in% peat ~ ”4” , .default= NA )) # crs augsnes_3059 = st_transform (augsnes, crs= 3059 ) # only existing texture classification augsnes_3059 = augsnes_3059 %>% filter ( ! is.na (grupas_num)) # parcels up to 20 0 ha augsnes_3059small = augsnes_3059 %>% filter ( ! is.na (grupas_num)) %>% filter (platiba_ha < 200 ) # rasterisation virsaugsnem2 = rasterize (augsnes_3059small,template10, field= ”grupas_num” , fun= ”max ” , filename= ”./RasterGrids_10m/2024/SoilTXT_topSoilLV.tif” , overwrite= TRUE ) plot (virsaugsnem2) 4.7.4 Soil textur e: Quaternary Data on Quaternary Geology are digitised and stored by the University of Latvia Department of Geology . File is stored at Geodata/2024/Soils/QuaternaryGeology_LV/ . Preprocessing included: • reclassification based on field Litologija : – sand (1): “smilts”, “smilts_aleiritiska”, “smilts_dunjaina”, “smilts_grants”, “smilts_grants_oli”, “smilts_grants_oli_aleirits”, “smilts_kudraina”, “smilts_videjgraudaina, malsmilts”, “smilts_videjgraudaina”~“Sand”; – silt (2): “aleirits”, “aleirits_malains”, “morena”, “smilts_aleirits_mals”, “smilts_aleirits_sapropelis”, “smilts_malaina_dazadgraudaina, malsmilts”; – clay (3): “mals”, “mals_aleiritisks”; – organic (4): “dunjas”, “kudra”; • coordinate transformation to EPSG:3059; • rasterisation to match the 10 m template with the highest class code prevailing. # libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} # Template ---- template10 = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # Quarternary geology ---- kvartars = sfarrow :: st_read_parquet ( ⌋ ”./Geodata/2024/Soils/QuaternaryGeology_LV/Kvartargeologija.parquet” ) ↪ # reclassification kvartars = kvartars %>% 67 mutate ( grupas = case_when (Litologija == ”aleirits” ~ ”Silt” , Litologija == ”aleirits_malains” ~ ”Silt” , Litologija == ”dunjas” ~ ”organika” , Litologija == ”kudra” ~ ”organika” , Litologija == ”mals” ~ ”Clay” , Litologija == ”mals_aleiritisks” ~ ”Clay” , Litologija == ”morena” ~ ”Silt” , Litologija == ”smilts” ~ ”Sand” , Litologija == ”smilts_aleiritiska” ~ ”Sand” , Litologija == ”smilts_aleirits_mals” ~ ”Silt” , Litologija == ”smilts_aleirits_sapropelis” ~ ”Silt” , Litologija == ”smilts_dunjaina” ~ ”Sand” , Litologija == ”smilts_grants” ~ ”Sand” , Litologija == ”smilts_grants_oli” ~ ”Sand” , Litologija == ”smilts_grants_oli_aleirits” ~ ”Sand” , Litologija == ”smilts_kudraina” ~ ”Sand” , Litologija == ”smilts_malaina_dazadgraudaina, malsmilts” ~ ”Silt” , Litologija == ”smilts_videjgraudaina, malsmilts” ~ ”Sand” , Litologija == ”smilts_videjgraudaina” ~ ”Sand” , .default= NA )) # numeric codes kvartars = kvartars %>% mutate ( grupas_num= case_when (grupas == ”Sand” ~ ”1” , grupas == ”Silt” ~ ”2” , grupas == ”Clay” ~ ”3” , grupas == ”organika” ~ ”4” , .default= NA )) # crs transformation kvartars_3059 = st_transform (kvartars, crs= 3059 ) # nonmissing classes kvartars_3059 = kvartars_3059 %>% filter ( ! is.na (grupas_num)) # rasterisation apaksaugsnem = rasterize (kvartars_3059,template10, field= ”grupas_num” , fun= ”max” , filename= ”./RasterGrids_10m/2024/SoilTXT_QuarternaryLV.tif” , overwrite= TRUE ) plot (apaksaugsnem) 4.7.5 Organic soils: SILA V A The distribution of organic soils was modelled under the EU LIFE Programme project “Demonstration of climate change mitigation potential of nutrients rich organic soils in Baltic States and Finland” at the scien- tific institue SILA V A. Results were downloaded and stored at Geodata/2024/Soils/OrganicSoils_SILAVA/ . Even though the layer covers all of Latvia, it has visible inconsistencies, particularly stripes. These were digitised manually (as vector polygons) and masked out as a part of preprocessing. For further soil texture analysis we saved a GeoTIFF file with only presences. # libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} # Template ---- template10 = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # Organic Soils SILAVA ---- organika_silava = rast ( ”./Geodata/2024/Soils/OrganicSoils_SILAVA/Silava_OrgSoils.tif” ) plot (organika_silava) 68 # visible stripes # only 40+ cm deep organika_silava = ifel (organika_silava == 2 , 1 , NA ) organika_silavaLV = project (organika_silava,template10) # stripes drawn manually, rasterisation silavas_telpai = st_read ( ”./Geodata/2024/Soils/OrganicSoils_SILAVA/stripam.gpkg” , layer= ”stripam” ) silavas_telpai = st_transform (silavas_telpai, crs= 3059 ) silavas_telpai $ yes = 1 SilavasTelpa_10 = rasterize (silavas_telpai,template10, field= ”yes” ) # presence-only layer without stripes silava_BezStripam1 = ifel (organika_silavaLV == 1 & SilavasTelpa_10 = = 1 , 1 , NA ) silava_BezStripam = mask (silava_BezStripam1,template10) plot (silava_BezStripam) writeRaster (silava_BezStripam, ”./RasterGrids_10m/2024/SoilTXT_OrganicSilava.tif” , overwrite= TRUE ) 4.7.6 Organic soils: LU The distribution of organic soils in farmlands was modelled by the University of Latvia project “Improve- ment of sustainable soil resource management in agriculture: E2SOILAGRI”. From all the results we used layer YN_prognozes_smooth.tif stored at Geo- data/2024/Soils/OrganicSoils_LU/ . Preprocessing consisted of projecting the layer to match the 10 m template. Both presences and absences were saved for further processing. # libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} # Template ---- template10 = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # Organic Soils LU ---- kudra_norvegi = rast ( ”./Geodata/2024/Soils/OrganicSoils_LU/YN_prognozes_smooth.tif” ) kudra_norvLV = project (kudra_norvegi,template10) plot (kudra_norvLV) writeRaster (kudra_norvLV, ”./RasterGrids_10m/2024/SoilTXT_OrganicLU.tif” , overwrite= TRUE ) 4.8 Dynamic W orld data Dynamic W orld (DW) is a relatively new Earth observation system product that classifies land cover and land use (LULC) into nine categories (0=water , 1=trees, 2=grass, 3=flooded_vegetation, 4=crops, 5=shrub_and_scrub, 6=built, 7=bare, 8=snow_and_ice), for each ESA Copernicus Sentinel-2 image with identified cloudiness ≤35, allowing for filtering and various aggregations (Brown et al., 2022). DW input information - raster layer for each season in each year - was prepared on the Google Earth Engine (GEE) platform (Gorelick et al., 2017) using a replication script . T o use this script, you need a GEE account and project and suf ficient space on Google Drive. When executing the command lines, a download will be 69 of fered for a file covering the time period from the value in row 7 to the value in row 8 (the file name should be specified in row 32, its description in row 33 and the directory on Google Drive in row 31, or all of this can be specified by confirming the save). This script is not optimized for preparing all seasonal periods for all years, so in order to reproduce or expand this study , it is necessary to change it manually . Downloaded files are to be stored at Geodata/2024/DynamicWorld/RAW/ . During download, it can be seen that each layer covering all of Latvia is divided into several sheets. This is because, in order to ensure a true zero class (class “water” rather than background), the layers are encoded as Float rather than integers. All of these tiles need to be downloaded, and the following R command lines combine them, ensuring that the coordinate system and pixels correspond to the reference raster . # libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} # 10 m template ---- template10 = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # DW export no GEE ---- faili = data.frame ( faili= list.files ( ”./Geodata/2024/DynamicWorld/RAW/” )) faili $ celi_sakums = paste0 ( ”./Geodata/2024/DynamicWorld/RAW/” ,faili $ faili) # prepping ---- faili = faili %>% separate (faili, into= c ( ”DW” , ”gads” , ”periods” , ”parejais” ), sep= ”_” , remov e = FALSE ) %>% mutate ( unikalais= paste0 (DW, ”_” ,gads, ”_” ,periods), mosaic_name= paste0 (unikalais, ”.tif” ), masaic_cels= paste0 ( ”./Geodata/2024/DynamicWorld/” ,mosaic_name)) # every layer consists of two tiles unikalie = levels ( factor (faili $ unikalais)) min ( table (faili $ unikalais)) max ( table (faili $ unikalais)) # job for (i in seq_along (unikalie)){ unikalais = faili %>% filter (unikalais == unikalie[i]) beigu_cels = unique (unikalais $ masaic_cels) print (i) viens = rast (unikalais $ celi_sakums[ 1 ]) divi = rast (unikalais $ celi_sakums[ 2 ]) viens2 = project (viens,template10) divi2 = project (divi,template10) mozaika = mosaic (viens2,divi2, fun= ”first” ) maskets = mask (mozaika,template10, filename= beigu_cels, overwrite= TRUE ) print (beigu_cels) } 4.9 The Global For est W atch The Global Forest W atch (GFW) is a widely known product that describes tree canopy cover in 2000, its annual growth from 2001 to 2012, and its annual loss from 2001 to the current version, which is updated annually (Hansen et al., 2013). The data is available both on the project website and on GEE , where it was developed. This project used v1.12, in which the last year of tree loss dating was 2024, preparing it for 70 download on the GEE platform with this replication script . T o use this script, you need a GEE account and project and suf ficient space on Google Drive. When executing the command lines, you will be offered to download the file, which you need to save to Google Drive. After executing the command lines and preparing the results in Google Drive, four files become available for download. The location to download them is Geodata/2024/Trees/GFW/RAW/ . After download, these files need to be projected to match the reference raster . # libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} # 10 m rastra template ---- template10 = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # TreeCoverLoss ---- treecoverloss = rast ( ”./Geodata/2024/Trees/GFW/RAW/TreeCoverLoss_v1_12.tif” ) tcl = ifel (treecoverloss < 1 , NA ,treecoverloss) tcl2 = terra :: project (tcl,paraugs) tcl3 = mask (tcl2,paraugs, filename= ”./Geodata/2024/Trees/GFW/TreeCoverLoss_v1_12.tif” , ⌋ overwrite= TRUE ) ↪ 4.10 Palsar The Palsar Forests resource is based on P ALSAR-2 synthetic aperture radar (SAR) reflectance classification of forest and non-forest land with a pixel resolution of 25 m. Forests are classified as areas of at least 0.5 ha covered with trees, where tree cover (at least 5 m high) is at least 10% (Shimada et al., 2013). The data is available at GEE . This project used a 4-class version (1=Dense Forest, 2=Non-dense Forest, 3=Non-Forest, 4=W ater), in which the last tree cover dating year was 2020, prepared for download on the GEE platform with this replication script . T o use this script, you need a GEE account and project and sufficient space on Google Drive. When executing the command lines, you will be offered to download the file, which you need to save to Google Drive. After executing the command lines and preparing the results in Google Drive, four files become available for download. The location to download them is Geodata/2024/Trees/Palsar/RAW/ . After download, these files need to be projected to match the reference raster and merged. In this resource, trees are coded into two groups: 1=Dense Forest and 2=Non-dense Forest, which need to be mer ged and the rest converted to missing values (see code below). Although this resource reflects conditions in 2020 rather than 2024, we used it because The Global Forest W atch data provides reliable data on canopy loss, but the appearance of canopy cover is not so rapid that there would be significant changes over a four -year period. # libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} # 10 m rastra template ---- template10 = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # PALSAR Forests ---- fnf1 = rast ( ”./Geodata/2024/Trees/Palsar/RAW/ForestNonForest-0000023296-0000023296.tif” ) fnf2 = rast ( ”./Geodata/2024/Trees/Palsar/RAW/ForestNonForest-0000023296-0000000000.tif” ) fnf3 = rast ( ”./Geodata/2024/Trees/Palsar/RAW/ForestNonForest-0000000000-0000023296.tif” ) fnf4 = rast ( ”./Geodata/2024/Trees/Palsar/RAW/ForestNonForest-0000000000-0000000000.tif” ) fnf1p = terra :: project (fnf1,template10) fnf2p = terra :: project (fnf2,template10) fnf3p = terra :: project (fnf3,template10) 71 fnf4p = terra :: project (fnf4,template10) fnfA = terra :: merge (fnf1p,fnf2p) fnfB = terra :: merge (fnfA,fnf3p) fnfC = terra :: merge (fnfB,fnf4p) plot (fnfC) fnf_X = ifel (fnfC <= 2 & fnfC >= 1 , 1 , NA ) plot (fnf_X) fnf_XX = mask (fnf_X,template10, filename= ”./Geodata/2024/Trees/Palsar/Palsar_Forests.tif” , overwrite= TRUE ) 4.1 1 CHELSA v2.1 Climatologies at high resolution for the Earth’ s land surface areas (CHELSA) is a 30 arc second global down- scaled climate data set (Kar ger et al., 2017). The temperature algorithm is based on statistical downscaling of atmospheric temperatures. The precipitation algorithm incorporates orographic predictors including wind fields, valley exposition, and boundary layer height, with a subsequent bias correction. CHELSA climato- logical data has a similar accuracy as other products for temperature, but its predictions of precipitation patterns are better (Kar ger et al., 2017). Data (1980-2010 baseline) are freely available for download from the homepage forwarding to download server , with download links for selected products available. There is also technical specification available. In this project we used version 2.1. The download links we used together with the renaming scheme are included with this document. The following command lines perform download, crop to the extent of Latvia (using 1 km vector grid) and save the files for further processing described with other EGVs . # libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (curl)) { install.packages ( ”curl” ); require (curl)} # templates ---- # 1km grid tikls1km = sfarrow :: st_read_parquet ( ”./Templates/TemplateGrids/tikls1km _sauzeme.parquet” ) telpai = tikls1km %>% mutate ( yes= 1 ) %>% summarise ( yes= max (yes)) %>% st_buffer (., dist= 10000 ) # download and crop ---- links_names = read_csv ( ”./Geodata/2024/CHELSA/CHELSAdownload_rename.csv” ) links_names = links_names %>% filter (todownload == 1 ) for (i in seq_along (links_names $ localname)){ print (i) sakums = Sys.time () links = links_names $ weblocation[i] saving1 = ”./Geodata/2024/CHELSA/draza.tif” saving2 = paste0 ( ”./Geodata/2024/CHELSA/” ,links_names $ localname[i]) curl_download ( url= links, destfile = saving1, quiet = FALSE ) fails = rast (saving1) telpa = st_transform (telpai, crs= st_crs (fails)) nogriezts = crop (fails,telpa, filename= saving2, 72 overwrite= TRUE ) unlink (saving1) beigas = Sys.time () ilgums = beigas - sakums print (ilgums) } 4.12 Hydr oClim data HydroClim is a near -global freshwater-specific environmental variable dataset, created for biodiversity anal- ysis at 1 km resolution (Domisch et al., 2015). Dataset contains many different variables along the Hy- droSHEDS river network (Lehner et al., 2008), including upstream climate recalculated from worldclim (Hijmans et al., 2005). W e downloaded (to Geodata/2024/HydroClim/ ) averaged upstream climate from Zenodo repository (available also from Dryad ) and cropped to the extent of Latvia and renamed files for further processing with the code below . Renaming scheme is published with document . # libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} # templates ---- template100 = rast ( ”./Templates/TemplateRasters/LV100m_10km.tif” ) tikls1km = sfarrow :: st_read_parquet ( ”./Templates/TemplateGrids/tikls1km _sauzeme.parquet” ) # reading HydroClim ---- videjie = terra :: rast ( ”./Geodata/2024/HydroClim/hydroclim_average+sum.nc” ) # reading dictionary ----- slanu_nosaukumi = read_csv ( ”./Geodata/2024/HydroClim/HydroClim_renaming.csv” ) # cropping --- tikls1km_reproj = st_transform (tikls1km, crs= st_crs (videjie)) telpai = tikls1km %>% mutate ( yes= 1 ) %>% summarise ( yes= max (yes)) %>% st_buffer (., dist= 10000 ) %>% st_transform (., crs= st_crs (videjie)) videjie = terra :: crop (videjie,telpai) # layer names ---- names (videjie) = slanu_nosaukumi $ local_name # saving files ---- for (i in seq_along (slanu_nosaukumi $ local_name)){ nosaukumam = slanu_nosaukumi $ local_name[i] writeRaster (videjie[[i]], paste0 ( ”./Geodata/2024/HydroClim/” ,nosaukumam), overwrite= TRUE ) } The raster dataset contains values only where lar ge enough rivers are detected in HydroSHEDS. However , for species distribution modelling in this project we need continuously covered raster surfaces. For necessary geoprocessing to create such surfaces, we downloaded also HydroBASINS (Lehner and Grill, 2013) dataset to Geodata/2024/HydroClim/ . These procedures were EGV -specific and are described with other EGVs . 73 4.13 Sentinel-2 indices The European Space Agency (ESA) Copernicus program’ s Sentinel-2 mission is a constellation of two (three since 09/05/2024) identical satellites orbiting in the same orbit. The first satellite, Sentinel-2A, entered its orbit and underwent calibration tests on 2015-06-23, the second (Sentinel-2B) on 2017-03-07, with the first images available earlier . Each satellite captures high-resolution images (from 10 m (at the equator) pixel resolution) in 13 spectral channels with a return time of up to 5 days (more frequently closer to the poles) ( https://www.esa.int/Applications/Observing_the_Earth/Copernicus/Sentinel- 2 ). The data from this mission is freely available, including on the Google Earth Engine platform (Gore- lick et al., 2017) for various lar ge-scale pre-processing and analysis. W e used the harmonized Level-2A ( https://developers.google.com/earth- engine/datasets/catalog/COPERNICUS_S2_SR_HARMONIZED#description ) product, applying a cloud mask that includes not only cloud filtering but also shadow filtering. For each filtered image (cloud-free, April-October , 2020-2024), we computed the normalized difference vegetation index (NDVI), the normalized difference moisture index (NDMI), and the normalized dif ference water index (NDWI) as well as various metrics. A replication script can be used to prepare the data. T o use this script, you need a GEE account and project and sufficient space on Google Drive. When executing the command lines, the following files will be of fered for download: • NDVI_median-ST-[runtag, 20250820 by default] - NDVI short-term median (2020-2024) of annual medians (April to October) • NDVI_p25-ST-[runtag, 20250820 by default] - NDVI short-term median (2020-2024) of annual 25th percentiles (April to October) • NDVI_p75-ST-[runtag, 20250820 by default] - NDVI short-term median (2020-2024) of annual 75th percentiles (April to October) • NDVI_iqr-ST-[runtag, 20250820 by default] - NDVI short-term median (2020-2024) of inter -quartile ranges (April to October) • NDVI_median-LY-[runtag, 20250820 by default] - NDVI last-years (2024) median (April to October) • NDMI_median-ST-[runtag, 20250820 by default] - NDMI short-term median (2020-2024) of annual medians (April to October) • NDMI_p25-ST-[runtag, 20250820 by default] - NDMI short-term median (2020-2024) of annual 25th percentiles (April to October) • NDMI_p75-ST-[runtag, 20250820 by default] - NDMI short-term median (2020-2024) of annual 75th percentiles (April to October) • NDMI_iqr-ST-[runtag, 20250820 by default] - NDMI short-term median (2020-2024) of inter -quartile ranges (April to October) • NDMI_median-LY-[runtag, 20250820 by default] - NDMI last-years (2024) median (April to October) • NDWI_median-ST-[runtag, 20250820 by default] - NDMI short-term median (2020-2024) of annual medians (April to October) • NDWI_p25-ST-[runtag, 20250820 by default] - NDWI short-term median (2020-2024) of annual 25th percentiles (April to October) • NDWI_p75-ST-[runtag, 20250820 by default] - NDWI short-term median (2020-2024) of annual 75th percentiles (April to October) • NDWI_iqr-ST-[runtag, 20250820 by default] - NDWI short-term median (2020-2024) of inter -quartile ranges (April to October) • NDWI_median-LY-[runtag, 20250820 by default] - NDWI last-years (2024) median (April to October) After executing the command lines and preparing the results in Google Drive, it can be seen that each layer covering all of Latvia is divided into several tiles. This is because the layers are encoded as Float and exceed 4 GB in size before GeoTIFF compression. All of these files need to be downloaded and located at Geodata/2024/S2indices/RAW . The following R commands combine them, ensuring the coordinate systems and its naming, and pixels matching to the reference raster , while renaming files to EO_[index]-[term: ST or LY][statistic] . 74 # libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} # 10 m raster template ---- template10 = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # Fails as exported from GEE ---- faili = data.frame ( fails= list.files ( ”./Geodata/2024/S2indices/RAW/” , pattern = ”.tif” ) ) faili $ celi_sakums = paste0 ( ”./Geodata/2024/S2indices/RAW/” ,faili $ fails) # file names --- - faili = faili %>% separate (fails, into= c ( ”nosaukums” , ”vidus” , ”beigas” ), sep= ”-” , remove = FALSE ) %>% mutate ( mosaic_name= paste0 ( ”EO_” ,nosaukums, ”-” ,beigas, tolower (vidus), ”.tif” ) , masaic_cels= paste0 ( ”./Geodata/2024/S2indices/Mosaics/” ,mosaic_name)) unikalie = levels ( factor (faili $ mosaic_name)) min ( table (faili $ mosaic_name)) max ( table (faili $ mosaic_name)) # preparation of mosaics ---- for (i in seq_along (unikalie)){ sakums = Sys.time () unikalais = faili %>% filter (mosaic_name == unikalie[i]) beigu_cels = unique (unikalais $ masaic_cels) print (i) # there are exactly 2 tiles per file viens = rast (unikalais $ celi_sakums[ 1 ]) divi = rast (unikalais $ celi_sakums[ 2 ]) viens2 = terra :: project (viens,template10) divi2 = terra :: project (divi,template10) mozaika = terra :: merge (viens2,divi2) maskets = mask (mozaika,template10, filename= beigu_cels, overwrite= TRUE , gdal= c ( ”COMPRESS=LZW” , ”TILED=YES” , ”BIGTIFF=IF_SAFER” ), datatype= ”FLT4S” , NAflag= NA ) plot (maskets, main= unikalie[i]) print (beigu_cels) beigas = Sys.time () ilgums = beigas - sakums print (ilgums) } 4.14 W aste and garbage disposal sites, landfills Information on landfills has been compiled from The Ministry of Smart Administration and Regional Development and Latvian Environment, Geology and Meteorology Centre’ s report, “Report on landfills in Latvia in 2023” listed landfills and their addresses. The coordinates required for the preparation of EGVs were obtained by combining the resources https://www.google.com/maps and https://balticmaps.eu/ . In addition to the resources mentioned above, an object was added at the address “Dardedzes C, Mārupes pag., Mārupes nov ., Latvia, L V -2166”. 75 In addition, information from the State Environmental Service on separate waste and deposit packaging collection points was used, exporting it to an Excel file. Both data sets were combined into a single file and added to this material. 4.15 Digital elevation/terrain models W ith the publication of continuous aerial laser scanning data for the territory of Latvia ( https://www.lgia.gov.lv/lv/digitalie- augstuma- modeli- 0 ), various high-resolution (1 m and higher) digital surface models (DSM) and digital elevation models (DEM) have been developed. Since the input data was the same in all cases, the values of these (corresponding) models were identical across almost the entire territory of the country . However , airborne laser scanning data (1) was not available for the entire territory of the country , and (2) there were differences between the models in terms of filling (availability of values) outside inland waters and (3) filling of water bodies themselves. However , for areas covered by data on land, the values were almost identical. Pearson’ s correlation coefficients between the DEMs developed by LU ĢZZF , L VMI Silava, and LĢIA were greater than 0.999999. The two DEMs (LU ĢZZF and L VMI Silava) were combined (arithmetic mean) within the University of Latvia project “Improvement of sustainable soil resource management in agriculture: E2SOILAGRI”, was used as the working DEM. The resolution of this DEM is 1 m, which is too detailed for species distribution modeling input data, therefore the layer was designed to correspond to the reference 10 m raster . When investigating the combined DEM, there were clearly visible areas with no data. This has been solved by using the DEM with a resolution of 10 m developed by Māris Nartišs (LU ĢZZF) in 2018, which covers the entire territory of Latvia without gaps. T o avoid sharp edges and ensure smooth transitions, we created an arithmetic mean layer covering all of Latvia and aligned to the reference raster . A slope layer has also been created from this raster , which is designed in accordance with the reference. The slope is expressed in degrees and calculated using the 8-neighbor approach. The same applies to the aspect or slope direction. # libs if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} # reference template10 = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # LiDAR DEM 1 m to 10 m lapas_1m = data.frame ( faili= list.files ( ”./Geodata/2024/DEM/meanDEM_1mOLD/” , pattern= ”*.tif$” )) lapas_1m $ numurs = substr (lapas_1m $ faili, 10 , 13 ) lapas_1m $ cels1 = paste0 ( ”./Geodata/2024/DEM/meanDEM_1mOLD/” ,lapas_1m $ faili) lapas_1m $ cels2 = paste0 ( ”./Geodata/2024/DEM/meanDEM_10mOLD/” ,lapas_1m $ faili) kvadrati = st_read ( dsn= ”GIS_Latvija10.2.gdb” , layer= ”tks93_50000” ) kvadrati $ name = as.character (kvadrati $ num50tk) moz2 = rast ( ”./Geodata/2024/DEM/Nartiss_visa_Latvija/dem10_20_kopa.tif” ) for (i in 1 : length (kvadrati $ name)){ kvadrats = kvadrati[i,] nosaukums = kvadrats $ name telpa = terra :: ext (kvadrats) paraugs = crop (template10,telpa) nart = crop (moz2,telpa) nart2 = project (nart,paraugs, mask= TRUE ) dem1m = lapas_1m[lapas_1m $ numurs == kvadrats $ name,] if ( nrow (dem1m) > 0 ){ sakumcels = dem1m $ cels1 dem = rast (sakumcels) 76 reproj = project (dem,paraugs, mask= TRUE , method= ”bilinear” , use_gdal= TRUE ) videjais <- ifel ( is.na (nart2),nart2, ifel ( is.na (reproj),nart2, app ( c (nart2,reproj), mean))) writeRaster (videjais, overwrite= TRUE , filename= paste0 ( ”./Geodata/2024/DEM/meanDEM_10m/” , ”vidDEM_” , nosaukums, ”.tif” )) } else { writeRaster (nart2, overwrite= TRUE , filename= paste0 ( ”./Geodata/2024/DEM/meanDEM_10m/” , ”vidDEM_” , nosaukums, ”.tif” )) } } # vrt un mosaic lapas_10 = data.frame ( faili= list.files ( ”./Geodata/2024/DEM/meanDEM_10m/” , pattern= ”*.tif$” )) lapas_10 $ celi1 = paste0 ( ”./Geodata/2024/DEM/meanDEM_10m/” ,lapas_10 $ faili) mozaikai = vrt (lapas_10 $ celi1, overwrite= TRUE , filename= ”./Geodata/2024/DEM/vrtDEM_10m.tif” ) mozaika = rast ( ”./Geodata/2024/DEM/vrtDEM_10m.tif” ) writeRaster (mozaika, ”./Geodata/2024/DEM/mozDEM_10m.tif” ) ## slope reljefs = rast ( ”./Geodata/2024/DEM/mozDEM_10m.tif” ) slipumi = terrain (reljefs, v= ”slope” , neighbors= 8 , unit= ”degrees” , filename= ”./Geodata/2024/DEM/Terrain_Slope_10m.tif” , overwrite= TRUE ) ## aspect reljefs = rast ( ”./Geodata/2024/DEM/mozDEM_10m.tif” ) virzieni = terrain (reljefs, v= ”aspect” , neighbors= 8 , unit= ”degrees” , filename= ”./Geodata/2024/DEM/Terrain_Aspect_10m.tif” , overwrite= TRUE ) 4.16 Latvian Exclusive Economic Zone polygon The waters of Latvia’ s Exclusive Economic Zone were obtained from the HELCOM map and data service . After downloading, this line file was analogically connected to the coastline file obtained from the same resource. 4.17 Bogs and Mir es: EDI Data (training and classification) used in project “Remote Sensing and Machine Learning for Peatland Habitat Monitoring (PurvEO)” by the Institute of electronics and computer science (EDI) were stored at Geodata/2024/Bogs_EDI . Preprocessing was carried out to create two layers: • EDI_BogsYN.tif : training and classification results on open raised bogs (EU protected habitat codes 71 10 and 7120) and locations where one of those overlapped with transitional mires (EU protected habitat code 7140); • EDI_TransitionalMiresYN.tif : training and classification results on transitional mires (EU protected habitat code 7140) with no overlap with open rised bogs. # libs if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} 77 # Templates ---- template10 = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) template100 = rast ( ”./Templates/TemplateRasters/LV100m_10km.tif” ) nulles10 = rast ( ”./Templates/TemplateRasters/nulls_LV10m_10km.tif” ) # Bogs ---- neatklata71107120 = rast ( paste0 ( ”./Geodata/2024/Bogs_EDI/purvi_EDI_projekts/” , ”purvi/!LV_kopa_apv1020_30_05_2022/” , ”!LV_kopa_apv1020_30_05_2022/” , ”Neatklata_purviem_raksturiga_zemsedze_7110_7120.tif” )) neatklata71107120 = ifel (neatklata71107120 > 0 , 1 , NA ) plot (neatklata71107120) neatklata7140 = rast ( paste0 ( ”./Geodata/2024/Bogs_EDI/purvi_EDI_projekts/” , ”purvi/!LV_kopa_apv1020_30_05_2022/” , ”!LV_kopa_apv1020_30_05_2022/” , ”Neatklata_purviem_raksturiga_zemsedze_7140.tif” )) neatklata7140 = ifel (neatklata7140 > 0 , 1 , NA ) raskturiga71107120 = rast ( paste0 ( ”./Geodata/2024/Bogs_EDI/purvi_EDI_projekts/” , ”purvi/!LV_kopa_apv1020_30_05_2022/” , ”!LV_kopa_apv1020_30_05_2022/” , ”Purviem_neraksturiga_zemsedze_7110_7120.tif” )) raskturiga71107120 = ifel (raskturiga71107120 > 0 , 1 , NA ) raksturiga7140 = rast ( paste0 ( ”./Geodata/2024/Bogs_EDI/purvi_EDI_projekts/” , ”purvi/!LV_kopa_apv1020_30_05_2022/” , ”!LV_kopa_apv1020_30_05_2022/” , ”Purviem_neraksturiga_zemsedze_7140.tif” )) raksturiga7140 = ifel (raksturiga7140 > 0 , 1 , NA ) labels71107120 = rast ( paste0 ( ”./Geodata/2024/Bogs_EDI/purvi_EDI_projekts/” , ”purvi/!LV_kopa_apv1020_30_05_2022/” , ”!LV_kopa_apv1020_30_05_2022/” , ”latvija_Labels_B7110_7120.tif” )) labels71107120 = ifel (labels71107120 > 0 , 1 , NA ) labels7140 = rast ( paste0 ( ”./Geodata/2024/Bogs_EDI/purvi_EDI_projekts/” , ”purvi/!LV_kopa_apv1020_30_05_2022/” , ”!LV_kopa_apv1020_30_05_2022/” , ” latvija_Labels_B7140.tif” )) labels7140 = ifel (labels7140 > 0 , 1 , NA ) augstie = cover ( cover (neatklata71107120,raskturiga71107120),labels71107120) parejas = cover ( cover (neatklata7140,raksturiga7140),labels7140) tikai_parejas = ifel (parejas == 1 & augstie == 1 , NA ,parejas) sunainie = ifel (parejas == 1 & augstie == 1 ,parejas, NA ) sunu_purvi = cover (augstie,sunainie) sunu_proj = project (sunu_purvi,template10) sunuYN = cover (sunu_proj,nulles10) plot (sunuYN) writeRaster (sunuYN, overwrite= TRUE , filename= ”./RasterGrids_10m/2024/EDI_BogsYN.tif” ) # Transitional mires ---- parejas_proj = project (tikai_parejas,template10) parejasYN = cover (parejas_proj,nulles10) plot (parejasYN) writeRaster (parejasYN, overwrite= TRUE , filename= ”./RasterGrids_10m/2024/EDI_TransitionalMiresYN.tif” ) 78 Chapter 5 Geodata pr oducts Some raw data need extensive processing prior to EGVs creation. Often, EGVs relay on transforming raw geodata into intermediate products; in other cases, an EGV itself could be created from raw geodata, but it has to be spatially restricted to certain locations. This chapter describes these geodata products and the procedures involved in creating them. 5.1 T errain pr oducts In order to develop the topographic wetness index (TWI) and non-drainage depressions, it was necessary to address water flow in the environment. This is a multi-step procedure that is logical and reliable in mountainous areas and in environments with little hydrological impact. However , in the context of Latvia, this was challenging. These challenges can be addressed in various ways. For example, if reliable (accurate) information on the exact locations of rivers and ditches were available, it could be incorporated into the terrain. Unfortunately , there is no suf ficiently accurate information available. Therefore, information about network structures from the Melioration Cadastre Information System database buf fered by 10 m, bridges from the topographic map and transport structures and bridges from L VM Open Data were used to address the challenges (both buf fered by 10 m). Information about the minimum height above sea level was incorporated into the DEM to be used in further processing. # libs if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (exactextractr)){ install.packages ( ”exactextractr” ) ; require (exactextractr)} # reference template = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # part one ---- # dem raster reljefs = rast ( ”./Geodata/2024/DEM/mozDEM_10m.tif” ) # drainage network structures st_layers ( ”./Geodata/2024/MKIS/MKIS_2025.gpkg” ) dtb = st_read ( ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”DrenazasTiklaBuves” ) dtb_buffer = st_buffer (dtb, dist= 10 ) # bridges tiltiL = sfarrow :: st_read_parquet ( ”./Geodata/2024/TopographicMap/BridgeL_ COMB.parquet” ) tiltiL_buffer = st_buffer (tiltiL, dist= 30 ) tiltiP = sfarrow :: st_read_parquet ( ”./Geodata/2024/TopographicMap/BridgeL_ COMB.parquet” ) 79 tiltiP_buffer = st_buffer (tiltiP, dist= 30 ) # LVM lvm_caurtekas = st_read ( ”./Geodata/2024/LVM_OpenData/LVM_CAURTEKAS/LVM_CAURTEKAS_Shape.shp ” ) lvm_buffer = st_buffer (lvm_caurtekas, dist= 30 ) # buffers st_geometry (dtb_buffer) = ”geometry” st_geometry (tiltiL_buffer) = ”geometry” st_geometry (tiltiP_buffer) = ”geometry” st_geometry (lvm_buffer) = ”geometry” visi_buferi = bind_rows (dtb_buffer,tiltiL_buffer,tiltiP_buffer,lvm_buffer) # incorporation in DEM visi_buferi $ vertiba = exactextractr :: exact_extract (reljefs,visi_buferi , ”min” ) caurumi = fasterize :: fasterize (visi_buferi,templis, field= ”vertiba” ) caurumi2 = rast (caurumi) caurumains = app ( c (reljefs,caurumi2), fun= ”min” , na.rm= TRUE , overwrite= TRUE , filename= ”./Geodata/2024/DEM/caurtDEM_10m.tif” ) # cleaning rm (caurumi) rm (caurumi2) rm (dtb) rm (dtb_buffer) rm (lvm_buffer) rm (lvm_caurtekas) rm (reljefs) rm (tiltiL) rm (tiltiL_buffer) rm (tiltiP) rm (tiltiP_buffer) rm (visi_buferi) rm (caurumains) This DEM was then used for geoprocessing to identify terrain depressions and determine the topographic wetness index (TWI): 1. drainage depressions and their depth layers were prepared after incorporating flow breaks; 2. to calculate the topographic wetness index, terrain depressions without runoff were reviewed, allowing up to ten cell breaks in areas of lower resistance; the rest were filled in; 3. for additional security , the procedure of the second step was repeated to search for and fill in terrain depressions (W ang and Liu, 2006); 4. the result of the third step was used to determine the specific catchment area using D-infinity flow direction; 5. by combining the specific catchment area layer with the slope layer , the topographic wetness index was calculated. A graphical evaluation revealed individual extreme values, which were limited to 20 . # libs if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (whitebox)){ install.packages ( ”whitebox” ); require (whitebox)} # reference template = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # part two ---- # DEM 80 caurumainis = rast ( ”./Geodata/2024/DEM/caurtDEM_10m.tif” ) # Sinks ## breached sinks and depth in sinks wbt_breach_depressions_least_cost ( dem = ”./Geodata/2024/DEM/caurtDEM_10m.tif” , output = ”./Geodata/2024/DEM/caurtDEM_breachedNF.tif” , dist = 10 , fill = FALSE ) wbt_depth_in_sink ( dem= ”./Geodata/2024/DEM/caurtDEM_breachedNF.tif” , output= ”./Geodata/2024/DEM/Terrain_DiS_breached_10m.tif” , zero_background = TRUE ) wbt_sink ( input = ”./Geodata/2024/DEM/caurtDEM_breachedNF .tif” , output = ”./Geodata/2024/DEM/Terrain_Sink_breached_10m.tif” , verbose_mode = FALSE , zero_background = TRUE ) sinks = rast ( ”./Geodata/2024/DEM/Terrain_Sink_breached_10m.tif” ) sinks2 <- ifel (sinks >= 1 , 1 , sinks, filename= ”./Geodata/2024/DEM/Terrain_SinkYN_breached_10m.tif” ) plot (sinks2) unlink ( ”./Geodata/2024/DEM/Terrain_Sink_breached_10m.tif” ) # TWI ## breaching wbt_breach_depressions_least_cost ( dem = ”./Geodata/2024/DEM/caurtDEM_10m.tif” , output = ”./Geodata/2024/DEM/caurtDEM_breachedF.tif” , dist = 10 , fill = TRUE ) ### filling wbt_fill_depressions_wang_and_liu ( dem = ”./Geodata/2024/DEM/caurtDEM_breachedF.tif” , output = ”./Geodata/2024/DEM/caurtDEM_BreachFill.tif” ) ### (d inf) flow direction wbt_d_inf_flow_accumulation ( input = ”./Geodata/2024/ DEM/caurtDEM_BreachFill.tif” , output = ”./Geodata/2024/DEM/caurtDEM_DInfAccu_SCA.tif” , out_type = ”Specific Contributing Area” ) ### twi wbt_wetness_index ( sca = ”./Geodata/2024/DEM/caurtDEM_DInfAccu_SCA.tif” , slope = ”./Geodata/2024/DEM/Terrain_Slope_10m.tif” , output = ”./Geodata/2024/DEM/TWI_caurtDEM.tif” ) twi = rast ( ”./Geodata/2024/DEM/TWI_caurtDEM.tif” ) hist (twi) # excessively large values plot (twi) twi2 = ifel (twi > 20 , 20 ,twi) plot (twi2) twi2x = ifel ( is.na (twi2) &! is.na (template), 20 ,twi2) # Lake B urtnieks writeRaster (twi2x, filename= ”./Geodata/2024/DEM/Terrain_TWI_lim20_caurtDEM.tif” ) # cleaning rm (sinks) rm (sinks2) rm (caurumainis) rm (twi) rm (twi2) Since the initial DEM input was created by filling in water bodies using interpolation methods, the water bodies show a pronounced terrain, which had to be removed. This was done by overlaying arithmetic mean values of these polygons. 81 # libs if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (exactextractr)){ install.packages ( ”exactextractr” ) ; require (exactextractr)} # reference template = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) # third part --- - # dealing with waterbodies udeni = sfarrow :: st_read_parquet ( ”./Geodata/2024/TopographicMap/HidroA_C OMB.parquet” ) slope = rast ( ”./Geodata/2024/DEM/Terrain_Slope_10m.tif” ) aspect = rast ( ”./Geodata/2024/DEM/Terrain_Aspect_10m.tif” ) twi = rast ( ”./Geodata/2024/DEM/Terrain_TWI_lim20_caurtDEM.tif” ) dis = rast ( ”./Geodata/2024/DEM/Terrain_DiS_breached_10m.tif” ) # average per waterbody udeni $ slopes = exactextractr :: exact_extract (slope,udeni, ”mean” ) caurumi_slope = fasterize :: fasterize (udeni,templis, field= ”slopes” ) caurumi_slope2 = rast (caurumi_slope) caurumains_slope = app ( c (caurumi_slope2,slope), fun= ”first” , na.rm= TRUE , overwrite= TRUE , filename= ”./Geodata/2024/DEM/Terrain_Slope_udeni_10m.tif” ) caurumains_slope = terra :: rast ( ”./Geodata/2024/DEM/Terrain_Slope_udeni_10 m.tif” ) caurumains_slope2 = terra :: mask (caurumains_slope,template, overwrite= TRUE , filename= ”./RasterGrids_10m/2024/Terrain_Slope_udeni2_10m.tif” ) rm (slope) rm (caurumi_slope) rm (caurumi_slope2) rm (caurumains_slope) rm (caurumains_slope2) udeni $ aspect = exactextractr :: exact_extract (aspect,udeni, ”mean” ) caurumi_aspect = fasterize :: fasterize (udeni,templis, field= ”aspect” ) caurumi_aspect2 = rast (caurumi_aspect) caurumi_aspect = app ( c (caurumi_aspect2,aspect), fun= ”first” , na.rm= TRUE , overwrite= TRUE , filename= ”./Geodata/2024/DEM/Terrain_Aspect_udeni_10m.tif” ) caurumains_aspect = terra :: rast ( ”./Geodata/2024/DEM/Terrain_Aspect_udeni_10 m.tif” ) caurumains_aspect2 = terra :: mask (caurumains_aspect,template, overwrite= TRUE , filename= ”./RasterGrids_10m/2024/Terrain_Aspect_udeni2_10m.tif” ) rm (aspect) rm (caurumi_aspect) rm (caurumi_aspect2) rm (caurumains_aspect) rm (caurumains_aspect2) udeni $ twis = exactextractr :: exact_extract (twi,udeni, ”mean” ) caurumi_TWI = fasterize :: fasterize (udeni,templis, field= ”twis” ) caurumi_TWI2 = rast (caurumi_TWI) caurumains_TWI = app ( c (caurumi_TWI2,twi), fun= ”first” , na.rm= TRUE , overwrite= TRUE , filename= ”./Geodata/2024/DEM/Terrain_TWI_udeni_10m.tif” ) caurumains_TWI = terra :: rast ( ”./Geodata/2024/DEM/Terrain_TWI_udeni_10m. tif” ) 82 caurumains_TWI2 = terra :: mask (caurumains_TWI,template, overwrite= TRUE , filename= ”./RasterGrids_10m/2024/Terrain_TWI_udeni2_10m.tif” ) rm (twi) rm (caurumi_TWI) rm (caurumi_TWI2) rm (caurumains_TWI) rm (caurumains_TWI2) udeni $ disi = exactextractr :: exact_extract (dis,udeni, ”mean” ) caurumi_DiS = fasterize :: fasterize (udeni,templis, field= ”disi” ) caurumi_DiS2 = rast (caurumi_DiS) caurumains_DiS = app ( c (caurumi_DiS2,dis), fun= ”first” , na.rm= TRUE , overwrite= TRUE , filename= ”./Geodata/2024/DEM/Terrain_DiS_udeni_10m.tif” ) caurumains_DiS = terra :: rast ( ”./Geodata/2024/DEM/Terrain_DiS_udeni_10m. tif” ) caurumains_DiS2 = terra :: mask (caurumains_DiS,template, overwrite= TRUE , filename= ”./RasterGrids_10m/2024/Terrain_DiS_udeni2_10m.tif” ) rm (udeni) rm (dis) rm (caurumi_DiS) rm (caurumi_DiS2) rm (caurumains_DiS) rm (caurumains_DiS2) # cleaning unlink ( ”./Geodata/2024/DEM/caurtDEM_breachedF.tif” ) unlink ( ”./Geodata/2024/DEM/caurtDEM_breachedNF.tif” ) unlink ( ”./Geodata/2024/DEM/caurtDEM_BreachFill.tif” ) unlink ( ”./Geodata/2024/DEM/caurtDEM_DInfAccu_SCA.tif” ) unlink ( ”./Geodata/2024/DEM/Terrain_Slope_udeni_10m.tif” ) unlink ( ”./Geodata/2024/DEM/Terrain_Aspect_udeni_10m.tif” ) unlink ( ”./Geodata/2024/DEM/Terrain_DiS_udeni_10m.tif” ) unlink ( ”./Geodata/2024/DEM/Terrain_TWI_udeni_10m.tif” ) 5.2 Soil textur e pr oduct In this section, a unified layer describing categorised soil texture (sand = 1, silt = 2, clay = 3, or ganic = 4) was created from multiple preprocessed soil texture data sources. The creation of the soil texture product consisted of multiple overlay steps. These steps, along with the processed geodata used, are illustrated as follows: 1. the base soil texture source was Soil texture layer from the European Soil Database . This layer had to be reclassified to match the other layers, as this was not performed during preprocessing; 2. the layer from the first step was overlaid with the Latvian Quarternary geology data coded as numeric starting with 1; 3. the layer from the second step was overlaid with the 20th century topsoil data in Latvian farmland coded as numeric starting with 1; 4. the layer from Or ganic soils as modelled by the L VMI Silava (presence-only) was overlaid with the Or ganic soils as modelled by the University of Latvia (presence-absence). After the overlay , it was classified as presence-only; 5. the layer from the third step was the overlaid with the layer from the fourth step and saved for EGV creation. 83 # libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} # step 1 step1 = rast ( ”./RasterGrids_10m/2024/SoilTXT_ESDAC.tif” ) step1x = ifel (step1 == 1 , 1 , ifel (step1 == 2 , 2 , ifel (step1 == 3 , 2 , ifel (step1 == 4 , 3 , ifel (step1 == 8 , 4 , NA ))))) plot (step1x) step1xy = as.numeric (step1x) plot (step1xy) # step 2 step2a = rast ( ”./RasterGrids_10m/2024/SoilTXT_QuarternaryLV.tif” ) step2a = as.numeric (step2a) + 1 plot (step2a) step2 = cover (step2a,step1x) plot (step2) # step 3 step3a = rast ( ”./RasterGrids_10m/2024/SoilTXT_topSoilLV.tif” ) step3a = as.numeric (step3a) + 1 plot (step3a) step3 = cover (step3a,step2) plot (step3) # step 4 step4a = rast ( ”./RasterGrids_10m/2024/SoilTXT_OrganicLU.tif” ) step4b = rast ( ”./RasterGrids_10m/2024/SoilTXT_OrganicSilava.tif” ) step4c = cover (step4a,step4b) step4 = ifel (step4c == 1 , 4 , NA ) plot (step4) # step 5 step5 = cover (step4,step3) plot (step5) writeRaster (step5, ”./RasterGrids_10m/2024/SoilTXT_combined.tif” , overwrite= TRUE ) 5.3 Landscape classification In this exercise, “landscape” refers to the representation of different types of land cover and land use classes. The order in which these classes are drawn is important because spatial data from dif ferent sources often have mismatching boundaries. This requires addressing both their overlap (1) and filling in gaps where no database information is available (2), as well as deciding how to emphasize objects through certain processing steps, such as buffering. Some elements that are important for characterizing the environment (especially edge ef fects) may be so small or poorly positioned that they disappear during the rasterisation process (3). The general landscape layer also serves as a mask for the preparation of further environmental descriptions. This section describes the development of a general (simple) landscape and, in the following document, its 84 enrichment with more specific environmental ecogeographical variables. The general landscape is stored in the file Ainava_vienk_mask.tif . The classes in the order of overlay are as follow: • Class 100 - Roads; • (Subclass 720 - Reed, Sedge, Rush beds;) • Class 200 - W aters; • Class 300 - Farmlands; • Class 400 - Allotment gardens, Orchards and Cottages; • Class 500 - Built-up; • Class 600 - Forests, Shrublands, Clearings; • Class 700 - W etlands; • Class 800 - Bare Soil and Quarries. The procedures for their creation are described below: • Class 100 - Roads : roads from various sources. The following sources have been combined to create this class: – layers RoadA_COMB and RoadL_COMB (except the smallest size groups) from topographic map , buf fered by 10 m before rasterisation; – L VM open data layers LVM_MEZA_AUTOCELI , LVM_ATTISTAMIE_AUTOCELI , LVM_APGRIESANAS_LAUKUMI , LVM_IZMAINISANAS_VIETAS , and LVM_NOBRAUKTUVES buffered by 10 m; – information from the State Forest Register on unpaved forest tracks has not been used, as these roads do not usually form a continuous break in the canopy . Information on roads from this register is also available in other resources and has not been duplicated. The command lines below create a layer with landscape class 100 , which is saved in the file SimpleLand- scape_class100_celi.tif for further processing. # Libs ---- if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (raster)) { install.packages ( ”raster” ); require (raster) } if ( ! require (fasterize)) { install.packages ( ”fasterize” ); require (fas terize)} if ( ! require (gdalUtilities)){ install.packages ( ”gdalUtilities” ) ; require (gdalUtilities)} if ( ! require (readxl)) { install.packages ( ”readxl” ); require (readxl) } # templates ---- template_t = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) template_r = raster (template_t) # class 100 ---- #poly celi_topo = st_read_parquet ( ”./Geodata/2024/TopographicMap/RoadA_COMB.parquet” ) celi_topo = celi_topo %>% mutate ( yes= 100 ) %>% dplyr :: select (yes) ctb = st_buffer (celi_topo, dist= 10 ) r_celi_topo = fasterize (ctb,template_r, field= ”yes” ) # pts 85 nobrauktuves = st_read ( ⌋ ”./Geodata/2024/LVM_OpenData/LVM_NOBRAUKTUVES/LVM_NOBRAUKTUVES_Shape.shp” ) ↪ nobrauktuves = nobrauktuves %>% mutate ( yes= 100 ) %>% dplyr :: select (yes) izmainisanas = st_read ( ⌋ ”./Geodata/2024/LVM_OpenData/LVM_IZMAINISANAS_VIETAS/LVM_IZMAINISANAS_VIETAS_Shape.shp” ) ↪ izmainisanas = izmainisanas %>% mutate ( yes= 100 ) %>% dplyr :: select (yes) apgriesanas = st_read ( ⌋ ”./Geodata/2024/LVM_OpenData/LVM_APGRIESANAS_LAUKUMI/LVM_APGRIESANAS_LAUKUMI_Shape.shp” ) ↪ apgriesanas = apgriesanas %>% mutate ( yes= 100 ) %>% dplyr :: select (yes) cp = rbind (nobrauktuves,izmainisanas,apgriesanas) cpb = st_buffer (cp, dist= 10 ) r_celi_pts = fasterize (cpb,template_r, field= ”yes” ) # lines meza_autoceli = st_read ( ⌋ ”./Geodata/2024/LVM_OpenData/LVM_MEZA_AUTOCELI/LVM_MEZA_AUTOCELI_Shape.shp” ) ↪ meza_autoceli = meza_autoceli %>% mutate ( yes= 100 ) %>% dplyr :: select (yes) attistamie = st_read ( ⌋ ”./Geodata/2024/LVM_OpenData/LVM_ATTISTAMIE_AUTOCELI/LVM_ATTISTAMIE_AUTOCELI_Shape.shp” ) ↪ attistamie = attistamie %>% mutate ( yes= 100 ) %>% dplyr :: select (yes) topo_lines = st_read_parquet ( ”./Geodata/2024/TopographicMap/RoadL_COMB.parquet” ) topo_lines = topo_lines %>% mutate ( yes= 100 ) %>% dplyr :: select (yes) cl = bind_rows (meza_autoceli,attistamie,topo_lines) cl = cl %>% dplyr :: select (yes) clb = st_buffer (cl, dist= 10 ) r_celi_lines = fasterize (clb,template_r, field= ”yes” ) # cleaning rm (apgriesanas) rm (attistamie) rm (celi_topo) rm (topo_lines) rm (ctb) rm (cl) rm (clb) rm (cp) rm (cpb) rm (izmainisanas) rm (meza_autoceli) rm (nobrauktuves) # to terra t_celi_topo = rast (r_celi_topo) t_celi_pts = rast (r_celi_pts) t_celi_lines = rast (r_celi_lines) # cleaning rm (r_celi_lines) rm (r_celi_pts) rm (r_celi_topo) # union 86 plot (t_celi_topo) road_union1 = cover (t_celi_topo,t_celi_pts) road_union2 = cover (road_union1,t_celi_lines, filename= ”./RasterGrids_10m/2024/SimpleLandscape_class100_celi.tif” , overwrite= TRUE ) # cleaning rm (t_celi_topo) rm (t_celi_pts) rm (t_celi_lines) rm (road_union1) rm (road_union2) • Class 200 - W aters : water bodies from various sources. The following are combined to create this class: – topographic map layers HidroA_COMB and HidroL_COMB (buffered by 5 m); – MKIS layer Gravji , buffered by 3 m; – L VM open data layers LVM_GRAVJI , buffered by 5 m. – information about ditches from the State Forest Register was not used, as it is either already available in other resources or consists of structures so small that they do not cause a continuous break in the tree canopy . The command lines below create a layer with landscape class 200 , which is saved in the file SimpleLand- scape_class200_udens_premask.tif for further processing. # Libs ---- if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (raster)) { install.packages ( ”raster” ); require (raster) } if ( ! require (fasterize)) { install.packages ( ”fasterize” ); require (fas terize)} if ( ! require (gdalUtilities)){ install.packages ( ”gdalUtilities” ) ; require (gdalUtilities)} if ( ! require (readxl)) { install.packages ( ”readxl” ); require (readxl) } # templates ---- template_t = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) template_r = raster (template_t) # class 200 ---- # topo topo_udens_poly = st_read_parquet ( ”./Geodata/2024/TopographicMap/HidroA_COMB.parquet” ) topo_udens_poly = topo_udens_poly %>% mutate ( yes= 200 ) %>% dplyr :: select (yes) %>% st_transform ( crs= 3059 ) topo_udens_lines = st_read_parquet ( ”./Geodata/2024/TopographicMap/HidroL_COMB.parquet” ) topo_udens_lines = topo_udens_lines %>% mutate ( yes= 200 ) %>% st_buffer ( dist= 5 ) %>% dplyr :: select (yes) %>% st_transform ( crs= 3059 ) topo_udens = rbind (topo_udens_poly,topo_udens_lines) r_topo_udens = fasterize (topo_udens,template_r, field= ”yes” ) raster :: writeRaster (r_topo_udens, ”./RasterGrids_10m/2024/SimpleLandscape_class200_topo.tif” , progress= ”text” ) 87 # cleaning rm (topo_udens_lines) rm (topo_udens_poly) rm (topo_udens) rm (r_topo_udens) # mkis st_layers ( ”./Geodata/2024/MKIS/MKIS_2025.gpkg” ) mkis_gravji = st_read ( ”./Geodata/2024/MKIS/MKIS_2025.gpkg” , layer= ”Gravji” ) mkis_gravji = mkis_gravji %>% mutate ( yes= 200 ) %>% st_buffer ( dist= 3 ) %>% dplyr :: select (yes) r_mkis_udens = fasterize (mkis_gravji,template_r, field= ”yes” ) raster :: writeRaster (r_mkis_udens, ”./RasterGrids_10m/2024/SimpleLandscape_class200_mkis.tif” , progress= ”text” ) # cleaning rm (mkis_gravji) rm (mkis_gravji2) rm (mkis_gravji3) rm (r_mkis_udens) # lvm lvm_gravji = st_read ( ”./Geodata/2024/LVM_OpenData/LVM_GRAVJI/LVM_GRAVJI_Shape.shp” ) lvm_gravji = lvm_gravji %>% mutate ( yes= 200 ) %>% st_buffer ( dist= 5 ) %>% dplyr :: select (yes) r_lvm_gravji = fasterize (lvm_gravji,template_r, field= ”yes” ) raster :: writeRaster (r_lvm_gravji, ”./RasterGrids_10m/2024/SimpleLandscape_class200_lvm.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (lvm_gravji) rm (r_lvm_gravji) # merging a200 = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class200_topo.tif” ) b200 = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class200_mkis.tif” ) c200 = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class200_lvm.tif” ) udens_cover1 = cover (a200,b200) udens_cover2 = cover (udens_cover1,c200, filename= ”./RasterGrids_10m/2024/SimpleLandscape_class200_udens_premask.tif” , overwrite= TRUE ) # cleaning rm (a200) rm (b200) rm (c200) rm (udens_cover1) rm (udens_cover2) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class200_topo.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class200_mkis.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class200_lvm.tif” ) • Class 300 - Farmland : agricultural land from the LAD database. The following sources are combined to create this class: – LAD database , which, following the decision on grouping (classes are available here ), is divided into three broad groups (in the order of overlap with lower number dominating): 88 – arable land with class code `310`; – fallow land with class code `320`; – grassland with class code `330`; – orchards and perennial shrub plantations in the general landscape are part of other landscape classes. The command lines below create a layer with landscape class 300 and its subclasses, which are saved in the file SimpleLandscape_class300_lauki_premask.tif for further processing. # Libs ---- if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (raster)) { install.packages ( ”raster” ); require (raster) } if ( ! require (fasterize)) { install.packages ( ”fasterize” ); require (fas terize)} if ( ! require (gdalUtilities)){ install.packages ( ”gdalUtilities” ) ; require (gdalUtilities)} if ( ! require (readxl)) { install.packages ( ”readxl” ); require (readxl) } # templates ---- template_t = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) template_r = raster (template_t) # class 300 ---- # lad lad_klasem = read_excel ( ”./Geodata/2024/LAD/KulturuKodi_2024.xlsx” ) lad = st_read_parquet ( ”./Geodata/2024/LAD/Lauki_2024.parquet” ) ## arable amazemem = lad_klasem %>% filter ( str_detect (SDM_grupa_sakums, ”aramz” )) aramzemes = lad %>% filter (PRODUCT_CODE %in% amazemem $ kods) %>% mutate ( yes= 310 ) %>% dplyr :: select (yes) r_aramzemes_lad = fasterize (aramzemes,template_r, field= ”yes” ) raster :: writeRaster (r_aramzemes_lad, ”./RasterGrids_10m/2024/SimpleLandscape_class310_aramzemes_lad.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (amazemem) rm (aramzemes) rm (r_aramzemes_lad) ## fallow papuvem = lad_klasem %>% filter ( str_detect (SDM_grupa_sakums, ”papuv” )) papuves = lad %>% filter (PRODUCT_CODE %in% papuvem $ kods) %>% mutate ( yes= 320 ) %>% dplyr :: select (yes) r_papuves_lad = fasterize (papuves,template_r, field= ”yes” ) raster :: writeRaster (r_papuves_lad, ”./RasterGrids_10m/2024/SimpleLandscape_class320_papuves_lad.tif” , progress= ”text” , 89 overwrite= TRUE ) # cleaning rm (papuvem) rm (papuves) rm (r_papuves_lad) ## grassland zalajiem = lad_klasem %>% filter ( str_detect (SDM_grupa_sakums, ”zālā” )) zalaji = lad %>% filter (PRODUCT_CODE %in% zalajiem $ kods) %>% mutate ( yes= 330 ) %>% dplyr :: select (yes) r_zalaji_lad = fasterize (zalaji,template_r, field= ”yes” ) raster :: writeRaster (r_zalaji_lad, ”./RasterGrids_10m/2024/SimpleLandscape_class330_zalaji_lad.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (zalajiem) rm (zalaji) rm (r_zalaji_lad) # merging a300 = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class310_aramzemes_lad.tif” ) b300 = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class320_papuves_lad.tif” ) c300 = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class330_zalaji_lad.tif” ) farmland_cover1 = cover (a300,b300) farmland_cover2 = cover (farmland_cover1, c300, filename= paste0 ( ”./RasterGrids_10m/2024/” , ”SimpleLandscape_class300_lauki_premask.tif” ), overwrite= TRUE ) # cleaning rm (lad) rm (lad_klasem) rm (a300) rm (b300) rm (c300) rm (farmland_cover1) rm (farmland_cover2) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class310_aramzemes_lad.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class320_papuves_lad.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class330_zalaji_lad.tif” ) • Class 400 - Allotment Gardens, Or chards and Cottages . T o create this class, the following are combined (in order of overlap): – topographic map layer BuildA_v3 values: “poligons_V asarnīcu_apbūve”, “poligons_V iensētu_apbūve”, coded as 410 ; – topographic map layer LandusA_COMB values: “poligons_Augludarzs”, “poligons_Augļudārzs”, “poligons_Sakņudārzs”, “poligons_Ogulājs”, “poligons_Ogulajs”, “poligons_Saknudarzs”, coded as 420 ; – LAD database rural information layer group (classes are available here ) “augļudārzi”, the result of which is coded as 420 . The command lines below create a layer with landscape class 400 , which is saved in the file SimpleLand- scape_class400_vasarnicas_premask.tif for further processing. # Libs ---- if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} 90 if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (raster)) { install.packages ( ”raster” ); require (raster) } if ( ! require (fasterize)) { install.packages ( ”fasterize” ); require (fas terize)} if ( ! require (readxl)) { install.packages ( ”readxl” ); require (readxl) } # templates ---- template_t = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) template_r = raster (template_t) # class 400 ---- # topo built-up viensvasar = st_read_parquet ( ”./Geodata/2024/TopographicMap/BuildA_v3.parquet” ) table (viensvasar $ FNAME, useNA= ”always” ) viensvasar = viensvasar %>% filter (FNAME %in% c ( ”poligons_Vasarnīcu_apbūve” , ”poligons_Viensētu_apbūve” )) %>% mutate ( yes= 410 ) %>% dplyr :: select (yes) r_viensetasvasarnicas = fasterize (viensvasar,template_r, field= ”yes” ) raster :: writeRaster (r_viensetasvasarnicas, ”./RasterGrids_10m/2024/SimpleLandscape_class410_vasarnicasviensetas_topo.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (viensvasar) rm (r_darzini_topo) # topo darzini_topo = st_read_parquet ( ”./Geodata/2024/TopographicMap/LandusA_COMB.parquet” ) table (darzini_topo $ FNAME, useNA= ”always” ) darzini_topo = darzini_topo %>% filter (FNAME %in% c ( ”poligons_Augludarzs” , ”poligons_Augļudārzs” , ”poligons_Sakņudārzs” , ”poligons_Ogulājs” , ”poligons_Ogulajs” , ”poligons_Saknudarzs” )) %>% mutate ( yes= 410 ) %>% dplyr :: select (yes) r_darzini_topo = fasterize (darzini_topo,template_r, field= ”yes” ) raster :: writeRaster (r_darzini_topo, ”./RasterGrids_10m/2024/SimpleLandscape_class410_darzini_topo.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (darzini_topo) rm (r_darzini_topo) # lad lad_klasem = read_excel ( ”./Geodata/2024/LAD/KulturuKodi_2024.xlsx” ) table (lad_klasem $ SDM_grupa_sakums, useNA= ”always” ) augludarziem = lad_klasem %>% filter (SDM_grupa_sakums == ”augļudārzi” ) lad = st_read_parquet ( ”./Geodata/2024/LAD/Lauki_2024.parquet” ) lad = lad %>% filter (PRODUCT_CODE %in% augludarziem $ kods) %>% mutate ( yes= 420 ) %>% dplyr :: select (yes) r_darzini_lad = fasterize (lad,template_r, field= ”yes” ) raster :: writeRaster (r_darzini_lad, ”./RasterGrids_10m/2024/SimpleLandscape_class420_darzini_lad.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (lad_klasem) rm (augludarziem) 91 rm (lad) rm (r_darzini_lad) # merging a400 = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class410_vasarnicasviensetas_topo.tif” ) b400 = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class420_darzini_topo.tif” ) c400 = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class420_darzini_lad.tif” ) allotment_cover = cover (a400, b400, filename= paste0 ( ”./RasterGrids_10m/2024/” , ”SimpleLandscape_class400_varnicas_premask.tif” ), overwrite= TRUE ) # cleaning rm (a400) rm (b400) rm (allotment_cover) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class410_vasarnicasviensetas_topo.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class420_darzini_topo.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class420_darzini_lad.tif” ) • Class 500 - Built-up : built-up areas, no particular layer or data source used. Filled in at the end (see section “mer ging and filling” of this chapter) using information from the Dynamic W orld for places not covered by other classes. • Class 600 - For ests, Shrublands, Clearings : areas covered with trees and shrubs, clearings, and dead forest stands. The following sources have been combined to create this class (in order of overlap): – The Global Forest W atch layer records of tree canopy cover loss since 2020, coded as 610 ; – Forest State Register clearings and dead forest stands, the result of which is coded as 610 ; – Forest State Register marked forest stands that are lower than 5 m and seed production plantations, the result of which is coded as 620 ; – topographic map layer FloraL_COMB classes related to shrubs, buffered by 10 m, coded as 620 ; – topographic map layers LandusA_COMB classes: “poligons_Krūmājs”, “poligons_Krumajs”, “poligons_Krūmaugu_plant”, “poligons_Plantacija_krum”, coded as 620 ; – LAD database group (classes are available here ) “krūmveida ilggadīgie stādījumi”, the result of which is coded with 620 ; – Forest State Register forest stands with a height of at least 5 m, coded as 630 ; – topographic map layer LandusA_COMB classes: “poligons_Parks”, “poligons_Meza_kapi”, “poligons_Kapi”, “poligons_Kapi_meza”, the result of which is coded as 640 ; – topographic map layer FloraL_COMB with tree-related classes, buffered by 10 m, coded as 640 ; – P ALSAR Forests layer , coded as 630 . The command lines below create a layer with landscape class 600 , which is saved in the file SimpleLand- scape_class600_meziem_premask.tif for further processing. # Libs ---- if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (raster)) { install.packages ( ”raster” ); require (raster) } if ( ! require (fasterize)) { install.packages ( ”fasterize” ); require (fas terize)} if ( ! require (readxl)) { install.packages ( ”readxl” ); require (readxl) } # templates ---- template_t = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) template_r = raster (template_t) 92 # class 600 ---- # mvr mvr = st_read_parquet ( ”./Geodata/2024/MVR/nogabali_2024janv.parquet” ) # clearcuts izcirtumi = mvr %>% filter (zkat %in% c ( ”12” , ”14” )) %>% mutate ( yes= 610 ) %>% dplyr :: select (yes) r_izcirtumi_mvr = fasterize (izcirtumi,template_r, field= ”yes” ) raster :: writeRaster (r_izcirtumi_mvr, ”./RasterGrids_10m/2024/SimpleLandscape_class610_izcirtumi_mvr.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (izcirtumi) rm (r_izcirtumi_mvr) # low stands # also zkat 16 zemas_audzes = mvr %>% filter ((zkat == ”10” & h10 < 5 ) | zkat == ”16” ) %>% mutate ( yes= 620 ) %>% dplyr :: select (yes) r_zemas_mvr = fasterize (zemas_audzes,template_r, field= ”yes” ) raster :: writeRaster (r_zemas_mvr, ”./RasterGrids_10m/2024/SimpleLandscape_class620_zemas_mvr.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (zemas_audzes) rm (r_zemas_mvr) # high stands augstas_audzes = mvr %>% filter (zkat == ”10” & h10 >= 5 ) %>% mutate ( yes= 630 ) %>% dplyr :: select (yes) r_augstas_mvr = fasterize (augstas_audzes,template_r, field= ”yes” ) raster :: writeRaster (r_augstas_mvr, ”./RasterGrids_10m/2024/SimpleLandscape_class630_augstas_mvr.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (augstas_audzes) rm (r_augstas_mvr) rm (mvr) # tcl - since 2020 tcl = rast ( ”./Geodata/2024/Trees/GFW/TreeCoverLoss_v1_12.tif” ) tcl2 = ifel (tcl < 20 , NA , 610 , filename= ”./RasterGrids_10m/2024/SimpleLandscape_class610_TCL.tif” , overwrite= TRUE ) # cleaning rm (tcl) rm (tcl2) # palsar palsar = rast ( ”./Geodata/2024/Trees/Palsar/Palsar_Forests.tif” ) palsar2 = ifel (palsar == 1 , 630 , NA , filename= ”./RasterGrids_10m/2024/SimpleLandscape_class630_Palsar.tif” , overwrite= TRUE ) 93 # cleaning rm (palsar) rm (palsar2) # lad lad_klasem = read_excel ( ”./Geodata/2024/LAD/KulturuKodi_2024.xlsx” ) table (lad_klasem $ SDM_grupa_sakums, useNA= ”always” ) lad = st_read_parquet ( ”./Geodata/2024/LAD/Lauki_2024.parquet” ) krumiem = lad_klasem %>% filter ( str_detect (SDM_grupa_sakums, ”krūmv” )) krumi = lad %>% filter (PRODUCT_CODE %in% krumiem $ kods) %>% mutate ( yes= 620 ) %>% dplyr :: select (yes) r_krumi_lad = fasterize (krumi,template_r, field= ”yes” ) raster :: writeRaster (r_krumi_lad, ”./RasterGrids_10m/2024/SimpleLandscape_class620_krumi_lad.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (lad_klasem) rm (lad) rm (krumiem) rm (krumi) rm (r_krumi_lad) # topo - pkk pkk_topo = st_read_parquet ( ”./Geodata/2024/TopographicMap/LandusA_COMB.parquet” ) table (pkk_topo $ FNAME, useNA= ”always” ) pkk_topo = pkk_topo %>% filter (FNAME %in% c ( ”poligons_Parks” , ”poligons_Meza_kapi” , ”poligons_Kapi” , ”poligons_Kapi_meza” )) %>% mutate ( yes= 640 ) %>% dplyr :: select (yes) r_pkk_topo = fasterize (pkk_topo,template_r, field= ”yes” ) raster :: writeRaster (r_pkk_topo, ”./RasterGrids_10m/2024/SimpleLandscape_class640_pkk_topo.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (pkk_topo) rm (r_pkk_topo) # topo - shrubs krumi_topo = st_read_parquet ( ”./Geodata/2024/TopographicMap/LandusA_COMB.parquet” ) table (krumi_topo $ FNAME, useNA= ”always” ) krumi_topo = krumi_topo %>% filter (FNAME %in% c ( ”poligons_Krūmājs” , ”poligons_Krumajs” , ”poligons_Krūmaugu_plant” , ”poligons_Plantacija_krum” )) %>% mutate ( yes= 620 ) %>% dplyr :: select (yes) r_krumi_topo = fasterize (krumi_topo,template_r, field= ”yes” ) raster :: writeRaster (r_krumi_topo, ”./RasterGrids_10m/2024/SimpleLandscape_class620_krumi_topo.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (krumi_topo) rm (r_krumi_topo) # topo - linear vegetation linijas_topo = st_read_parquet ( ”./Geodata/2024/TopographicMap/FloraL_COMB.parquet” ) table (linijas_topo $ FNAME, useNA= ”always” ) # linear shrubs 94 krumu_linijas_topo = linijas_topo %>% filter (FNAME == ”Krūmu rinda dzīvzogs” | FNAME == ”Krūmu r inda gar ceļiem upēm” | FNAME == ”Krumu_rinda_dzivzogs” | FNAME == ”Krumu_rinda_gar _celiem_upem” ) %>% mutate ( yes= 620 ) %>% st_buffer ( dist= 10 ) %>% dplyr :: select (yes) r_krumu_linijas_topo = fasterize (krumu_linijas_topo,template_r, field= ”yes” ) raster :: writeRaster (r_krumu_linijas_topo, ”./RasterGrids_10m/2024/SimpleLandscape_class620_KrumuLinijas_topo.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (krumu_linijas_topo) rm (r_krumu_linijas_topo) # linear trees koku_linijas_topo = linijas_topo %>% filter ( str_detect (FNAME, ”Koku” )) %>% mutate ( yes= 640 ) %>% st_buffer ( dist= 10 ) %>% dplyr :: select (yes) r_koku_linijas_topo = fasterize (koku_linijas_topo,template_r, field= ”yes” ) raster :: writeRaster (r_koku_linijas_topo, ”./RasterGrids_10m/2024/SimpleLandscape_class640_KokuLinijas_topo.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (koku_linijas_topo) rm (r_koku_linijas_topo) rm (linijas_topo) # merging r_krumi_lad = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class620_krumi_lad.tif” ) r_pkk_topo = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class640_pkk_topo.tif” ) r_krumi_topo = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class620_krumi_topo.tif” ) r_krumu_linijas_topo = rast ( ⌋ ”./RasterGrids_10m/2024/SimpleLandscape_class620_KrumuLinijas_topo.tif” ) ↪ r_koku_linijas_topo = rast ( ⌋ ”./RasterGrids_10m/2024/SimpleLandscape_class640_KokuLinijas_topo.tif” ) ↪ r_palsar = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class630_palsar.tif” ) r_tcl = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class610_TCL.tif” ) r_augstas_mvr = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class630_augstas_mvr.tif” ) r_zemas_mvr = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class620_zemas_mvr.tif” ) r_izcirtumi_mvr = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class610_izcirtumi_mvr.tif ” ) mezu_cover = cover (r_tcl,r_izcirtumi_mvr) mezu_cover = cover (mezu_cover,r_zemas_mvr) mezu_cover = cover (mezu_cover,r_krumu_linijas_topo) mezu_cover = cover (mezu_cover,r_krumi_topo) mezu_cover = cover (mezu_cover,r_krumi_lad) mezu_cover = cover (mezu_cover,r_augstas_mvr) mezu_cover = cover (mezu_cover,r_pkk_topo) mezu_cover = cover (mezu_cover,r_koku_linijas_topo) mezu_cover = cover (mezu_cover,r_palsar, filename= ”./RasterGrids_10m/2024/SimpleLandscape_class600_meziem_premask.tif” , overwrite= TRUE ) # cleaning rm (r_krumi_lad) rm (r_pkk_topo) rm (r_krumi_topo) rm (r_krumu_linijas_topo) rm (r_koku_linijas_topo) rm (r_palsar) 95 rm (r_tcl) rm (r_augstas_mvr) rm (r_zemas_mvr) rm (r_izcirtumi_mvr) rm (mezu_cover) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class620_krumi_lad.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class640_pkk_topo.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class620_krumi_topo.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class620_KrumuLinijas_topo.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class640_KokuLinijas_topo.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class630_palsar.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class610_TCL.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class630_augstas_mvr.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class620_zemas_mvr.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class610_izcirtumi_mvr.tif” ) • Class 700 - W etlands : combining geospatial data related to reed, sedge and rush beds, marshes, mires, and bogs, filled in order except class 720 that dominates over waters . T o create this class, the following sources are combined (in order of overlap): – topographic map layer LandusA_COMB classes: “Meldrājs_ūdenī_poligons”, “poligons_Grislajs”, “poligons_Grīslājs”, “poligons_Meldrajs”, “poligons_Meldrājs”, “poligons_Meldrajs_udeni”, “poligons_Nec_purvs_grīslājs”, “poligons_Nec_purvs_meldrājs”, “Sēklis_poligons”, the result of which is coded with 720 ; – topographic map layer LandusA_COMB classes: “poligons_Nec_purvs_sūnājs”, “poligons_Sunajs”, “poligons_Sūnājs”, the result of which is coded with 710 ; – topographic map layer SwampA_COMB , the result of which is coded as 710 ; – land categories “21”, “22”, and “23” marked in the State Forest Register , the result of which is coded as 710 ; – land categories “41” and “42” marked in the State Forest Register , the result of which is coded as 730 ; – bogs from Bogs and Mires: EDI ; – transitional mires from Bogs and Mires: EDI ; The command lines below create a layer with landscape class 700 , which is saved in the file SimpleLand- scape_class700_mitraji_premask.tif for further processing. # Libs ---- if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (raster)) { install.packages ( ”raster” ); require (raster) } if ( ! require (fasterize)) { install.packages ( ”fasterize” ); require (fas terize)} if ( ! require (readxl)) { install.packages ( ”readxl” ); require (readxl) } # templates ---- template_t = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) template_r = raster (template_t) # class 700 ---- # topo topo = st_read_parquet ( ”./Geodata/2024/TopographicMap/LandusA_COMB.parquet” ) table (topo $ FNAME, useNA= ”always” ) ## ReedSedgeRush 96 niedraji_topo = topo %>% filter (FNAME %in% c ( ”Meldrājs_ūdenī_poligons” , ”poligons_Grislajs” , ”poligons_Grīslājs” , ”poligons_Meldrajs” , ”poligons_Meldrājs” , ”poligons_Meldrajs_udeni” , ”poligons_Nec_purvs_grīslājs” , ”poligons_Nec_purvs_meldrājs” , ”Sēklis_poligons” )) %>% mutate ( yes= 720 ) %>% dplyr :: select (yes) r_niedraji_topo = fasterize (niedraji_topo,template_r, field= ”yes” ) raster :: writeRaster (r_niedraji_topo, ”./RasterGrids_10m/2024/SimpleLandscape_class720_niedraji_topo.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (niedraji_topo) rm (r_niedraji_topo) ## bogs purvi_topo = topo %>% filter (FNAME %in% c ( ”poligons_Nec_purvs_sūnājs” , ”poligons_Sunajs” , ”poligons_Sūnājs” )) %>% mutate ( yes= 710 ) %>% dplyr :: select (yes) topo_purvi = st_read_parquet ( ”./Geodata/2024/TopographicMap/SwampA_COMB.parquet” ) topo_purvi = topo_purvi %>% mutate ( yes= 710 ) %>% dplyr :: select (yes) purvi = rbind (purvi_topo,topo_purvi) r_purvi_topo = fasterize (purvi,template_r, field= ”yes” ) raster :: writeRaster (r_purvi_topo, ”./RasterGrids_10m/2024/SimpleLandscape_class710_purvi_topo.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (purvi_topo) rm (topo_purvi) rm (purvi) rm (r_purvi_topo) # mvr mvr = st_read_parquet ( ”./Geodata/2024/MVR/nogabali_2024janv.parquet” ) # bogs and mires mvr_purvi = mvr %>% filter (zkat %in% c ( ”21” , ”22” , ”23” )) %>% mutate ( yes= 710 ) %>% dplyr :: select (yes) r_purvi_mvr = fasterize (mvr_purvi,template_r, field= ”yes” ) raster :: writeRaster (r_purvi_mvr, ”./RasterGrids_10m/2024/SimpleLandscape_class710_purvi_mvr.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (mvr_purvi) rm (r_purvi_mvr) # beavers mvr_bebri = mvr %>% filter (zkat %in% c ( ”41” , ”42” )) %>% mutate ( yes= 730 ) %>% dplyr :: select (yes) r_bebri_mvr = fasterize (mvr_bebri,template_r, field= ”yes” ) raster :: writeRaster (r_bebri_mvr, ”./RasterGrids_10m/2024/SimpleLandscape_class730_bebri_mvr.tif” , 97 progress= ”text” , overwrite= TRUE ) # cleaning rm (mvr_bebri) rm (r_bebri_mvr) rm (mvr) # merging r_niedraji_topo = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class720_niedraji_topo.tif ” ) r_purvi_topo = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class710_purvi_topo.tif” ) r_purvi_mvr = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class710_purvi_mvr.tif” ) r_bebri_mvr = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class730_bebri_mvr.tif” ) mires = rast ( ”./RasterGrids_10m/2024/EDI_TransitionalMiresYN.tif” ) miresY = ifel (mires == 1 , 710 , NA ) bogs = rast ( ”./RasterGrids_10m/2024/EDI_BogsYN.tif” ) bogsY = ifel (bogs == 1 , 710 , NA ) wetlands_cover = cover (r_niedraji_topo,r_purvi_topo) wetlands_cover = cover (wetlands_cover,r_purvi_mvr) wetlands_cover = cover (wetlands_cover,r_bebri_mvr) wetlands_cover = cover (wetlands_cover,miresY) wetlands_cover = cover (wetlands_cover, bogsY, filename= paste0 ( ”./RasterGrids_10m/2024/” , ”SimpleLandscape_class700_mitraji_premask.tif” ), overwrite= TRUE ) # cleaning rm (r_niedraji_topo) rm (r_purvi_topo) rm (r_purvi_mvr) rm (r_bebri_mvr) rm (bogs) rm (bogsY) rm (mires) rm (miresY) rm (topo) rm (wetlands_cover) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class710_purvi_topo.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class710_purvi_mvr.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class730_bebri_mvr.tif” ) • Class 800 - Bar e Soil and Quarries : combining layers related to bare soil, heaths, and quarries. The following have been combined to create this class (in order of overlap): – topographic map layer LandusA_COMB classes: “poligons_Smiltājs”, “poligons_Smiltajs”, “poligons_Grants”, “poligons_Kūdra”, “poligons_V irsajs”, the result of which is coded with 800 ; – land categories “33” and “34” marked in the State Forest Register , the result of which is coded as 800 . The command lines below create a layer with landscape class 800 , which is saved in the file SimpleLand- scape_class800_smiltaji_premask.tif for further processing. # Libs ---- if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (raster)) { install.packages ( ”raster” ); require (raster) } if ( ! require (fasterize)) { install.packages ( ”fasterize” ); require (fas terize)} 98 if ( ! require (readxl)) { install.packages ( ”readxl” ); require (readxl) } # templates ---- template_t = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) template_r = raster (template_t) # class 800 ---- smiltaji_topo = st_read_parquet ( ”./Geodata/2024/TopographicMap/LandusA_COMB.parquet” ) table (smiltaji_topo $ FNAME, useNA= ”always” ) smiltaji_topo = smiltaji_topo %>% filter (FNAME %in% c ( ”poligons_Smiltājs” , ”poligons_Smiltajs” , ”poligons_Grants” , ”poligons_Kūdra” , ”poligons_Virsajs” )) %>% mutate ( yes= 800 ) %>% dplyr :: select (yes) r_smiltaji_topo = fasterize (smiltaji_topo,template_r, field= ”yes” ) raster :: writeRaster (r_smiltaji_topo, ”./RasterGrids_10m/2024/SimpleLandscape_class800_SmiltajiKudra_topo.tif” , progress= ”text” ) # cleaning rm (smiltaji_topo) rm (r_smiltaji_topo) # mvr zkat 33 un 34 mvr = st_read_parquet ( ”./Geodata/2024/MVR/nogabali_2024janv.parquet” ) smiltajiem = mvr %>% filter (zkat %in% c ( ”33” , ”34” )) %>% mutate ( yes= 800 ) %>% dplyr :: select (yes) r_smiltaji_mvr = fasterize (smiltajiem,template_r, field= ”yes” ) raster :: writeRaster (r_smiltaji_mvr, ”./RasterGrids_10m/2024/SimpleLandscape_class800_SmiltVirs_mvr.tif” , progress= ”text” , overwrite= TRUE ) # cleaning rm (mvr) rm (smiltajiem) rm (r_smiltaji_mvr) # merging r_smiltaji_topo = rast ( ⌋ ”./RasterGrids_10m/2024/SimpleLandscape_class800_SmiltajiKudra_topo.tif” ) ↪ r_smiltaji_mvr = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class800_SmiltVirs_mvr.tif” ) bare_cover = terra :: merge (r_smiltaji_topo, r_smiltaji_mvr, filename= paste0 ( ”./RasterGrids_10m/2024/” , ”SimpleLandscape_class800_smiltaji_premask.tif” ), overwrite= TRUE ) # cleaning rm (r_smiltaji_topo) rm (r_smiltaji_mvr) rm (bare_cover) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class800_SmiltajiKudra_topo.tif” ) unlink ( ”./RasterGrids_10m/2024/SimpleLandscape_class800_SmiltVirs_mvr.tif” ) Merging and filling The command lines below combine the previously created layers with the landscape classes in the correct order and ensure that gaps are filled with the appropriately classified Dynamic W orld composite for April- August 2024. After masking to match the analysis space, the layer is saved in the file Ainava_vienk_mask.tif for further processing. 99 # Libs ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} # templates ---- template_t = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) template_r = raster (template_t) # final merging and covering ---- # DW dynworld = rast ( ”Geodata/2024/DynamicWorld/DW_2024_apraug.tif” ) klases = matrix ( c ( 0 , 200 , 1 , 620 , 2 , 330 , 3 , 720 , 4 , 310 , 5 , 710 , 6 , 500 , 7 , 800 , 8 , 500 ), ncol= 2 , byrow= TRUE ) dw2 = terra :: classify (dynworld,klases) writeRaster (dw2, ”./RasterGrids_10m/2024/DW_reclass.tif” , overwrite= TRUE ) # other layers celi = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class100_celi.tif” ) plot (celi) niedraji = rast ( ”RasterGrids_10m/2024/SimpleLandscape_class720_niedraji_topo.tif” ) plot (niedraji) udeni = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class200_udens_premask.tif” ) plot (udeni) lauki = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class300_lauki_premask.tif” ) plot (lauki) vasarnicas = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class400_varnicas_premask.tif” ) plot (vasarnicas) mezi = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class600_meziem_premask.tif” ) plot (mezi) mitraji = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class700_mitraji_premask.tif” ) plot (mitraji) smiltaji = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class800_smiltaji_premask.tif” ) plot (smiltaji) dw2 = rast ( ”./RasterGrids_10m/2024/DW_reclass.tif” ) plot (dw2) # covering in correct order rastri_ainavai = cover (celi,niedraji) rastri_ainavai = cover (rastri_ainavai,udeni) rastri_ainavai = cover (rastri_ainavai,lauki) rastri_ainavai = cover (rastri_ainavai,vasarnicas) rastri_ainavai = cover (rastri_ainavai,mezi) rastri_ainavai = cover (rastri_ainavai,mitraji) rastri_ainavai = cover (rastri_ainavai,smiltaji) rastri_ainavai = cover (rastri_ainavai,dw2, filename= ”./RasterGrids_10m/2024/Ainava_vienkarsa.tif” , overwrite= TRUE ) plot (rastri_ainavai) 100 # cleaning rm (celi) rm (niedraji) rm (udeni) rm (lauki) rm (vasarnicas) rm (mezi) rm (mitraji) rm (smiltaji) rm (klases) rm (dynworld) rm (dw2) rm (rastri_ainavai) # masking rastrs_ainava = rast ( ”./RasterGrids_10m/2024/Ainava_vienkarsa.tif” ) plot (rastrs_ainava) freq (rastrs_ainava) masketa_ainava = terra :: mask (rastrs_ainava, template_t, filename= ”./RasterGrids_10m/2024/Ainava_vienk_mask.tif” , overwrite= TRUE ) plot (masketa_ainava) # cleaning rm (rastrs_ainava) rm (masketa_ainava) 5.4 Landscape diversity This subsection summarizes the input products related to the landscape described in the previous section – raster layers prepared at a 10 m resolution, which characterize the classes found in the landscape (environ- ment), as well as the subsequent preprocessing for the preparation of the EGVs. The calculations of the Shannon diversity index are so computationally intensive that it is not rationally possible to perform them at every landscape scale around each analysis cell (EGV -cell). Furthermore, they cannot be directly aggregated to speed up the calculation. Therefore, a decision has been made on the raster cell size, which: • is formed as a multiplication of the EGV -cell by an integer; • is lar ge enough to account for environmental variability . Therefore, the EGV -cell itself (or multipli- cation by 1) is not suitable - there is very little variability in land cover and land use within an area of 1 ha. Consequently , the raster cell size for calculation of Shannon index should be as lar ge as possible without becoming so lar ge that it artificially inflates spatial autocorrelation and loose spatial relevance; • allows to build every landscape scale from several diversity-index–level cells. Since we use spatially weighted zonal statistics in the preparation of EGVs, and the smallest landscape scale is r = 500 m around the centre of the EGV -cell, it has been decided to calculate the landscape diversity index for individual cells with a side length of 500 m (i.e., 25 ha landscapes). This means that the smallest number of units used for the development of the EGVs is nine (for a landscape scale of r = 500 m around the centre of the EGV -cell). Three principal environments are described using diversity indices: overall landscape, farmland, and forests. T o make them easier to reproduce and locate, each is described in a separate section below . 101 5.4.1 Overall landscape Combination of three layers is involved to describe overall landscape diversity: • as the lowest in hierarchy is Ainava_vienk_mask.tif , prepared in section Landscape classification ; • farmland diversity as the top layer in the hierarhy . Prepared based on relatively broad agricultural codes (field - SDM_grupa_sakums) from Rural Support Service’ s information on declared fields . Only cells corresponding to declared fields contain values; others are empty will inherit values from other layers during overlay . Codes used range from 351 to 362; • forest diversity is the second layer in hierarchy . This layer describes dominant tree species groups in each stand with stand, derived from stand-level inventory data combined with age group as used in forestry practice. V alues used in this classification are available from database description . – tree species groups: * coniferous species codes: “1”, “3”, “13”, “14”, “15”, “22”, “23”, “28”; * boreal deciduous species codes: “4”, “6”, “8”, “9”, “19”, “20”, “21”, “32”, “35”, “68”; * temperate deciduous species codes: “10”, “1 1”, “12”, “16”, “17”, “18”, “24”, “25”, “26”, “27”, “28”, “29”, “50”, “61”, “62”, “63”, “64”, “65”, “66”, “67”, “69”; * classification: a forest is considered coniferous if timber volume of coniferous species in the top tree layer constitutes at least 75% of the total timer volume. Otherwise, it can be considered boreal deciduous if the respective proportion is at least 75%, or temperate deciduous if the respective proportion is at least 50%; else it is considered mixed. – tree age groups: * forests are considered young if they are registered with age groups “1”, “2” or “3”; * forests are considered old if they are registered with age groups “4”, or “5”; – created codes are formatted as factors and then again as scalars, with 660 added. Once the landscape classification is done, diversity index is calculated for 25 ha landscapes using the func- tion egvtools::landscape_function . T o guard value coverage, inverse distance weighted (power = 2) gap filling is incorporated; however , there were no gaps to fill. # Libs ---- if ( ! require (egvtools)) { install.packages ( ”egvtools” ); require (egv tools)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (readxl)) { install.packages ( ”readxl” ); require (readxl) } # templates ---- template_t = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) template_r = raster (template_t) # overall diversity ---- ## Farmland broad ---- # classification culturecodes = read_excel ( ”./Geodata/2024/LAD/KulturuKodi_2024.xlsx” ) culturecodes $ kods = as.character (culturecodes $ kods) lad = sfarrow :: st_read_parquet ( ”./Geodata/2024/LAD/Lauki_2024.parquet” ) lad2 = lad %>% left_join (culturecodes, by= c ( ”PRODUCT_CODE” = ”kods” )) %>% mutate ( numeric_code= as.numeric ( as.factor (SDM_grupa_sakums)) + 350 ) %>% filter ( ! is.na (numeric_code)) table (lad2 $ numeric_code, useNA = ”always” ) 102 # input layer polygon2input ( vector_data = lad2, template_path = ”./Templates/TemplateRasters/LV10m_10km.tif” , out_path = ”./RasterGrids_10m/2024/” , file_name = ”Diversity_FarmlandBroad_only.tif” , value_field = ”numeric_code” , fun= ”first” , prepare= FALSE , project_mode = ”auto” ) # cleaning rm (culturecodes) rm (lad) rm (lad2) ## Forests broad ---- # data mvr = sfarrow :: st_read_parquet ( ”./Geodata/2024/MVR/nogabali_2024janv.parq uet” ) # species grou ps skujkoki = c ( ”1” , ”3” , ”13” , ”14” , ”15” , ”22” , ”23” , ”28” ) # 8 saurlapji = c ( ”4” , ”6” , ”8” , ”9” , ”19” , ”20” , ”21” , ”32” , ”35” , ”68” ) # 10 platlapji = c ( ”10” , ”11” , ”12” , ”16” , ”17” , ”18” , ”24” , ”25” , ”26” , ”27” , ”28” , ”29” , ”50” , ”61” , ”62” , ”63” , ”64” , ”65” , ”66” , ”67” , ”69” ) # 21 # classification mvr2 = mvr %>% mutate ( vol_coniferous= ifelse (s10 %in% coniferous,v10, 0 ) + ifelse (s11 %in% coniferous,v11, 0 ) + ifelse (s12 %in% coniferous,v12, 0 ) + ifelse (s13 %in% coniferous,v13, 0 ) + ifelse (s14 %in% coniferous,v14, 0 ), vol_boreal= ifelse (s10 %in% boreal_deciduous,v10, 0 ) + ifelse (s11 %in% boreal_deciduous,v11, 0 ) + ifelse (s12 %in% boreal_deciduous,v12, 0 ) + ifelse (s13 %in% boreal_deciduous,v13, 0 ) + ifelse (s14 %in% boreal_deciduous,v14, 0 ), vol_temperate= ifelse (s10 %in% temperate_deciduous,v10, 0 ) + ifelse (s11 %in% temperate_deciduous,v11, 0 ) + ifelse (s12 %in% temperate_deciduous,v12, 0 ) + ↪ ifelse (s13 %in% temperate_deciduous,v13, 0 ) + ifelse (s14 %in% temperate_deciduous,v14, 0 )) %>% ↪ mutate ( vol_total= vol_coniferous + vol_boreal + vol_temperate) %>% mutate ( forest_type= ifelse (vol_coniferous / vol_total >= 0.75 , ”coniferous” , ifelse (vol_boreal / vol_total >= 0.75 , ”boreal” , ifelse (vol_temperate / vol_total > 0.5 , ”temperate” , ”mixed” )))) %>% mutate ( forest_age= ifelse (vgr == ”1” | vgr == ”2” | vgr = = ”3” , ”young” , ifelse (vgr == ”4” | vgr == ”5” , ”old” , NA ))) %>% filter ( ! is.na (forest_type)) %>% filter ( ! is.na (forest_age)) %>% mutate ( divbroad_class= paste0 (forest_type, ”_” ,forest_age)) %>% mutate ( divbroad_numeric= as.numeric ( as.factor (divbroad_class)) + 660 ) %>% filter ( ! is.na (divbroad_numeric)) # input layer polygon2input ( vector_data = mvr2, template_path = ”./Templates/TemplateRasters/LV10m_10km.tif” , out_path = ”./RasterGrids_10m/2024/” , file_name = ”Diversity_ForestBroad_only.tif” , value_field = ”divbroad_numeric” , fun= ”first” , prepare= FALSE , project_mode = ”auto” , overwrite = TRUE ) # cleaning rm (mvr) rm (mvr2) 103 ## overall classification ---- simple_landscape = rast ( ”./RasterGrids_10m/2024/Ainava_vienk_mask.tif” ) ## Covered classes for general diversity ---- farmland_broad = rast ( ”./RasterGrids_10m/2024/Diversity_FarmlandBroad_only.tif” ) forests_broad = rast ( ”./RasterGrids_10m/2024/Diversity_ForestBroad_only.tif” ) diversity_classes = cover (farmland_broad,forests_broad) diversity_classes2 = cover (diversity_classes,simple_landscape, filename= ”./RasterGrids_10m/2024/Diversity_GeneralLandscapeBroad.tif” , overwrite= TRUE ) rm (simple_landscape) rm (farmland_broad) rm (forests_broad) rm (diversity_classes) rm (diversity_classes2) ## Diversity index at 25ha ----- res_tbl <- landscape_function ( landscape = ”./RasterGrids_10m/2024/Diversity_GeneralLandscapeBroad.tif” , zones = ”./Templates/TemplateGrids/tikls500_sauzeme.parquet” , id_field = ”rinda500” , tile_field = ”tks50km” , template = ”./Templates/TemplateRasters/LV500m_10km.tif” , out_dir = ”./RasterGrids_500m/2024/” , out_filename = ”Diversity_GeneralLandscape_500x.tif” , out_layername = ”Diversity_GeneralLandscape_500x” , what = ”lsm_l_shdi” , rasterize_engine = ”fasterize” , n_workers = 8 , future_max_size = 3 * 1024 ^ 3 , fill_gaps = TRUE , plot_gaps = TRUE , plot_result = TRUE ) print (res_tbl) plot ( rast ( ”./RasterGrids_500m/2024/Diversity_GeneralLandscape_500x.tif” ) ) rm (res_tbl) 5.4.2 For est diversity An input grid with a cell size of 10 m covers the entire territory of Latvia. It contains the following values, in order of hierarchy: • State Forest Service’ s Forest State Register code, in which the code of the dominant tree species is multiplied by 1000 and the age group code is added. However , before rasterisation, geometries in which no code has been assigned or one of the code components is 0, are excluded; • forest diversity class values prepared in Overall landscape diversity ; • forest classes from Landscape classification ; • value 1 for all other cells located in the territory of Latvia. Once the landscape classification is done, the Shannon’ s diversity index is calculated for 25 ha landscapes using the function egvtools::landscape_function . T o ensure value coverage, inverse distance weighted (power = 2) gap filling is incorporated; however , there were no gaps to fill. 104 # Libs ---- if ( ! require (egvtools)) { install.packages ( ”egvtools” ); require (egv tools)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (readxl)) { install.packages ( ”readxl” ); require (readxl) } # templates ---- template_t = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) template_r = raster (template_t) # forest diversity ---- ## forest broad ---- forest_broad = rast ( ”./RasterGrids_10m/2024/Diversity_ForestBroad_only.tif” ) ## forest codes ---- # mezi mvr = st_read_parquet ( ”./Geodata/2024/MVR/nogabali_2024janv.parquet” ) mvr = mvr %>% mutate ( kods1= as.numeric (s10) * 1000 , kods2= as.numeric (vgr), kods= kods1 + kods2) %>% filter ( ! is.na (kods)) %>% filter (kods1 > 0 ) %>% filter (kods2 > 0 ) # input layer polygon2input ( vector_data = mvr, template_path = ”./Templates/TemplateRasters/LV10m_10km.tif” , out_path = ”./RasterGrids_10m/2024/” , file_name = ”Diversity_ForestCodes_only.tif” , value_field = ”kods” , fun= ”first” , prepare= FALSE , project_mode = ”auto” , overwrite = TRUE ) # cleaning rm (mvr) # simple forests simple_forests = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class600_meziem_premask.tif” ) ## Covered classes for forest diversity ---- forest_codes = rast ( ”./RasterGrids_10m/2024/Diversity_ForestCodes_only.tif” ) plot (forest_codes) forest_covered = cover (forest_codes,forest_broad) forest_covered = cover (forest_covered,simple_forests) plot (forest_covered) forest_covered2 = cover (forest_covered,template_t, filename= ”./RasterGrids_10m/2024/Diversity_ForestsDetailed.tif” , overwrite= TRUE ) plot (forest_covered2) # cleaning rm (forest_codes) rm (forest_covered) rm (forest_covered2) 105 rm (forest_broad) rm (simple_forests) ## Diversity index at 25ha ----- res_tbl <- landscape_function ( landscape = ”./RasterGrids_10m/2024/Diversity_ForestsDetailed.tif” , zones = ”./Templates/TemplateGrids/tikls500_sauzeme.parquet” , id_field = ”rinda500” , tile_field = ”tks50km” , template = ”./Templates/TemplateRasters/LV500m_10km.tif” , out_dir = ”./RasterGrids_500m/2024/” , out_filename = ”Diversity_Forests_500x.tif” , out_layername = ”Diversity_Forests_500x” , what = ”lsm_l_shdi” , rasterize_engine = ”fasterize” , n_workers = 8 , future_max_size = 3 * 1024 ^ 3 , fill_gaps = TRUE , plot_gaps = TRUE , plot_result = TRUE ) print (res_tbl) plot ( rast ( ”./RasterGrids_500m/2024/Diversity_Forests_500x.tif” )) rm (res_tbl) 5.4.3 Farmland diversity A grid with a cell size of 10 m covers the entire territory of Latvia. It contains the following values, listed in order of hierarchy: • Rural Support Service crop codes with 1000 added; • farmland diversity class values prepared in Overall landscape diversity ; • farmland classes from Landscape classification ; • value 1 for all other cells located within the territory of Latvia. Once the landscape classification is done, diversity index is calculated for 25 ha landscapes with function egvtools::landscape_function . T o guard value coverage, inverse distance weighted (power = 2) gap filling is incorporated; however , there were no gaps to fill. # Libs ---- if ( ! require (egvtools)) { install.packages ( ”egvtools” ); require (egv tools)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} if ( ! require (sf)) { install.packages ( ”sf” ); require (sf)} if ( ! require (arrow)) { install.packages ( ”arrow” ); require (arrow)} if ( ! require (sfarrow)) { install.packages ( ”sfarrow” ); require (sfa rrow)} if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (readxl)) { install.packages ( ”readxl” ); require (readxl) } # templates ---- template_t = rast ( ”./Templates/TemplateRasters/LV10m_10km.tif” ) template_r = raster (template_t) # farmland diversity ----- 106 ## Farmland broad ---- farmland_broad = rast ( ”./RasterGrids_10m/2024/Diversity_FarmlandBroad_only.tif” ) ## Farmland codes ---- lad = sfarrow :: st_read_parquet ( ”./Geodata/2024/LAD/Lauki_2024.parquet” ) lad $ product_code = as.numeric (lad $ PRODUCT_CODE) + 1000 # input layer polygon2input ( vector_data = lad, template_path = ”./Templates/TemplateRasters/LV10m_10km.tif” , out_path = ”./RasterGrids_10m/2024/” , file_name = ”Diversity_FarmlandCodes_only.tif” , value_field = ”product_code” , fun= ”first” , prepare= FALSE , project_mode = ”auto” , overwrite = TRUE ) # cleaning rm (lad) # simple landscapes input simple_farmland = rast ( ”./RasterGrids_10m/2024/SimpleLandscape_class300_lauki_premask.tif ” ) ## Covered classes for farmland diversity ---- farmland_codes = rast ( ”./RasterGrids_10m/2024/Diversity_FarmlandCodes_only.tif” ) farmland_covered = cover (farmland_codes,farmland_broad) farmland_covered = cover (farmland_covered,simple_farmland) farmland_covered2 = cover (farmland_covered,template_t, filename= ”./RasterGrids_10m/2024/Diversity_FarmlandDetailed.tif” , overwrite= TRUE ) plot (farmland_covered2) # cleaning rm (farmland_codes) rm (farmland_covered) rm (farmland_covered2) rm (simple_farmland) rm (farmland_broad) ## Diversity index at 25ha ----- res_tbl <- landscape_function ( landscape = ”./RasterGrids_10m/2024/Diversity_FarmlandDetailed.tif” , zones = ”./Templates/TemplateGrids/tikls500_sauzeme.parquet” , id_field = ”rinda500” , tile_field = ”tks50km” , template = ”./Templates/TemplateRasters/LV500m_10km.tif” , out_dir = ”./RasterGrids_500m/2024/” , out_filename = ”Diversity_Farmland_500x.tif” , out_layername = ”Diversity_Farmland_500x” , what = ”lsm_l_shdi” , rasterize_engine = ”fasterize” , n_workers = 8 , future_max_size = 3 * 1024 ^ 3 , fill_gaps = TRUE , plot_gaps = TRUE , plot_result = TRUE 107 ) print (res_tbl) plot ( rast ( ”./RasterGrids_500m/2024/Diversity_Farmland_500x.tif” )) rm (res_tbl) 108 Chapter 6 Ecogeographical variables This section names and provides description (R code with its explanation in procedure) of each of the 538 EGVs created. Refer to the flowchart below (Fig. 6.1) for a better understanding of how these varable relate. The names used in the figure correspond to EGV layer names and follow naming convention: [group] _ [specific name] _ [scale], where: • group is a broader collection of EGVs describing the same phenomena or ecosystem, derived from the same source, etc.; • specific name briefly describes the landscape class and/or metrics used in the creation of the layer; • scale is one of: cell, 500, 1250, 3000, 10000 m around the centre of the EGV -cell. The resolution of each EGV is 1 ha; lar ger scales are summarised to this resolution. Figure 6.1: Relationships of the created ecogeographical variables. For cover fraction and edge variables, we first calculated values at the EGV -cell resolution and then used {exactextract} to summarise values from larger scales. This package uses pixel area weights to calcu- late weighted summary statistics, making the aggregation error negligible, particularly at larger scales, 109 but reduces computation time thousands up to even hundreds of thousands times compared to input res- olution (10 m). T o further speed up the procedures, we used “sparse” mode in the workflow egv- tools::radius_function() , thus summarising zonal statistics every 300 m for 3000 m radius buffers and every 1000 m for 10000 m buffers, obtaining near linear reduction in time relative to the number of zones (ninefold and 100 fold further computation time reduction), while loosing less than 0.001 % of variability overall. W e used a slightly dif ferent approach with diversity metrics. First, we calculated Shanon’ s diversity in- dex at 25 ha raster grid cells, as there is nearly no variability of landscape classes at 1 ha grid cells. Next, we calculated arithmetic mean as zonal statictics value (using the “sparse” mode with the workflow egv- tools::radius_function() ), but we did not create this EGV at the analysis cells scale. 6.1 Climate_CHELSA v2.1-bio1_cell filename: Climate_CHELSAv2.1-bio1_cell.tif layername: egv_001 English name: Mean annual daily mean air temperature (°C) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Gada vidējā ik dienas vidējā gaisa temperatūra (°C) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedure: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio1_cell.tif” layername = ”egv_001” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio1_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio1_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 1 10 6.2 Climate_CHELSA v2.1-bio10_cell filename: Climate_CHELSAv2.1-bio10_cell.tif layername: egv_002 English name: Mean daily mean air temperatures (°C) of the warmest quarter (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Gada siltākā ceturkšņa vidējā ik dienas vidējā gaisa temperatūra (°C) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio10_cell.tif” layername = ”egv_002” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio10_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- 1 1 1 if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio10_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.3 Climate_CHELSA v2.1-bio1 1_cell filename: Climate_CHELSAv2.1-bio11_cell.tif layername: egv_003 English name: Mean daily mean air temperatures (°C) of the coldest quarter (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Gada aukstākā ceturkšņa vidējā ik dienas vidējā gaisa temperatūra (°C) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio11_cell.tif” layername = ”egv_003” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio11_cell.tif” 1 12 df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio11_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.4 Climate_CHELSA v2.1-bio12_cell filename: Climate_CHELSAv2.1-bio12_cell.tif layername: egv_004 English name: Annual precipitation amount (kg m - 2 year - 1 ) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Nokrišņu daudzums (kg m - 2 gadā) gadā (CHELSA v2.1) analīzes šūnā (1 ha) 1 13 Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio12_cell.tif” layername = ”egv_004” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio12_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio12_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 1 14 6.5 Climate_CHELSA v2.1-bio13_cell filename: Climate_CHELSAv2.1-bio13_cell.tif layername: egv_005 English name: Precipitation amount (kg m - 2 month - 1 ) of the wettest month (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Slapjākā mēneša nokrišņu daudzums (kg m - 2 mēnesī) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio13_cell.tif” layername = ”egv_005” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio13_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} 1 15 if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio13_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.6 Climate_CHELSA v2.1-bio14_cell filename: Climate_CHELSAv2.1-bio14_cell.tif layername: egv_006 English name: Precipitation amount (kg m - 2 month - 1 ) of the driest month (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Sausākā mēneša nokrišņu daudzums (kg m - 2 mēnesī) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio14_cell.tif” layername = ”egv_006” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio14_cell.tif” df <- downscale2egv ( 1 16 template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio14_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.7 Climate_CHELSA v2.1-bio15_cell filename: Climate_CHELSAv2.1-bio15_cell.tif layername: egv_007 English name: Precipitation seasonality (kg m - 2 ) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Nokrišņu sezonalitāte (kg m - 2 ) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power 1 17 = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio15_cell.tif” layername = ”egv_007” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio15_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio15_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 1 18 6.8 Climate_CHELSA v2.1-bio16_cell filename: Climate_CHELSAv2.1-bio16_cell.tif layername: egv_008 English name: Mean monthly precipitation amount (kg m - 2 month - 1 ) of the wettest quarter (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Slapjākā ceturkšņa vidējais nokrišņu daudzums mēnesī (kg m - 2 mēnesī) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio16_cell.tif” layername = ”egv_008” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio16_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio16_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 1 19 6.9 Climate_CHELSA v2.1-bio17_cell filename: Climate_CHELSAv2.1-bio17_cell.tif layername: egv_009 English name: Mean monthly precipitation amount (kg m - 2 month - 1 ) of the driest quarter (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Sausākā ceturkšņa vidējais nokrišņu daudzums mēnesī (kg m - 2 mēnesī) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio17_cell.tif” layername = ”egv_009” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio17_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- 120 if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio17_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.10 Climate_CHELSA v2.1-bio18_cell filename: Climate_CHELSAv2.1-bio18_cell.tif layername: egv_010 English name: Mean monthly precipitation amount (kg m - 2 month - 1 ) of the warmest quarter (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Siltākā ceturkšņa vidējais nokrišņu daudzums mēnesī (kg m - 2 mēnesī) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio18_cell.tif” layername = ”egv_010” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio18_cell.tif” 121 df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio18_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.1 1 Climate_CHELSA v2.1-bio19_cell filename: Climate_CHELSAv2.1-bio19_cell.tif layername: egv_011 English name: Mean monthly precipitation amount (kg m - 2 month - 1 ) of the coldest quarter (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Aukstākā ceturkšņa vidējais nokrišņu daudzums mēnesī (kg m - 2 mēnesī) (CHELSA v2.1) analīzes šūnā (1 ha) 122 Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio19_cell.tif” layername = ”egv_011” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio19_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio19_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 123 6.12 Climate_CHELSA v2.1-bio2_cell filename: Climate_CHELSAv2.1-bio2_cell.tif layername: egv_012 English name: Mean diurnal air temperature range (°C) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: V idējā diennakts gaisa temperatūru amplitūda (°C) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio2_cell.tif” layername = ”egv_012” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio2_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} 124 nosaukums = ”Climate_CHELSAv2.1-bio2_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.13 Climate_CHELSA v2.1-bio3_cell filename: Climate_CHELSAv2.1-bio3_cell.tif layername: egv_013 English name: Isothermality (ratio of diurnal variation to annual variation in air temperatures) (°C) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Izotermalitāte (attiecība starp diennakts un gada gaisa temperatūras svārstībām) (°C) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio3_cell.tif” layername = ”egv_013” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio3_cell.tif” df <- downscale2egv ( 125 template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio3_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.14 Climate_CHELSA v2.1-bio4_cell filename: Climate_CHELSAv2.1-bio4_cell.tif layername: egv_014 English name: T emperature seasonality (standard deviation of the monthly mean air temperatures) (°C/100) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: T emperatūru sezonalitāte (mēneša vidējo gaisa temperatūru standartnovirze) (°C/100) (CHELSA v2.1) analīzes šūnā (1 ha) 126 Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio4_cell.tif” layername = ”egv_014” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio4_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio4_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 127 6.15 Climate_CHELSA v2.1-bio5_cell filename: Climate_CHELSAv2.1-bio5_cell.tif layername: egv_015 English name: Mean daily maximum air temperature (°C) of the warmest month (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Siltākā mēneša vidējā ik dienas augstākā gaisa temperatūra (°C) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio5_cell.tif” layername = ”egv_015” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio5_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- 128 if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio5_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.16 Climate_CHELSA v2.1-bio6_cell filename: Climate_CHELSAv2.1-bio6_cell.tif layername: egv_016 English name: Mean daily minimum air temperature (°C) of the coldest month (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Aukstākā mēneša vidējā ik dienas zemākā gaisa temperatūra (°C) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio6_cell.tif” layername = ”egv_016” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio6_cell.tif” 129 df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio6_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.17 Climate_CHELSA v2.1-bio7_cell filename: Climate_CHELSAv2.1-bio7_cell.tif layername: egv_017 English name: Annual range of air temperature (°C) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Gada gaisa temperatūru amplitūda (°C) (CHELSA v2.1) analīzes šūnā (1 ha) 130 Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio7_cell.tif” layername = ”egv_017” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio7_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio7_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 131 6.18 Climate_CHELSA v2.1-bio8_cell filename: Climate_CHELSAv2.1-bio8_cell.tif layername: egv_018 English name: Mean daily mean air temperatures (°C) of the wettest quarter (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Slapjākā ceturkšņa vidējā ik dienas vidējā gaisa temperatūra (°C) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio8_cell.tif” layername = ”egv_018” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio8_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- 132 if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio8_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.19 Climate_CHELSA v2.1-bio9_cell filename: Climate_CHELSAv2.1-bio9_cell.tif layername: egv_019 English name: Mean daily mean air temperatures (°C) of the driest quarter (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Sausākā ceturkšņa vidējā ik dienas vidējā gaisa temperatūra (°C) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-bio9_cell.tif” layername = ”egv_019” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-bio9_cell.tif” 133 df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-bio9_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.20 Climate_CHELSA v2.1-clt-max_cell filename: Climate_CHELSAv2.1-clt-max_cell.tif layername: egv_020 English name: Mean of monthly maximum cloud area fraction (%) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Mēneša maksimumu vidējais mākoņu segums (%) (CHELSA v2.1) analīzes šūnā (1 ha) 134 Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-clt-max_cell.tif” layername = ”egv_020” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-clt-max_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-clt-max_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 135 6.21 Climate_CHELSA v2.1-clt-mean_cell filename: Climate_CHELSAv2.1-clt-mean_cell.tif layername: egv_021 English name: Mean monthly mean cloud area fraction (%) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: V idējais ik mēneša vidējais mākoņu segums (%) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-clt-mean_cell.tif” layername = ”egv_021” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-clt-mean_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} 136 nosaukums = ”Climate_CHELSAv2.1-clt-mean_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.22 Climate_CHELSA v2.1-clt-min_cell filename: Climate_CHELSAv2.1-clt-min_cell.tif layername: egv_022 English name: Mean of monthly minimum cloud area fraction (%) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Mēneša minimumu vidējais mākoņu segums (%) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-clt-min_cell.tif” layername = ”egv_022” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-clt-min_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , 137 grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-clt-min_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.23 Climate_CHELSA v2.1-clt-range_cell filename: Climate_CHELSAv2.1-clt-range_cell.tif layername: egv_023 English name: Annual range of monthly cloud area fraction (%) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Gada mākoņu seguma amplitūda (%) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power 138 = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-clt-range_cell.tif” layername = ”egv_023” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-clt-range_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-clt-range_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 139 6.24 Climate_CHELSA v2.1-cmi-max_cell filename: Climate_CHELSAv2.1-cmi-max_cell.tif layername: egv_024 English name: Mean of monthly maximum climate moisture index (kg m - 2 month - 1 ) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: V idējais ik mēneša maksimālais klimata mitruma indekss (kg m - 2 month - 1 ) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-cmi-max_cell.tif” layername = ”egv_024” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-cmi-max_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-cmi-max_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 140 6.25 Climate_CHELSA v2.1-cmi-mean_cell filename: Climate_CHELSAv2.1-cmi-mean_cell.tif layername: egv_025 English name: Mean of monthly mean climate moisture index (kg m - 2 month - 1 ) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: V idējais ik mēneša vidējais klimata mitruma indekss (kg m - 2 month - 1 ) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-cmi-mean_cell.tif” layername = ”egv_025” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-cmi-mean_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- 141 if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-cmi-mean_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.26 Climate_CHELSA v2.1-cmi-min_cell filename: Climate_CHELSAv2.1-cmi-min_cell.tif layername: egv_026 English name: Mean of monthly minimum climate moisture index (kg m - 2 month - 1 ) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: V idējais ik mēneša minimālais klimata mitruma indekss (kg m - 2 month - 1 ) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-cmi-min_cell.tif” layername = ”egv_026” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-cmi-min_cell.tif” 142 df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-cmi-min_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.27 Climate_CHELSA v2.1-cmi-range_cell filename: Climate_CHELSAv2.1-cmi-range_cell.tif layername: egv_027 English name: Annual range of monthly climate moisture index (kg m - 2 month - 1 ) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Gada klimata mitruma indeksa amplitūda (kg m - 2 month - 1 ) (CHELSA v2.1) analīzes šūnā (1 ha) 143 Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-cmi-range_cell.tif” layername = ”egv_027” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-cmi-range_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-cmi-range_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 144 6.28 Climate_CHELSA v2.1-fcf_cell filename: Climate_CHELSAv2.1-fcf_cell.tif layername: egv_028 English name: Frost change frequency (number of events in which tmin or tmax go above or below 0°C) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Sasalšanas gadījumu biežums (zemākā vai augstākā temperatūra šķērso 0°C) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-fcf_cell.tif” layername = ”egv_028” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-fcf_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- 145 if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-fcf_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.29 Climate_CHELSA v2.1-fgd_cell filename: Climate_CHELSAv2.1-fgd_cell.tif layername: egv_029 English name: First day of the growing season (TREELIM) (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: V eģetācijas sezonas pirmā diena (TREELIM) (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-fgd_cell.tif” layername = ”egv_029” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-fgd_cell.tif” df <- downscale2egv ( 146 template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-fgd_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 6.30 Climate_CHELSA v2.1-gdd0_cell filename: Climate_CHELSAv2.1-gdd0_cell.tif layername: egv_030 English name: Growing degree days temerature sum above 0°C (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Aktīvo temperatūru summa no 0°C (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power 147 = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-gdd0_cell.tif” layername = ”egv_030” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-gdd0_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-gdd0_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 148 6.31 Climate_CHELSA v2.1-gdd10_cell filename: Climate_CHELSAv2.1-gdd10_cell.tif layername: egv_031 English name: Growing degree days temerature sum above 10°C (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Aktīvo temperatūru summa no 10°C (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-gdd10_cell.tif” layername = ”egv_031” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-gdd10_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} if ( ! require (tidyverse)) { install.packages ( ”tidyverse” ); require (tid yverse)} nosaukums = ”Climate_CHELSAv2.1-gdd10_cell.tif” ielasisanas_cels = paste0 ( ”./RasterGrids_100m/2024/RAW/” ,nosaukums) saglabasanas_cels = paste0 ( ”./RasterGrids_100m/2024/Scaled/” ,nosaukums) slanis = rast (ielasisanas_cels) videjais = global (slanis, fun= ”mean” , na.rm= TRUE ) centrets = slanis - videjais[, 1 ] standartnovirze = terra :: global (centrets, fun= ”rms” , na.rm= TRUE ) merogots = centrets / standartnovirze[, 1 ] writeRaster (merogots, filename= saglabasanas_cels, overwrite= TRUE ) 149 6.32 Climate_CHELSA v2.1-gdd5_cell filename: Climate_CHELSAv2.1-gdd5_cell.tif layername: egv_032 English name: Growing degree days temerature sum above 5°C (CHELSA v2.1) within the analysis cell (1 ha) Latvian name: Aktīvo temperatūru summa no 5°C (CHELSA v2.1) analīzes šūnā (1 ha) Pr ocedur e: Directly follows CHELSA v2.1 . EGV is prepared using the workflow egv- tools::downscale2egv() with inverse distance weighted (power = 2) gap filling and soft smoothing (power = 0.5) over 5 km radius around each cell. Finally , the layer is standardised by subtracting the arithmetic mean and dividing by the root mean squared error . # libs ---- if ( ! require (egvtools)) {remotes :: install_github ( ”aavotin s/egvtools” ); require (egvtools)} # job ---- localname = ”Climate_CHELSAv2.1-gdd5_cell.tif” layername = ”egv_032” reading = ”./Geodata/2024/CHELSA/Climate_CHELSAv2.1-gdd5_cell.tif” df <- downscale2egv ( template_path = ”./Templates/TemplateRasters/LV100m_10km.tif” , grid_path = ”./Templates/TemplateGrids/tikls1km_sauzeme.parquet” , rawfile_path = reading, out_path = ”./RasterGrids_100m/2024/RAW/” , file_name = localname, layer_name = layername, fill_gaps = TRUE , smooth = TRUE , smooth_radius_km = 5 , plot_result = TRUE ) print (df) # standardisation ---- if ( ! require (terra)) { install.packages ( ”terra” ); require (terra)} 150 [Document text truncated for crawler view.]