Select to view content in your preferred language

What can I expect from ArcPy Geometry .equals method?

3171
10
03-12-2019 08:59 AM
DarrenSmith
New Contributor III

My work flow is as follows:

  1. I extract the start and end point geometries from two polylines using the .firstPoint and .lastPoint properties of the ArcPy Geometry class.
  2. Then I compare these points (which should be snapped at one end) with each other using the .equals method in the ArcPy Geometry class, to try to determine which end of the lines are connected to one another.
  3. This works in most cases, but ocassionally fails to find a match.

My question is: what can I expect from using the .equals method, i.e. does attempt to handle floating point precision, or should I adopt an alternative approach?

Thanks,

Darren

0 Kudos
10 Replies
DanPatterson_Retired
MVP Emeritus

I haven't noticed any change in representation of a 'result' as per my previous post 

https://community.esri.com/thread/230257-what-can-i-expect-from-arcpy-geometry-equals-method#comment... 

The only time that this appears to be the case is when the geometries are first being created (my initial post) and not when a result of a geoprocessing operation has occurred (ie an intersection of two lines).