Wednesday, 13 June 2018

raster - Nearest distance from point to pixel in QGIS?


I have 1) a point layer and 2) a binary raster file (1 and 0). I need to estimate the Euclidean distance from each point to the nearest "1" pixel. I know there is a tool in ArcGIS but I only have access to QGIS/GRASS; in GRASS there is a clear way to estimate this distance but it's between two vectorial layers (using v.distance).


So far, I tried:



1) in QGIS, the Proximity tool, but it doesn't give me the result I want, since it considers only one raster layer


2) in GRASS, r.distance but I get an error ("Raster map is not CELL"), and I am still trying to figure it out, but I'm still not sure which values will it give me since I don't see any option to select a set of pixels ("1", in this case), instead of all the layer


Does anyone know how to do that in QGIS?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...