2

I have a parcel polygon layer consisting of ~30,000 polygons that can have one of three values for city limits: 0, 1, and null. I execute a dissolve on this layer with "Create Multipart Features" checked. The output should be only three polygons -> a 0 polygon, a 1 polygon, and a null polygon. However, when I run dissolve, the result creates 5 polygons instead:

enter image description here

Here is a picture of the end dissolve layer overlaying the labled parcel layer:

enter image description here

as you can see in the picture, all the 0's should be one contiguous multipart parcel with joining lines removed, but instead there are separations.

Things I have tried so far to no avail:

Validated a topology with two rules: Must Not Overlap and Must Not Have Gaps

Used the Repair Geometry tool.

Per request, I have copied the parameters from the geoprocessing task. It is an ordinary polygon feature class in a personal geodatabase:

arcpy.Dissolve_management("C:/Users/cbarber/Desktop/ParcelFabric.mdb/Parcels/ParcelFabric_Parcels","C:/Users/cbarber/Documents/ArcGIS/Default.gdb/ParcelFabric_Parcels_Dissolv8","City_Limits","#","MULTI_PART","DISSOLVE_LINES")
  • Would you be able to re-run your Dissolve (I'm assuming you are doing that from its tool dialog) and then use Geoprocessing | Results to Copy As Python Snippet your parameters/syntax into your Question, please? – PolyGeo Jan 28 '14 at 21:35
  • I have added what you requested. A colleague of mine more familiar with the dataset was able to solve the issue - I have posted it here. If you are viewing this question and have an idea of why our solution worked, feel free to edit my answer with this information. – Conor Jan 28 '14 at 21:57
3

This was solved by a colleague of mine who noticed that errors were only happening in areas with polygons with a value of 0. Apparently if you are dissolving on a numerical field having a "0" value in the dissolve field causes the dissolve behavior to act strangely (we aren't sure if this has to do with also having a null value in this field). We did a quick field calculate to reclass all "0" values as "2" and voila, the dissolve worked perfectly.

We still have no clue as to why the dissolve tool acts strangely when dissolving on "0" values. GIS can be weird sometimes.

2

I just ran the test below to see if I could reproduce your problem in either a file geodatabase or a personal geodatabase using ArcGIS 10.2 for Desktop. Each generates a 3x3 fishnet, then assigns values of 0 and 2 to the DissField (small integer) for 3 polygons each, leaving the last three as null. A Dissolve in either geodatabase type produced the expected result of 3 multi-part polygons.

If you get the same running this test, then it suggests you may need to look more closely at your data to try and figure what may be the key difference(s) in it from the test data I generated to work with here.

arcpy.CreateFileGDB_management("C:/temp","test","CURRENT")
arcpy.CreateFishnet_management("C:/temp/test.gdb/testFishnet","0 0","0 1","1","1","3","3","#","NO_LABELS","#","POLYGON")
arcpy.AddField_management("C:/temp/test.gdb/testFishnet","DissField","SHORT","#","#","#","#","NULLABLE","NON_REQUIRED","#")
with arcpy.da.UpdateCursor("C:/temp/test.gdb/testFishnet",["OID","DissField"]) as cursor:
    for feature in cursor:
        if feature[0] < 4:
            feature[1] = 2
        elif feature[0] > 6:
            feature[1] = 0
        else:
            pass
        cursor.updateRow(feature)
arcpy.Dissolve_management("C:/temp/test.gdb/testFishnet","C:/temp/test.gdb/testDissolve","DissField","#","MULTI_PART","DISSOLVE_LINES")
numFeatures = int(arcpy.GetCount_management("C:/temp/test.gdb/testDissolve").getOutput(0))
print "Dissolve in file geodatabase resulted in " + str(numFeatures) + " features as expected"

arcpy.CreatePersonalGDB_management("C:/temp","test","CURRENT")
arcpy.CreateFishnet_management("C:/temp/test.mdb/testFishnet","0 0","0 1","1","1","3","3","#","NO_LABELS","#","POLYGON")
arcpy.AddField_management("C:/temp/test.mdb/testFishnet","DissField","SHORT","#","#","#","#","NULLABLE","NON_REQUIRED","#")
with arcpy.da.UpdateCursor("C:/temp/test.mdb/testFishnet",["OID","DissField"]) as cursor:
    for feature in cursor:
        if feature[0] < 4:
            feature[1] = 2
        elif feature[0] > 6:
            feature[1] = 0
        else:
            pass
        cursor.updateRow(feature)
arcpy.Dissolve_management("C:/temp/test.mdb/testFishnet","C:/temp/test.mdb/testDissolve","DissField","#","MULTI_PART","DISSOLVE_LINES")
numFeatures = int(arcpy.GetCount_management("C:/temp/test.mdb/testDissolve").getOutput(0))
print "Dissolve in personal geodatabase resulted in " + str(numFeatures) + " features as expected"

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.