Interesting behaviour:
Two line segments in a dataset have almost, but not quite, identical endpoints. The difference between them is less than the XYTolerance for the data set.
Reading the coordinates into arcpy, they come out as different to one another.
But if I zoom in and in and in, far beyond the XYTolerance, ArcMap still displays them as identical - no gap appears between the lines.
Is this to be expected? Does arc make any guarantees on precision of data drawn on screen, or data passed to arcpy? What will happen if the points are separated by the XYTolerance exactly?
Update: I tried to test the boundary case, but the plot thickens. The following script creates a feature class that displays correctly in ArcMap despite having features smaller than the cluster tolerance. Still I have other data that doesn't display correctly under the same circumstances.
import arcpy
out_polyline_feature_class = arcpy.GetParameterAsText(0)
# t is tolerance
t=0.001
ic = arcpy.InsertCursor(out_polyline_feature_class)
edges = [ [ (0,0), (0,t/2) ],
[ (0,0), (t,0) ],
[ (0,0), (-t,-t) ],
[ (0,0), (-2*t,0) ]
]
line = arcpy.Array()
pnt = arcpy.Point()
for edge in edges:
line.removeAll()
for point in edge:
pnt.X, pnt.Y = point
line.add(pnt)
row = ic.newRow()
row.shape = line
ic.insertRow(row)
del row
del ic