1

This question arises from research into Appending polygon feature classes with already repaired geometry => WARNING 000442: self intersections from Check Geometry?

Before running the code snippet below the properties of feature class rwc_aurukun show:

enter image description here

inputFileGDB = <file_geodatabase_where_all_work_is_done> arcpy.env.workspace = inputFileGDB fcList = <list_of_feature_classes_including_"rwc_aurukun"_as_first_member> arcpy.CreateFeatureclass_management(inputFileGDB,"RWC","POLYGON",fcList[0]) coord_sys = arcpy.Describe(fcList[0]).spatialReference arcpy.DefineProjection_management("RWC", coord_sys) arcpy.env.XYDomain ="-180 -90 180 90" arcpy.env.XYTolerance = "0.000000001 DecimalDegrees" arcpy.Append_management(fcList,"RWC","NO_TEST") 

After running the code snippet the properties of feature class RWC (which is 88 feature classes appended - including rwc_aurukun) show:

enter image description here

How can I control the XY Resolution on the output feature class (RWC)?

My experimentation with arcpy.env.XYDomain and arcpy.env.XYTolerance are not achieving the result that I am after.

5
  • Do you want to merge this with the original post, then steal my answer, or should I repost? Commented Jun 3, 2016 at 2:37
  • The environment only applies if you go out of your way to use it over the preferred defaults. Commented Jun 3, 2016 at 2:38
  • @Vince I'm thinking that I'll make into duplicate, and probably merge, but initial testing has you getting me past both my questions but leaving one last thing that I'm still checking. Commented Jun 3, 2016 at 2:42
  • Are you interested in ArcObjects.. There are finer controls available there but aren't exposed to the desktop interface or arcpy. Commented Jun 3, 2016 at 2:48
  • @MichaelMiles-Stimson I draw the line at ArcPy/Python coding but thanks for the suggestion. Commented Jun 3, 2016 at 3:01

1 Answer 1

1

Using @Vince's answer to the earlier question I am gaining some control.

My code now reads:

inputFileGDB = <file_geodatabase_where_all_work_is_done> arcpy.env.workspace = inputFileGDB fcList = <list_of_feature_classes_including_"rwc_aurukun"_as_first_member> sr = arcpy.Describe(fcList[0]).spatialReference sr.setFalseOriginAndUnits(-400.0,-400.0,10000000.0) # from Vince arcpy.CreateFeatureclass_management(inputFileGDB,"RWC","POLYGON",fcList[0],"SAME_AS_TEMPLATE","SAME_AS_TEMPLATE",sr) arcpy.Append_management(fcList,"RWC","NO_TEST") 

and the properties of the RWC feature class are now:

enter image description here

The only glitch is that 25 self intersections still remain but these now seem tiny and after a Repair Geometry were gone.

Executing: CheckGeometry C:\Temp\DCDB\Staging.gdb\RWC C:\Temp\DCDB\Staging.gdb\RWC_cg Start Time: Fri Jun 03 12:35:37 2016 WARNING 000442: self intersections at 12986 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 16714 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 20151 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 26613 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 26629 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 29669 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 30888 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 32727 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 32867 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 33207 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 35415 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 38105 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 38197 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 39605 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 41180 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 41498 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 41501 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 43195 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 44768 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 45215 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 45644 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 46692 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 52702 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 53066 in C:\Temp\DCDB\Staging.gdb\RWC WARNING 000442: self intersections at 55112 in C:\Temp\DCDB\Staging.gdb\RWC Succeeded at Fri Jun 03 12:40:28 2016 (Elapsed Time: 4 minutes 50 seconds) 

Adding one more zero in the code above to make the line below resulted in the appended feature class having no geometry errors.

sr.setFalseOriginAndUnits(-400.0,-400.0,100000000.0) 
3
  • 1
    You can go with a smaller resolution, but 1.1cm-sized intersections are likely to be noise Commented Jun 3, 2016 at 3:14
  • @Vince One more zero did the trick. Commented Jun 3, 2016 at 3:54
  • 1
    If it takes a 1.1mm resolution to prevent knots in GCS data, you may need to invest some time into a data quality review. Commented Jun 3, 2016 at 11:04

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.