Is there a way to get the cluster or xytolerance from a shapefile into python using free/open source software?

I'm currently using the pyshp package and can't see methods for this anywhere. Also it doesn't seem to appear in the WKT of the .prj file.

1 Answer 1


This ESRI link suggests that shapefiles, unlike geodatabases do not have an XY Tolerance.

Under geometry limitations:

Shapefiles do not contain an XY tolerance like geodatabase feature classes. The XY tolerance is the minimum distance between coordinates before they are considered equal. This XY tolerance is used when evaluating relationships between features within the same feature class or between several different feature classes. It is also used extensively when editing features. If you are performing any sort of operation involving comparison between features, such as use of Overlay tools, the Clip tool, the Select Layer By Location tool, or nearly every tool that takes two or more feature classes as input, you should be using geodatabase feature classes (which have an XY tolerance) rather than shapefiles.

  • 2
    'Cluster tolerance' is an ESRI term although other GIS sometimes use similar terms. The cluster tolerance in ESRI is a software-specific environment setting and not inherent to the shapefile format. Commented Jan 11, 2013 at 15:09
  • For the non-esri-geodatabase feature classes, they default to the equivalent of 0.1mm in the units of the coordinate system of the data (or 1mm depending on the source you read). For a meter-based system like UTM, it would be .001 meters. Again, this is an esri software thing, it is not an attribute of the data set that is stored in a shapefile.
    – DavidF
    Commented Jan 11, 2013 at 15:14
  • 1
    +1 This is absolutely correct. Not only do shapefiles use doubles to store coordinates (tolerances are relevant to, and needed for, integer coordinates only), but the authoritative shapefile technical description contains no reference to a tolerance or anything related to it.
    – whuber
    Commented Jan 11, 2013 at 15:34
  • As an aside why would anyone store coordinates in doubles? Doesn't that mean precision varies depending on position? Commented Jan 14, 2013 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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