# Distance of points to a polygon, inside and out, without Proximity toolset, ArcGIS 10.3.1 Desktop

I have a very large data set of points representing residential properties and i need to calculate the closest distance to the boundary of one polygon from each point. Preferably a positive value for those outside the polygon and negative for those within. (Example below.)

I have been looking through various other questions similar to this but most users either have access to QGIS or the Proximity toolset within Arc. I have access to neither of these but am hoping there is an alternative way of calculating this distance? I really do not want to sit and measure out the distance from each point manually, there are over 700 points!

In order to calculate the nearest distance of polygon features to your points (not using QGIS or anything in the proximity toolbox), you could perform a spatial join. You should choose CLOSEST for your match option and add a descriptor for your distance field name which is what will be filled with your near distances.

This will work well for all of your points that are outside of polygons. However, all points that are within polygons will be tagged with 0 because they are within the polygon feature. To get the distance of points that are within your polygon features, you should convert polygons to lines and run the spatial join with points and lines. However, this will not distinguish between negative and positive distances.

• +1: you could add one last step where you select points inside a polygon and multiply their distance by -1 in order to fully answer OPs needs Sep 6, 2016 at 14:20
• There aren't too many points within the polygon so I don't mind too much measuring these by hand. The spatial join worked perfectly, all the distances are in the new column created. Sep 6, 2016 at 14:35
• how are the distance from the point to the polygon calculated? does it measure from the point to the closest spot on the polygon or does it measure the point to the centroid of the polygon...? Sep 6, 2016 at 15:08
• The spatial join returns the distance between the point feature and the nearest spot on the polygon. Sep 6, 2016 at 15:17

Alternatively to the spatial join suggested by @mmoore, which is the most precise solution and does not need any extension, you could use spatial analyst tools.

1a) convert polygon to lines

1b) convert polygon to raster

2) calculate the euclidian distance to the polygon boundaries (lines from step 1a)

2b) convert the extents of the polygon to negative values with raster calculator

``````Con(Isnull("polygons", 1, -1))
``````

3) multiply the results of steps 2a and 2b (so that you have negative distances inside the polygons)

4) use extract multivalue to point with bilinear interpolation to get your final result

• why do you convert the extents of the polygon to negative values? for the points inside the polygon? Sep 6, 2016 at 14:54
• @ziggy : exactly, this is the raster alternative of selecting by attribute the points inside the polygon then multiplying by -1 with field calculator. Sep 7, 2016 at 7:53