4

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
1

I have seen vertices from different features draw and not draw at coincident locations many times. Sometimes the disparity disappears when zooming in, only to reappear at finer zoom levels.

Personally I don't trust ArcMap (or any other program) to maintain faithfulness to the coordinates in the data when drawing. There are just so many different places for recalculations to be made and shortcuts taken when transforming from storage-space to pixel-space (and/or paper-space).

For a specific, example there was a long period of time, from ArcMap 8.0 to 9.2 or so, when certain operations such as clip and intersect during an edit session would cause vertex coordinates to drift and move (CQ00176597). As I understand this was because for performance the display coordinate space was in single precision even when the data itself was double precision.

Perhaps you know this already, but to round out the exploration:

XY resolution is the smallest possible distance between two sets of coordinates.

XY tolerance is when coordinates are considered equal while operating on/with them.

Typically resolution is 0.0001 (1/10th millimetre) and tolerance is 0.001 (1 millimetre).

Tolerance is something that needs to be added, a value added function, not an inherent property. It's used with geoprocessing tools certainly but I wouldn't all be surprised that there are places where tolerance is not called on (like your arcpy script). I don't know how, when or even if XY Tolerance is used in ArcMap. It's probably different at different times and situations.

|improve this answer|||||
3

The ArcGIS 10.0 Help indicates coordinates closer than the XYtolerance are considered identical. The feature coordinates are not identical but are considered identical. Your finding that the features displayed as identical sounds correct. I have not tested the special case where the distance is equal to the XYtolerance. Also, the XYresolution setting (significant digits) may effect the interpretation of the minimum distance.

|improve this answer|||||
  • Sounds plausible, but see my update - I managed to create features smaller than XYTolerance and they weren't displayed as identical – Sideshow Bob Oct 17 '12 at 15:15
  • I think the XYtolerance or cluster tolerance is used more for Geoprocessing such as clip, intersect, etc. You could create topology rules to test "identical" features below and beyond the xytolerence. I'm unsure if the "View" of the data follows all geoprocessing rules. – klewis Oct 17 '12 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.