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.