Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

1 Answer 1

up vote 13 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
1  
In order to rasterize, it seems there must be an existing raster on disk. How do you create that raster??? –  mapBaker Feb 7 '13 at 15:54
    
QGIS 2.0 does't need an existing raster. –  z0r Feb 4 at 7:01
add comment

Your Answer

 
discard

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.