Please, i am creating lines using arcpy.array(point1,point2) --> arcpy.Polyline...but my ArcGIS create lines only with shape lenght 0.0002 and longer...why ?? I want to create also shorter lines cause my points are very close to each other. Is it something with arcpy.env.XYTolerance or Resolution? Thanks for your advices...


the tolerance is linked with your feature class and not with the processing tools. XY tolerance won't help you to go below this tolerance (see ArcGIS help caption)

If the x,y tolerance is less than twice the output geodataset's x,y resolution value, an x,y tolerance of two times the x,y resolution will be used

You can set the precision of your feature class when you create a feature class manually, but I don't think that it is possible to do it in arcpy. If you need to create many feature classes in a script, the best workaround I know is to create a feature dataset manually and create your new feature classes into it: the new feature classes will have the same XY tolerance as the feature dataset).

  • For processing tools, you use the env module to set XYTolerance, ie. arcpy.env.XYTolerance. When creating a featureclass, arcpy can set the XYTolerance via the Spatial Reference object. – klewis Feb 17 '14 at 14:36

I recommend setting the Geometry's Spatial Reference before inputting the coordinates. The SR has its own XYTolerance and XYResolution, that you can view or change. I had a very similar issue when working with Lat/Long data as you describe.


I solved it. It was like post from "klewis". I had my FC in WGS84 and there couldnt be shorter line than 0,0002 (I dont know why). In my script , when the geometry were created, I project these FCs to UTM34N . So I changed these steps (first project empty FC and then fill it with geometry) and it works for me. Sorry for my English and Thanks for your advices :)

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.