0

I have shapefiles of lines and points which I need to create a Euclidean distance raster of using the Euclidean distance tool in ArcMap.

The size of the area is about 37,000 km². The boundary shapefile (polygon) is 35 mb in size. I set the cell size to 500 m and the maximum distance of calculation to 80,000 m and the process run time is a few seconds.

However, when I add the region boundary as a mask, the process takes over 2 hours to complete. I have run this task before for another area of comparable size, using the boundary mask of that area and the process ran for only a few seconds.

Why is this taking so long with my area now?

Could there be an issue with the boundary shapefile?

I have already repaired geometries.

3
  • 1
    Point-in-poly on a 35MB geometry is your bane here (O(N*N) algorithm where N = #vertices). Generate a 10x10 fishnet over your study area, Intersect the polygon with it, then use the result as your mask.
    – Vince
    Commented May 14, 2021 at 3:26
  • I tried to create a fishnet grid of 10x10 of the study area but got the error “ERROR 001018: Number of output features exceeds OID limit (2,147,483,647)“. I then tried a 100x100 grid and that ran for 20 mins before I stopped it. I then ran a 500x500 fishnet (took about 10 mins) and intersected it with the boundary polygon, ran the Euclidean distance with the intersection result as the mask and it worked! Another solution is to create the distance raster with the polygon as extent (not mask), the use the extract by mask tool using the boundary polygon as the mask. This took a few minutes.
    – hbk
    Commented May 14, 2021 at 4:50
  • 1
    I meant 10 cells by 10 cells (100 total).
    – Vince
    Commented May 14, 2021 at 11:09

1 Answer 1

1

Thanks to Vince for his advice. I tried to create a fishnet grid of 10x10 of the study area but got the error “ERROR 001018: Number of output features exceeds OID limit (2,147,483,647)“. I then tried a 100x100 grid and that ran for 20 mins before I stopped it. I then ran a 500x500 fishnet (took about 10 mins) and intersected it with the boundary polygon, ran the Euclidean distance with the intersection result as the mask and this worked. This took a few seconds to run.

I have found another solution also. I created the Euclidean distance raster using the study area as the extent (not mask) then I used the extract by mask tool with the boundary polygon as the mask. The results are exactly the same as if I calculate the Euclidean distance using a mask. This took a couple of minutes.

Thanks to Hornbydd, there is a third option. Convert region boundary dataset into a raster of the appropriate pixel size and use that as the mask. The Euclidean tool then does not have to do the internal conversion before computing the distances.

3
  • Try cost distance by converting your polygon to cost of 1.
    – FelixIP
    Commented May 14, 2021 at 8:42
  • 1
    There is another option you could explore. Turn your region boundary dataset into a raster of the appropriate pixel size and use that as the mask. The Euclidean tool then does not have to do the internal conversion before computing the distances.
    – Hornbydd
    Commented May 14, 2021 at 10:20
  • Yes rasterizing the polygon also worked, thanks Hornbydd
    – hbk
    Commented May 15, 2021 at 3:18

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.