1

This question already has an answer here:

I have an arcpy script which clips (Clip_analysis) a shapefile of polygons to a grid square, converts any multipart polygons created to singlepart polygons (MultipartToSinglepart_management), runs dissolve (Dissolve_management) and then gets the area of the dissolved polygon to get the proportion of the grid square that is covered by polygons.

In the arcpy, the clipping is done using a 400m x 400m rectangular arcpy.Polygon, created from a point array. When replicated in arcGIS desktop, I used a polygon shapefile with one feature (the same rectangle as used in the arcpy).

This script has been run many times without issue, but now I get an error in a particular (400m x 400m) grid square:

Error 999999: Error executing function.
Invalid Topology [Y coord limit exceeded.]
Failed to execute (Dissolve)

I can replicate the error using shapefiles/geodatabases and ArcGIS tools (10.1). The grid square is nowhere near the extents of the coordinate system (the grid square is in London and the Coordinate system is British National Grid (EPSG: 27700)), and the grid squares North, East, South and West of that square all work fine.

The grid square only contains two small triangles from the same original polygon, and neither extend further than 75cm from the base of the grid square. If I manually edit the polygon to extend over 1m from the base of the grid square, dissolve works fine.

I've tried repairing the geometry, but that didn't help. I have tried various XY Resolutions and Tolerances (including not set, 1cm and 1m) with no success

What could be causing this error? Is there a work-around?


When I run using the tool dialog, I get the same error, so it looks like a Dissolve tool or data problem, rather than a python problem.

marked as duplicate by PolyGeo arcgis-desktop Aug 28 '16 at 3:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Could it be that the polygon is outside the Processing extent (under Environment Settings) – BERA Jun 14 '16 at 10:18
  • It is set to "Default", and as I say the squares in all other directions work without problems. But you might be right, I will change it to explicitly set the processing extents for each square (possibly including a buffer). – user3245448 Jun 14 '16 at 10:19
  • I have tried explicitly setting the processing extents to easily include the grid square, but I still get the same error. – user3245448 Jun 14 '16 at 10:35
  • 2
    Please edit the question to specify the datatype of the grid square feature class, the coordinate reference system in use, and the XY tolerances associated with the processing request. – Vince Jun 14 '16 at 10:56
  • What happens when you run the Dissolve on the same data from its tool dialog? If that works, but in ArcPy it does not then we will need you to include a code snippet. – PolyGeo Jun 14 '16 at 11:03