samedi 24 janvier 2015

How to relate data values from two raster layers?


This is my second posting !


1 Background


I have a number of ASCII files containing a set of single values X, each set in a 1km x 1km grid – the start of each file looks like this:



NCOLS 700
NROWS 1300
XLLCENTER 0
YLLCENTER 0
CELLSIZE 1000
NODATA_VALUE -9999
-9999 -9999 -9999 -9999 ...


These load into QGIS as raster layers and overlay my geographic area correctly. I have a vector height contour layer loaded and I have used the Interpolation plugin and it's inverse distance weighting (IDW) method to generate a raster layer for a small test extent of my map – this creates [ very slowly! ] an ASCII file with the same structure as my X value raster layer files, where XLLCORNER and YLLCORNER are the origin for this raster data, and the values are the IDW weighted heights for each cell. These are loaded into QGIS and look ok.


2 My problem


From these two raster layers I want to obtain a set of X and height values for each corresponding cell. There is a method of collating information between two vector layers into a third layer but I have not figured out how to do a similar feat with raster files. I really need to be able to obtain these combined values from a 'rubber banded' area or a polygon [I.e. long narrow strip] and in the form of an output file. I assume a solution will require that the cell sizes are the same, which is fair!


3 My Question


Can anyone indicate a possible solution ?


The icing on the cake would be use a script, as I have a lot of files to get data from !


Thanks.





Aucun commentaire:

Enregistrer un commentaire