Post date: Sep 26, 2014 5:27:16 PM
After researching a bunch of options for the tabulate area tool, it looks like a geoprocessing service is they way to go. I have been fighting with Python the past week or so and hoped there must be a better development environment than what I was using. So ... taking a step back here are some helpful hints.
1. Install PythonWin as Python IDE: http://resources.arcgis.com/en/help/main/10.1/index.html#//002100000021000000
2. Configure PythonWin as your Python Editor in ArcGIS: Menubar in ArcGIS > Geoprocessing > Geoprocessing Options; Browse to PythonWin location; Note that it may take a few seconds for PythonWin to open
3. Work though 'Executing and debugging Python" in ArcGIS Help: http://resources.arcgis.com/en/help/main/10.2/index.html#/Executing_and_debugging_Python/002100000022000000/; Sample data paths in 10.2 are:
input workspace: "C:\arcgis\ArcTutor\GP Service Examples\ClipAndShip\ToolData\Zion.gdb"
clip feature class: "C:\arcgis\ArcTutor\GP Service Examples\ClipAndShip\ToolData\Zion.gdb\Park_boundary"
output workspace: "C:\arcgis\ArcTutor\GP Service Examples\ClipAndShip\Scratch\Scratch.gdb"
4. Use arcpy.SetParameterAsText(4, "blah") to set output parameters. Note that the ordinal includes both input AND output parameters. So if you have one input parameter, your first output parameter will be 1.
5. Defining parameter data types in a Python Toolbox: http://resources.arcgis.com/en/help/main/10.2/index.html#/Defining_parameter_data_types_in_a_Python_toolbox/001500000035000000; Accessing parameters in a Python toolbox is a little different:
input1 = parameters[0].valueAsText
parameters[1].value = json.dumps(response)