what is the fastest/most convenient way to export multiple rasters into a simple single text file (e.g. csv) so that the rows represent the single cells and the columns the values of the single rasters at that specific cell? The rasters (n=12) have all the same resolution and consist of each appr. 250000 cells.
What came into my mind was to generate a point-vector (center points of each raster cell) and then query all rasters at the locations of these points (250000) but I think there must be a more direct way available in GRASS?
gdal2xyz.py from gdal has a -csv switch
(Though never tested the -csv by myself, but the script itself works nicely)
It is not exactly what you want but might be a start if no one else
comes up with a GRASS solution.
should be doable to create a script that integrates gdal2xyz and
combines the values afterwards..
kind regards
Werner
On Wed, Nov 20, 2013 at 3:00 PM, Johannes Radinger
<johannesradinger@gmail.com> wrote:
Hi,
what is the fastest/most convenient way to export multiple rasters into a
simple single text file (e.g. csv) so that the rows represent the single
cells and the columns the values of the single rasters at that specific
cell? The rasters (n=12) have all the same resolution and consist of each
appr. 250000 cells.
What came into my mind was to generate a point-vector (center points of each
raster cell) and then query all rasters at the locations of these points
(250000) but I think there must be a more direct way available in GRASS?
what is the fastest/most convenient way to export multiple rasters into a
simple single text file (e.g. csv) so that the rows represent the single
cells and the columns the values of the single rasters at that specific
cell? The rasters (n=12) have all the same resolution and consist of each
appr. 250000 cells.
What came into my mind was to generate a point-vector (center points of
each raster cell) and then query all rasters at the locations of these
points (250000) but I think there must be a more direct way available in
GRASS?
Any ideas?
Without reading very closely (apologies), did you check r.out.xyz? It's it's
doing the job, just loop it over the maps of interest.
what is the fastest/most convenient way to export multiple rasters into
a simple single text file (e.g. csv) so that the rows represent the
single cells and the columns the values of the single rasters at that
specific cell? The rasters (n=12) have all the same resolution and
consist of each appr. 250000 cells.
What came into my mind was to generate a point-vector (center points of
each raster cell) and then query all rasters at the locations of these
points (250000) but I think there must be a more direct way available in
GRASS?
what is the fastest/most convenient way to export multiple rasters into a simple single text file (e.g. csv) so that the rows represent the single cells and the columns the values of the single rasters at that specific cell? The rasters (n=12) have all the same resolution and consist of each appr. 250000 cells.
What came into my mind was to generate a point-vector (center points of each raster cell) and then query all rasters at the locations of these points (250000) but I think there must be a more direct way available in GRASS?