I'm learning ArcPy and trying to export models to Python scripts to get a feel for it. I have a model that generalizes a land cover raster by reclassifying and using some other spatial analyst tools (boundary clean, region group, extract by attributes, and nibble). When I export my model each function is under arcpy.gp, e.g.:


And so on. I gather this means "Use the geoprocessing tool Reclassify from the Spatial Analyst extension" but I can't find any documentation for it. I can find arcpy.sa.Reclassify but not the arcpy.gp version. Does anyone know where to look?

  • 2
    If you are learning ArcPy be aware of the Copy As Python Snippet function in the Geoprocessing | Results window. It makes much easier to follow code than exporting models. – PolyGeo Feb 13 '17 at 20:51
  • Thanks - that's a good heads up. Still leaves me wondering where to find documentation for the arcpy.gp functions, though. If that's a default from the export process, you'd think documentation would be easier to find. – Corned Beef Hash Map Feb 13 '17 at 20:52
  • You'll want to use sa in your script. Read this: geonet.esri.com/thread/146373 – ianbroad Feb 13 '17 at 20:54
  • That's helpful. So I guess Esri doesn't provide any documentation for the arcpy.gp functions then, just adds a parameter for output. That's ... frustrating. – Corned Beef Hash Map Feb 13 '17 at 20:56
  • 1
    The documentation is for the sa. You don't need documentation for gp since it'd be the exact same. – ianbroad Feb 13 '17 at 20:59

Where I think you should expect to find the gp module to be documented is via the left hand panel of A quick tour of ArcPy.

However, as you can see it appears not to be documented.

enter image description here

You could submit an ArcGIS Idea to have this addressed for the ArcGIS Desktop architecture but, if it is still an issue for the ArcGIS Pro architecture then it may be better to make that your target.

  • 1
    Thanks for the thorough answer and the pointer to ArcGIS Idea. I don't have access to ArcGIS Pro at this time so I'll submit something for ArcGIS Desktop. – Corned Beef Hash Map Feb 13 '17 at 23:03

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.