How print nearest object?

625
1
Jump to solution
04-16-2021 07:23 PM
Labels (3)
Radzhabad
New Contributor II

 

I have point on map. I want found nearest object. Code works perfect. System show 1 occurence. But how get it? opori_path element

point = arcpy.Point(5285360.478599999, 5310336.491400003)
ptGeometry = arcpy.PointGeometry(point)
x = arcpy.analysis.Near(ptGeometry, opori_path, None, "NO_LOCATION", "NO_ANGLE", "PLANAR", "NEAR_FID;NEAR_DIST;NEAR_FC")
            

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

See the second code example

Near (Analysis)—ArcGIS Pro | Documentation

A dictionary is produced with the target and near ids.

In the interim, try 

print(x)

to at least see what you have for the value(s) you collected for the near analysis


... sort of retired...

View solution in original post

0 Kudos
1 Reply
DanPatterson
MVP Esteemed Contributor

See the second code example

Near (Analysis)—ArcGIS Pro | Documentation

A dictionary is produced with the target and near ids.

In the interim, try 

print(x)

to at least see what you have for the value(s) you collected for the near analysis


... sort of retired...
0 Kudos