Overview of the ArcGIS API for Python

The ArcGIS API for Python is a powerful, modern and easy to use Pythonic library to perform GIS visualization and analysis, spatial data management and GIS system administration tasks that can run both interactively, and using scripts.

A Pythonic GIS API

The ArcGIS API for Python provides a pythonic representation of a GIS. A pythonic API is one which corresponds to Python best practices in its design and uses standard Python constructs and data structures with clean, readable idioms. The API makes it easy and natural for a Python programmer to use ArcGIS, and conversely, an ArcGIS user to script and automate their GIS.

The ArcGIS API for Python is implemented using the online and on-premises web GIS platform provided by ArcGIS Online and ArcGIS Enterprise respectively. The API has Python modules, classes, functions, and types for managing and working with elements of the ArcGIS platform information model.

Architecture of the API

The API is distributed as the arcgis conda package. Within the arcgis package, which represents the generic GIS model, functionality is organized into a number of different modules that makes it simple to use and understand. Each module has a handful of types and functions that are focused towards one aspect of the GIS.

This diagram below depicts the modules present in the API.

The gis module is the most important and provides the entry point into the GIS. It lets you manage users, groups and content in the GIS. GIS admins spend a lot of time on this module.

The modules in green are used to access the various spatial capabilities or geographic datasets in the GIS. These module includes a family of geoprocessing functions, types and other helper objects for working with spatial data of a particular type.

The modules in blue provide additional functionality for your workflows. They include the geocoding module which is for finding places, the geometry module for representing the geometries of feature data and functions for working with them, and the geoprocessing module that makes it easy to import third party geoprocessing tools and work with them.

The modules in orange allow you to visualize GIS data and analysis. This module includes the MapView Jupyter notebook widget for visualizing maps and layers and the mapping module has types and functions for working with web maps and web layers.

arcgis-api-modules

arcgis.gis module

The arcgis.gis module provides an information model for GIS hosted within ArcGIS Online or Portal for ArcGIS. This module provides functionality to manage (create, read, update and delete) GIS users, groups and content. This module is the most important and provides the entry point into the GIS.

arcgis.env module

The arcgis.env module provides a shared environment used by the different modules. It stores globals such as the currently active GIS as well as environment settings that are common among all geoprocessing tools, such as the output spatial reference.

arcgis.features module

Entities located in space with a geometrical representation (such as points, lines or polygons) and a set of properties can be represented as features. The arcgis.features module is used for working with feature data, feature layers and collections of feature layers in the GIS. It also contains the spatial analysis functions which operate against feature data.

arcgis.raster module

Raster data is made up of a grid of cells, where each cell or pixel can have a value. Raster data is useful for storing data that varies continuously, as in a satellite image, a surface of chemical concentrations, or an elevation surface. The arcgis.raster module contains classes and raster analysis functions for working with raster data and imagery layers.

arcgis.network module

The arcgis.network module contains classes and functions for network analysis. Network layers and analysis can be used for operations such as finding the closest facility, the best route for a vehicle, the best routes for a fleet of vehicles, locating facilities using location allocation, calculating an OD cost matrix, and generating service areas.

arcgis.schematics module

Schematics are simplified representations of networks, intended to explain their structure and make the way they operate understandable. The arcgis.schematics module contains the types and functions for working with schematic layers and datasets.

arcgis.geoanalytics module

The arcgis.geoanalytics module provides types and functions for distributed analysis of large feature and tabular datasets. These GeoAnalytics tools work with big data registered in the GIS’s datastores as well as with feature layers.

arcgis.geocoding module

The arcgis.geocoding provides classes and functions for geocoding, batch geocoding and reverse geocoding. Geocoders can find point locations of addresses, business names, and so on. The output points can be visualized on a map, inserted as stops for a route, or loaded as input for spatial analysis.

arcgis.geometry module

The arcgis.geometry module defines useful geometry types for working with geographic information and GIS functionality. It provides functions which use geometric types as input and output as well as functions for easily converting geometries between different representations.

arcgis.geoprocessing module

Users can create and share geoprocessing tools in the GIS. The arcgis.geoprocessing module provides helper types with dynamically created methods to invoke these tools, and provides simple types that can be used as parameters for these tools along with native Python types.

arcgis.realtime module

The arcgis.realtime module provides types and functions for receiving real-time data feeds and sensor data streamed from the GIS to perform continuous processing and analysis. It includes support for stream layers that allow Python scripts to subscribe to the streamed feature data or broadcast updates or alerts.

arcgis.mapping module

The arcgis.mapping module provides components for visualizing GIS data and analysis. This module includes WebMap and WebScene components that enable 2D and 3D mapping and visualization in the GIS. This module also includes mapping layers like MapImageLayer and VectorTileLayer

arcgis.widgets module

The arcgis.widgets module provides components for visualizing GIS data and analysis. This module includes the MapView Jupyter notebook widget for visualizing maps and layers

How this website is organized

The guide pages explain each individual concept of the API and the best practices. The sample notebooks explain how to use the API to write Python scripts, incorporating capabilities such as mapping, query, analysis, geocoding, routing, portal administration, and more to solve real world problems. If you are looking for recipes, you may find them as sample notebooks.

The api reference provides a reference for each class, its properties and methods in the arcgis package. The forum is a geonet community where you can share your thoughts about the API, request for features, conduct polls, report bugs, ask questions and engage with the Python community in general.


Feedback on this topic?