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.

I'm working with Arcgis 10.1 and Python 2.7.2

How can I calculate the distance to multiple locations from each cell of my raster?

  • I tried euclidean distance but it only provides the distance to the closest location. I need to know the second closest, third closest and so on until the 150th closest.

  • I tried generating a near table but I'm working with high resolution data. The lowest I could go for this dataset are 1,9 million cells. A near table would generare 150 times 1,9 million rows. Looping through these rows takes up a tremendous amount of time.

    Here is an example (scratch of course) of what I'm trying to accomplish.

enter image description here

Red dots are locations, grid represents (49) cells, green lines are to show the distance.

I thought maybe something with an alternated euclidean distance function or an addition of euclidean distances to each single location. I tried combining euclidean rasters, but it didn't work.

Can anyone help me or point me in the right direction? A solution in python would be appreciated but I'm glad for any idea , workaround, anything...

share|improve this question
How many "locations" are involved? Just 150 or are there many more than that? –  whuber Aug 13 '13 at 15:22

Your Answer


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

Browse other questions tagged or ask your own question.