2

I am new to QGIS, and I would like to know how I can create a raster colour map displaying (through colour) the minimum distance between each of the pixels of the raster and a set of geographic points (lat, long) stored in an ASCII file, so for instance if a pixel is right on top of one of the ASCII points would be green, if one pixels is 30 pixels (or by geographic distance) away from a point it would be red and so on.

1 Answer 1

3

I think what you are trying to create is called Proximity Raster.

enter image description here

As it seems you do not have a supporting raster layer yet, it requires two steps.

  1. Create a raster from your points.
  2. Create a proximity raster from your point raster.

Let me assume you have a point raster (as above, left-hand side figure), with value 1 at your points and -99999 as background nodata.

Below workflow is only about the second step, to create a proximity raster.


From QGIS menu, open Raster | Analysis | Proximity (Raster Distance)

enter image description here

  • Input File: your point raster layer

  • Output file: please give a new filename

  • Values: any value assigned to your point (e.g. 1 for black dots)

  • Dist units: Pixel

  • No data: any background value (e.g. -99999 for white background)

    And hit [OK]. You can color the output raster as Singleband pseudocolor.


First step (to create a raster from ASCII point) is called Rasterize (vector to raster). To focus on proximity I did not touch on it, but you may have not done it before. If so, please search the topic on this site; there are many QAs about rasterize task.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.