Category: Python

How to Debug Python Toolboxes in 3 Easy Steps

This blog demonstrates how you can debug a Python Toolbox (.pyt) to troubleshoot and fix any errors that may be causing your tool to fail or produce invalid results.

Python Toolboxes are new at ArcGIS 10.1 and provide a new way to create geoprocessing tools entirely in Python with no requirement to use ArcGIS for Desktop. Continue reading

Posted in Python | Tagged , | 13 Comments

Avoiding GUI headaches: a case for scripting geoprocessing tools

Sometimes it can be a real pain to use a graphic user interface, or GUI. With ArcGIS geoprocessing tools we have tried to make the tool GUI, the tool dialog, easy to use. But sometimes the repetitive nature of a task can make using a tool dialog time-consuming and inefficient. Continue reading

Posted in Analysis & Geoprocessing, Python | 9 Comments

Python scripting with 64-bit processing

Last week 64-bit Background Geoprocessing was made available for download. We’ve had a few questions from keen Python scripters who want to “get out of the application” and use their big data crunching scripts in 64-bit. If you’re one of those keen scripters, all you need to do is make sure you’re executing against 64-bit Python; no other special commands or tricks needed. Continue reading

Posted in Analysis & Geoprocessing, Python | Tagged , , , | 7 Comments

Take Advantage of Keyword Arguments

This short blog explains and demonstrates that our arcpy and arcgisscripting modules support the use of keyword arguments and by using them; you can avoid long tool signatures. Keyword arguments are associated with function calls. In our arcpy and arcgisscripting modules, geoprocessing tools are considered functions. When you use keyword arguments in a function call, the caller identifies the arguments by the parameter name. This allows you to skip arguments or specify them in a different order. Let us look at two examples: Continue reading

Posted in Python | Tagged , , | 4 Comments

The new ScratchGDB and ScratchFolder environments


One of the enhancements to the 10.1 release was the addition of two new environment variables (scratchFolder and scratchGDB) as mentioned in the What’s New for Geoprocessing in 10.1. (If you haven’t read it, check out all enhancements!). While new … Continue reading

Posted in Analysis & Geoprocessing, Python | Tagged , , , , , , | Leave a comment

Multiprocessing with ArcGIS – Approaches and Considerations (Part 1)


The multiprocessing Python module provides functionality for distributing work between multiple processes on a given machine, taking advantage of multiple CPU cores and larger amounts of available system memory. When analyzing or working with large amounts of data in ArcGIS, … Continue reading

Posted in Analysis & Geoprocessing, Python | Tagged , , , , , | 9 Comments

A simple approach for including 3rd party Python libraries with your scripts


Often times, your Python scripts require 3rd party Python libraries. For example, the sample tools located here: requires xlrd, xlwt, and openpyxl Python libraries. This sample includes all of the dependent libraries, and demonstrates just how easy it is. … Continue reading

Posted in Python | 9 Comments

Field mapping and Python scripting

Field Map in the Append (Managemnet) tool dialog

A number of geoprocessing tools including Spatial Join (Analysis), Append (Management), Merge (Management), Feature Class To Feature Class (Conversion), and Table To Table (Conversion), have a parameter for controlling how fields from the input dataset(s) are processed and written, or … Continue reading

Posted in Analysis & Geoprocessing, Python | Tagged , , | 23 Comments

Python Add-Ins – How to add built-in commands to your custom toolbar or menu


This blog shows how you can add existing built-in commands to your existing custom toolbar or menu. ArcGIS 10.1 introduced Python to the list of languages for creating desktop add-ins. To get started with Python add-ins or to learn more … Continue reading

Posted in Developer, Python | Tagged , , | 9 Comments

ArcGIS 10.0 Service Pack 5

In an ongoing effort to improve the quality of ArcGIS, I’m happy to announce the release of ArcGIS 10.0 Service Pack 5

This Service Pack includes many fixes since the 10.0 release. Here is list of issues fixed in SP5. If you have any feedback or questions regarding this service pack, please post in the ArcGIS Resource Center Forums or contact Esri Support.

If you have additional enhancements or ideas that you would like to see included in future service packs or releases, please post them on the ArcGIS Ideas site.

Posted in 3D GIS, Analysis & Geoprocessing, Defense, Developer, Editing, Geodata, Imagery, Local Government, Python, Spatial Statistics | Tagged , , , , , , , , | 15 Comments