Near: How to get XY coordinates from BOTH shapefiles

713
6
02-22-2021 12:07 PM
New Contributor

Hi everyone!
Hope everybody is doing well.

I'm using the Near Tool to get the minimun distances in between some polygons (parcels) and some lines (roads).

Everything runs smooth and generate two new columns with the XY coordinates of the closest point of the road. But, I would like to get also the XY coordinates of the closest point for each polygon.

(The pic shows how I get the minimum distance correctly and I have the XY (in blue) from the line...
And I would like to get the other XY coordinate (in yellow) as well)

Could anyone help me how to figure out this, please?. I guess the info is there but I don't know how to get it. Any clue will be appreciated. Thank you so much in advance!

I'm using ArcGIS 10.2.

1 Solution

Accepted Solutions
MVP Esteemed Contributor

Generate Near Table (Analysis)—ArcGIS Pro | Documentation

will give origin destination coordinates and a field to use for joining

... sort of retired...
6 Replies
MVP Frequent Contributor

There may be an inbuilt way to do it, but you could just convert your first set of coordinates to a new point feature class (first create a new int field and field calculate the current OBJECTID values so they are mapped to the new feature class.

Do the same analysis with the new points and your polygons, then use the OBJECTID field to table join back to the original line feature class.

New Contributor

Hi David! Thank you for your time!

I have been trying to do what you suggested but I didn't get the result. I am not sure if I haven't done it correctly.

What I did was:

- add the new field to the polygons layer
- Run the Near tool, and converted the first set of coordinates to points, (that belonged to the line but the columns were in the polygon table).
- Run again Near, with the new points and the polygons... but I don't get the coordinates of the polygon... again the same points of the line...

MVP Frequent Contributor

If the generate near table tool Dan mentioned can generate origin coords for the closest polygon edge, then I'd go with that instead tbh.

I think you've got things a bit mixed up, and the poor diagram doesn't help me conceptualize it either.

New Contributor

Yeah! I totally understand! the diagram was not the best, but I really appreciate your time and answer as well! Thank you so much!

MVP Esteemed Contributor

Generate Near Table (Analysis)—ArcGIS Pro | Documentation

will give origin destination coordinates and a field to use for joining

... sort of retired...
New Contributor

Oh! That is perfect, Dan!

That is exactly what I was looking for! Thank you so much!