This R code is used to convert raster into csv file format with coordinates geometry as wkt. Pay close attention to arguments and how they should be used in each loop. This code only works for relatively small raster, without a huge density.
csv-wkt-to-uv3 - Nils Hamel, Huriel Reichel
Copyright (c) 2020 Republic and Canton of Geneva
This program is licensed under the terms of the GNU GPLv3. Documentation and illustrations are licensed under the terms of the CC BY-NC-SA.
R 3.6.3 or superior and an IDE to run it, normally RStudio or Emacs.
CRAN packages can be installed with install.packages("packagename")
-
rgdal 1.15-18
-
sf 0.9.6
-
raster 3.4.5