2

I need to create a CSV file with the values of 10 rasters (30m pixel resolution) and 5 polygon layers. Each row of the CSV should represent one pixel of the rasters and the columns should contain the values of all the layers.

The way I used to do this was to create a point to each raster pixel and use Point Sampling Tool to add the values of rasters and polygons to the point layer.

The problem now is that the raster with 30m resolution is too big and contain millions of pixels (generating the same amount of points).

I can create the point layer with millions of features but the Point Sampling Tool is too slow, taking too many hours to complete the work.

Is there any other tool that is faster than the Point Sampling Tool?

Or is there any other way to join the data of every pixel and polygons into the same file and convert it to CSV?

Vince
  • 20,017
  • 15
  • 45
  • 64
Kajo
  • 691
  • 1
  • 6
  • 11
  • I would recommend to use pandas or geopandas together with rioxarray, see some solutions here: https://gis.stackexchange.com/a/358057/87346 and https://gis.stackexchange.com/a/384691/87346 – eurojam Jan 20 '23 at 16:21
  • Have you tried Raster pixels to points then spatial join the other data to the points? I have used this workflow for about 3-4 million points – BERA Jan 20 '23 at 17:12

0 Answers0