Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way of calculating the distance to the nearest points in QGIS? In ArcGIS there is a function called Euclidean Distance, which can take an input vector or raster, and generate a raster of distances.

enter image description here

Is there a similar function in QGIS? I could not find one in the documentation. I did explore the Raster functions in QGIS, and also the Hub Distance calculation fromMMGIS (for a non-raster solution) but I was not able to figure out how do this using either. If a vector approach is the only solution, that could be fine also.

share|improve this question
up vote 15 down vote accepted

First, rasterize your vector layer. You can do it using Rasterize under Raster menu.

Before rasterizing, I'd recommend to create an additional field and fill it with '1' and then select this field when rasterizing.

Second, Raster\Analysis\Proximity

Note that you should have GDALTools turned on in plugins.

share|improve this answer
Thanks - that worked. In theory though, does it make a difference what the field value is? – djq Mar 12 '12 at 13:38
In order to rasterize, it seems there must be an existing raster on disk. How do you create that raster??? – DPSSpatial Feb 7 '13 at 15:54
QGIS 2.0 does't need an existing raster. – z0r Feb 4 '14 at 7:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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