Select to view content in your preferred language

Need query_point_and_distance Clarification

180
1
08-02-2024 09:56 AM
Labels (1)
usdajoy
Emerging Contributor

I am looking for help in understanding what values and the order they are returned when using the query_point_and_distance function on a Polyline.

From the confusing documentation it says:
Finds the Point on the Polyline nearest to the in_point and the distance between those points. query_point_and_distance retrieves information about the side of the line the in_point is on as well as the distance along the line where the nearest point occurs.

So it returns 4 items but in what order? Is this assumed order below correct?  I am really just confused about the 2nd and 3rd item since they are both numbers. Below is an illustration of my assumptions which hopefully clarifies my question.
1) Point on the polyline closest to the in_point
2) Distance from that polyline point to the in_point?
3) Distance from the lowest m-value on the line?
4) The side of the line the in_point is located (True = right, Left = false?)

Example return 
(<PointGeometry object at 0x7f8fa63a2ed0[0x7f8fa653bd50]>, 0.00845121941855845, 0.02991718266293411, True)


query_point_and_distance.png

1 Reply
JohnYaist1
Esri Contributor

The Python API returns results from ArcPy geometry method called queryPointAndDistance. The ArcPy Polyline documentation outlines the details of the return values.

 

JohnYaist1_0-1729011112244.png

 

0 Kudos