Using Python in ArcGIS Pro Compared to ArcMap

Python has been an integral part of GIS workflows for years, with ArcPy serving as the backbone for automating tasks and enhancing functionality in ArcMap. However, with ArcGIS Pro, Python scripting has become even more powerful and streamlined. In this article, we’ll explore the differences between using Python in ArcMap and ArcGIS Pro, and highlight some of the new features that make Python scripting in Pro more efficient and versatile.

1. ArcPy in ArcGIS Pro

While both ArcMap and ArcGIS Pro use the ArcPy site package, Pro offers expanded functionality and greater flexibility.

  • ArcPy in Pro supports more advanced geoprocessing tools and workflows, including tasks that take advantage of Pro’s multi-threading capabilities.
  • In Pro, ArcPy allows you to interact with multiple map layouts and map frames, giving you more control over map production automation.

ArcGIS Pro’s ArcPy also includes a Map Series module, which enables users to generate map books or multiple map layouts more easily. This makes it highly effective for automating cartographic outputs, such as generating PDFs for reports with custom legends, title blocks, and more.

2. Python 3 vs. Python 2

One of the major changes in ArcGIS Pro is the switch to Python 3 from the Python 2 environment used in ArcMap. While this transition may require users to modify their existing scripts, Python 3 offers several benefits:

  • Enhanced performance with modern features that improve the efficiency of your scripts.
  • Better library support for scientific and numerical operations, which is useful for advanced geospatial analysis.
  • Simpler and more readable syntax, making your scripts easier to write and maintain.

Python 3 also integrates more cleanly with modern data science libraries, making ArcGIS Pro an ideal environment for working with libraries like Pandas, NumPy, and Matplotlib.

3. Jupyter Notebooks in ArcGIS Pro

ArcGIS Pro integrates directly with Jupyter Notebooks, allowing you to use an interactive coding environment for Python scripting and geospatial analysis. This is a significant upgrade from ArcMap, where users typically wrote Python scripts in standalone files or the Python window.

  • Use ArcGIS Notebooks in Pro to combine data analysis, visualization, and Python scripting in a single, interactive document.
  • Jupyter Notebooks in ArcGIS Pro support the use of ArcPy alongside other popular Python libraries, making it easier to perform complex spatial analysis while documenting the process in an interactive format.

This feature makes ArcGIS Pro more appealing to data scientists and users performing reproducible research or those who prefer an interactive environment for developing and testing scripts.

4. ModelBuilder and Python Integration

While both ArcMap and ArcGIS Pro include ModelBuilder, the integration between ModelBuilder and Python is more seamless in ArcGIS Pro. In Pro, you can export your ModelBuilder workflows directly as Python scripts, allowing you to transition from visual model-building to text-based scripting with minimal effort.

  • Exporting models to Python is helpful for automating recurring workflows, particularly when batch processing or running analysis over multiple datasets.
  • Once exported, these Python scripts can be customized and further enhanced, integrating with other Python libraries or functions that aren’t available in ModelBuilder.

This capability allows you to build complex workflows visually and then automate or enhance them using Python, providing a bridge between visual programming and scripting.

5. Multi-Threading and Parallel Processing

ArcGIS Pro supports multi-threading, which means you can run multiple tasks concurrently without blocking the user interface. This makes a significant difference for tasks that take time, such as running large geoprocessing operations or automating map exports.

  • In Python scripting, Pro allows you to execute parallel processing using the arcpy.env.parallelProcessingFactor environment setting. This enables the use of multiple cores in your machine to speed up geoprocessing tasks.
  • For scripts involving large datasets or computationally intensive tasks, this improvement in performance can dramatically reduce processing times, especially when compared to ArcMap’s single-threaded architecture.

6. New Python Functionality in ArcGIS Pro

ArcGIS Pro introduces several new Python functions and classes that weren’t available in ArcMap. These tools enable more advanced workflows and better control over map production, data management, and spatial analysis.

  • Arcpy.mp module: In ArcGIS Pro, the arcpy.mapping module used in ArcMap has been replaced by arcpy.mp, which is more flexible and allows users to work with multiple maps and layouts in a single project. This feature is critical for automating the production of multiple maps from a single script.
  • Tasks and Tools Automation: ArcGIS Pro also supports automating custom Tasks—a feature not available in ArcMap—allowing you to script step-by-step guides for users to follow, which is helpful for workflows that require consistency or training for new team members.

7. Python-Powered Symbology Customization

Another major improvement in ArcGIS Pro is its ability to script symbology changes using ArcPy. This feature is more limited in ArcMap, where symbology settings were not as easily programmable. In Pro, you can write Python scripts to:

  • Dynamically change symbology based on attribute values or external data sources.
  • Apply custom renderers to layers using Python code.
  • Automate the process of applying consistent symbology across multiple maps or projects.

This flexibility is particularly useful in large-scale map production workflows where symbology needs to be consistently applied or modified across multiple datasets.

ArcGIS Pro represents a significant step forward in Python scripting for GIS professionals. The switch to Python 3, combined with enhanced functionality like multi-threading, Jupyter Notebook integration, and expanded ArcPy capabilities, makes Pro far more powerful than ArcMap for automation and custom workflows.

For organizations and individuals migrating from ArcMap, it’s important to recognize that while some scripts may require slight modifications to run in Pro, the overall benefits of the new environment far outweigh the initial adjustments. By embracing ArcGIS Pro’s Python scripting environment, GIS professionals can streamline their workflows, perform more advanced analyses, and deliver results more efficiently.


Resource(s):

https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/introduction-to-arcpy-mp.htm

https://developers.arcgis.com/python/latest/guide/install-and-set-up/arcgis-pro/

https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/python-and-geoprocessing.htm

https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/python-window.htm

https://learn.arcgis.com/en/projects/get-started-with-notebooks-in-arcgis-pro/


We hope that this article has been helpful! If you have any feedback or questions, please feel free to send us an email or connect with us for a chat. The NTGISC team is here to assist you further!

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us