I'm using ArcMap 10.3 on Windows 10 and I have the 3D analyst, ArcScan, Geo-statistical analyst, network analyst, publisher, schematics, spatial analyst and tracking analyst extensions.

How do I calculate the distances from my points (n = 157) to the polygons (n = 1891) that are within a 2km buffer around the points with the intent to use the distances in SPSS analysis and to generate a habitat suitability model using ArcMap (which will involve rasters)?

This is what the points and polygons within a 2km buffer look like:


The Generate Near Table tool produces the following: example

This isn't very useful, as the object_ID field is blank so there is no way to know which polygon the distance refers to. I need to know this as the polygons represent habitat types and want to find out the distance from the point to all the habitats within the buffer. Is there a way to do this? I've tried inverting the calculation (i.e. select the polygons that are closer by and run the near distance from the polygon to the point rather tan from the point to the polygon) but that didn't fix the problem of not knowing what habitats the polygons are.

I have tried selecting by attribute to select pertinent habitats (e.g. woodlands) but doing this then causes a generic 999999 error when using the Near or Near Table tool. I've also tried selecting by attribute and exporting the table, but didn't realise the resulting table can't be used in Near.

I used the "planar" method when using the Near tool and my data are in the Irish grid coordinate system.

I've tried the euclidean distance tool, but I've no idea what to do with the output (i.e. the "heat map" type output and the lack of an attribute table).

  • Create buffers around you points, no dissolve. Intersect with you polygons. Output table will have a list of polygons within 2 km of the point.
    – FelixIP
    Aug 6, 2016 at 9:47
  • I don't think that publisher extension will help you on this task
    – FelixIP
    Aug 6, 2016 at 9:50
  • I have done this. Yes it gives a list of the polygons but I need the distance between the centre point and each polygon.
    – rakuenvi
    Aug 6, 2016 at 12:27
  • When you say "I need the distance between the centre point and each polygon" do you mean that you want to work out for the centroid of every polygon what the distance is to every other polygon within 2km?
    – PolyGeo
    Aug 8, 2016 at 10:18
  • No, by centre point I meant the point in the centre of the buffer. Sorry, that was not very clear. I want to obtain the distance from the points (which are all going to be in the centre of the 2km buffers) to all polygons within the buffer.
    – rakuenvi
    Aug 8, 2016 at 10:31

2 Answers 2


Near table will only give you the nearest polygons. You've stated that you have used Generate Near Table and it didn't help.

In the absence of more details about your data and the parameters you've set, I don't see any reason why it didn't work with following parameters:

  • Input Features: Your Points
  • Near Features: Your Polygons
  • Search Radius: 2000 meters
  • Uncheck Find only closest feature.
  • Thanks for this, I ran this and have put the resulting table in the question. This table isn't very useful, as the object_ID field is blank (it's zero for all table entries) so there is no way to know which polygon the distance refers to (or am I missing something? I can't 'zoom to' so I assume there is no location associated with the distances?). There's no point having the distances if I don't know what polygon they apply to.
    – rakuenvi
    Aug 6, 2016 at 18:40
  • 1
    If the resulting table has no use for you, then I only assume that one of your input files are broken. Make sure that both files are projected and have unique IDs.
    – Celik A
    Aug 7, 2016 at 8:05
  • Thanks for this comment. I've checked the projections and the IDs, both look fine to me but again I could be missing something. I've been told a python script can do it but I'm not familiar with python.
    – rakuenvi
    Aug 9, 2016 at 18:44
  • Can you share 1 point and 1 polygon from your data? So we can also understand what's missing.
    – Celik A
    Aug 11, 2016 at 10:57
  • I finally found a way to do this - by using select by attribute I could find the distance between the point and the nearest polygon of a certain habitat type. It's tedious as there are ~100 habitat types, but it works and using pivot tables in excel I can have a nice table sheet on distances.
    – rakuenvi
    Aug 18, 2016 at 13:22

This answer addresses this issue which was previously contained within your changing question:

Using the Near tool adds one column to the point's attribute table and the column doesn't make any sense, with NEAR_DIST values like -1

We cannot see the parameters that you supplied to the Near tool but as you will see from its documentation the NEAR_DIST field holds:

The distance between the input and near feature. The value is in the linear unit of the input features coordinate system, or Meters when the Method parameter is set to GEODESIC and the input is in a geographic coordinate system. If no near feature is found, the value will be -1.

Since it depends on the linear unit of the input features coordinate system or is Meters when the Method parameter is set to GEODESIC and the input is in a geographic coordinate system the coordinate system of your input features and the METHOD setting you used are two pieces of information we would need from you before assessing whether anything seems astray with your workflow or the software.

  • Thank you, this was helpful but I'm still having trouble with getting the distances. I used the "planar" method when using the near tool and my data are in the Irish grid coordinate system. I'll also add these details to the question.
    – rakuenvi
    Aug 8, 2016 at 10:02
  • Your question is still a mix of symptoms from Near and Generate Near Table so I think you should focus it on one so that either my (Near) answer or the other (Generate Neat Table) answer can be assessed. For Near I would like to know what values were used for every parameter on the tool dialog to get the table of outputs in your picture.
    – PolyGeo
    Aug 8, 2016 at 10:16
  • I don't know what other parameters to tell you - I put the point data into the input feature and the polygons in to the near feature (I have tried inverting this since), I left all boxes unchecked and used the "planar" method. I'm still having great trouble with this and have a friend who might write a python script to do this for me, but I can't figure out how to do this in ArcMap.
    – rakuenvi
    Aug 9, 2016 at 18:42

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.