1

I have written a code to create 1 meter buffers for features of converted feature classes (from rasters). I want to dissolve by the field "Class" so that I will have significantly smaller datasets to work with because the converted feature classes are far to large to do much with. I was able to do the first one using the GUI so it is possible but when I try to run my code I get error 001143. The error does not pop up right away, instead I see it about an hour after execution (the first file is pretty big). I do get the message "[file] is ready for buffer" (Line 13). The error message says the problem is in line 17 which is when I execute the buffer. Are my buffer parameters incorrect? I disabled background processing but nothing changed. I am happy to hear any suggestions and answer questions that you may have.

import os
arcpy.env.workspace = r"C:\Data\ConvertedPolygons.gdb"
arcpy.env.overwriteOutput = True
arcpy.env.addOutputsToMap = False
polygdb = arcpy.ListFeatureClasses()
for fc in polygdb:
    name = fc.split(".")[0]
    if "Test" in name:
        print fc + " was skipped"
    elif "merge" in name:
        print fc + " was skipped"
    else:
        print fc + " ready for buffer"
        outws = r"C:\Data\BufferedPoly.gdb"
        outfc = name + "_buff" 
        outfile = os.path.join(outws, outfc)
        arcpy.Buffer_analysis(fc, outfile, "1 Meter", "FULL", "ROUND", "LIST", "Class" )
  • A couple of questions I have... What do you mean that by dissolving, you are reducing the size of the datasets? If it's the same geometry, there are just fewer records, I don't know if the size is reduced that much. Sometimes dissolving a bunch of complex lines makes it more cumbersome, actually. Second, are you working from a single geodatabase? Sometimes that help things out. Goodluck! – Tangnar Jan 27 '15 at 20:49
  • I'm trying to reduce the number of records.I don't know how to make the actual size of the file smaller but reducing the record count would help as well. Eventually I will merge all of these. I have already done this for the converted feature classes and the resulting merged dataset has over 10 million records. As for the geodatabases, all of the converted feature classes are in one geodatabase and I putting the results in another one. – Tiffany Jan 28 '15 at 21:09
  • with the size of your dataset, you might consider this method that arc has called "tiled processing". that could help, as you might be maxing your machine's memory? you also might run in to issues of working in two separate gdbs but I'm not sure. – Tangnar Jan 28 '15 at 21:35
  • I think you're right, I'm running out of memory. I looked into the tiled processing and the link you gave says that the tiling processesing logic is built into the buffer tool when using the disslove option (which I am dissolving by a field) I didn't see a way to implement it otherwise. What can I do? – Tiffany Jan 29 '15 at 17:46
  • I see what you're saying about the tiled processing, didn't realize that automatic thing and not an option for processing. In that case, it looks like you'll need to reduce your data somehow. Resample raster? or divide your feature classes up somehow. or find a bigger machine to run these processes on. Are there 10 million polygons? That's a lot of vertices to deal with then. – Tangnar Jan 29 '15 at 18:16
1

Looks like you're running out of memory on with the size of your dataset. In that case, it looks like you'll need to reduce your data somehow. Resample raster? or divide your feature classes up somehow. or find a bigger machine to run these processes on. Are there 10 million polygons? That's a lot of vertices to deal with then.

goodluck.

1

After doing a bit of forum research, it appears you might be bumping into a few things.

  1. Restart the machine (worth a shot)
  2. Turn off background geoprocessing (You've done this)
  3. Check the name of any output/input files for any tools

I would maybe put a print statement after the assignment of the "outfile" variable

print outfile

Take a look at the structure of the final name after the join, and see if there are anything like hyphens or special characters and spaces in there. This can cause errors to take place for some of the tools, so its good to work those out.

  • I did as you suggested and the output file looks fine so it's not that. Also I think I would get a different error saying that the folder could not be found or the parameter is incorrect if the output path is incorrect. – Tiffany Jan 29 '15 at 17:48

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.