# ArcGIS

## What it is

ArcGIS is the name Esri gives to a whole family of geospatial software rather
than to one program, and the parts are easiest to tell apart by where each one
runs.

On the desktop the current application is ArcGIS Pro, and its system
requirements list Microsoft Windows and nothing else. Before Pro came ArcMap,
part of what was sold as ArcGIS Desktop. Esri's life-cycle page lists ArcMap as
deprecated and in mature support, with 10.8.x as its final series of releases.

On a server, the centre of the platform is a portal: the place where content,
users, groups and data services are created and shared. Esri hosts one as ArcGIS
Online, a subscription software-as-a-service product, and an organisation can
run its own with ArcGIS Enterprise. Data in a portal is published as services,
each with its own REST endpoint. A feature service gives access to spatial and
non-spatial data in feature layers and tables and lets a client add, update,
delete and query features. Vector tile and map tile services store and serve
tiles, and an image service processes and mosaics raster data on the fly. Every
layer has an address of its own, of the form `…/FeatureServer/0`, and a `query`
operation that takes a `where` clause, a list of fields and an output format:
HTML by default, JSON, GeoJSON or [protocol buffers](https://protobuf.dev/).

On the client side, Esri publishes Maps SDKs for JavaScript, Kotlin, Swift,
Flutter, .NET, Qt and Java, plus plugins for Unity and Unreal Engine. The same
developer documentation also covers open libraries that can draw ArcGIS
services, namely Leaflet, MapLibre GL JS, OpenLayers and CesiumJS. For scripting
there is ArcPy, the Python package for geoprocessing tools and map automation
inside ArcGIS Pro, beside the ArcGIS API for Python and ArcGIS REST JS for
working with portals and services from outside it. Access to anything that is
not public goes through API keys, OAuth 2.0 or a signed-in user.

On disk, the format that travels with ArcGIS data is the file geodatabase: a
directory whose name ends in `.gdb`, holding each of its tables as `.gdbtable`
files inside it. Outside Esri's software, GDAL's built-in OpenFileGDB driver
reads file geodatabases, has written and updated them since GDAL 3.6, and has
handled raster layers in them since 3.7.

## Why it matters

When an organisation already runs ArcGIS, the decision is seldom whether to
adopt it. The decision is where its edge sits: which data stays in the portal as
services, which is copied into a database the rest of the stack controls, and in
which direction edits flow between the two.

Inside that edge, a lot comes ready-made. Editing, symbology, sharing with named
users and groups, analysis services and low-code app builders all work against
the same portal, and staff who know ArcGIS Pro can keep working the way they
already do. Publishing a layer as a feature service gives every other system an
address to read it from.

The edge is crossable from both sides, and that makes the choice a real one
rather than a lock-in. A feature service speaks JSON and GeoJSON over plain
HTTP. GDAL's ESRIJSON driver reads a feature service URL like a file and pages
through the result on its own, so `ogr2ogr` can copy a hosted layer into PostGIS
or a GeoPackage in one command. Esri's own documentation shows Leaflet and
MapLibre GL JS drawing its services. In the other direction, GDAL has written
file geodatabases itself since 3.6, so data can go back in Esri's own format.

What costs effort is everything that lives on both sides at once. A layer copied
out of a portal is a second copy, and a second copy needs a schedule, an owner
and a way to tell when it has drifted from the first. The desktop is
Windows-only and commercially licensed, which shapes who on a mixed team can
open a project. And ArcPy ships with ArcGIS Pro and ArcGIS Server; even
installed into another Python environment it still needs ArcGIS Pro on the
machine, so a pipeline built on it runs only where ArcGIS does.

## What it looks like in practice

ArcGIS turns up in two projects on this site, and in neither is it the whole
stack.

From 2015 to 2022, the GIS Software Development Team Lead role carried
[more than thirty GIS projects from development through deployment to support](/portfolio/led-the-development-deployment-and-support-of-over-35/).
Some of their web maps called the ArcGIS APIs, and others the HERE APIs. The
maps themselves were drawn with Mapbox GL and Leaflet, and the application code
around them was written in JavaScript, Python, PHP and SQL. The spatial data
lived in PostgreSQL with PostGIS, and QGIS and JOSM handled the hands-on data
work, so ArcGIS sat beside that stack as a set of APIs the maps could call.

From 2022 to 2024, as a Data Engineer on a large-scale geospatial analytics
project, ArcGIS was one of the tools for repair.
[Spatial errors were diagnosed and corrected using GDAL, QGIS and ArcGIS](/portfolio/resolved-1-000-issues-in-geographical-data-and-7/)
in combination, with recurring cleaning tasks automated in Bash. PL/pgSQL and
Transact-SQL procedures managed and transformed the geographic and temporal data
in PostgreSQL and SQL Server, with PostGIS carrying the spatial queries and
indexing. That repair work, ArcGIS included, closed more than 1,000 issues and
helped cut spatial query run times by 35%.

## Where it goes wrong

Most of the trouble sits at the edge between ArcGIS and everything else, where
each side assumes the other behaves like itself.

**A layer download stops at a round number.** A feature service returns at most
`maxRecordCount` features per request, a limit set per service. When a query
matches more, the response sets `exceededTransferLimit` to `true`, and a client
that reads the features and ignores that flag holds a partial layer that looks
complete. Where the layer reports `supportsPagination`, the client pages with
`resultOffset` and `resultRecordCount`, or with `resultPaginationToken`, until
the flag comes back `false`. GDAL's documentation adds that paging is reliable
only with a sort on a field such as `OBJECTID`:

```sh
url='https://gis.example.org/arcgis/rest/services/Parcels/FeatureServer/0'
q='query?where=1=1&outFields=*&orderByFields=OBJECTID+ASC&f=json'
ogr2ogr -f GPKG parcels.gpkg "ESRIJSON:$url/$q"
```

**Coordinates arrive in metres where degrees were expected.** Without an `outSR`
parameter, a query returns geometry in the spatial reference of the service's
map, which may be a projected system measured in metres. For GeoJSON output, the
reference says that from 10.8 the result follows RFC 7946 only when `outSR` is
left out or set to 4326. Any other value returns projected coordinates in a file
that still calls itself GeoJSON, and a web map reading it will place features
far from where they belong. Ask for `outSR=4326` whenever the consumer expects
longitude and latitude.

**An ArcMap script stops working in ArcGIS Pro.** ArcGIS Desktop, which includes
ArcMap, used versions of Python 2, and ArcGIS Pro runs Python 3, a line Esri
describes as only partially compatible. Within ArcPy, the `arcpy.mapping` module
was removed and replaced by `arcpy.mp`. With ArcMap deprecated, scripts written
for it are a migration waiting to happen. Pro's Analyze Tools For Pro tool flags
the issues that would keep Python code, or geoprocessing tools built on Python,
from running, and doing that pass on purpose beats discovering it the day a
machine is replaced.

**A file geodatabase opens read-only.** GDAL before 3.6 could read a file
geodatabase through OpenFileGDB but write one only through the separate FileGDB
driver, which needs Esri's FileGDB API library at build time. Raster layers
inside a `.gdb` need GDAL 3.7 or later. When a pipeline writes a `.gdb` on one
machine and fails on another, compare the GDAL versions and driver lists before
blaming the data.

## Further reading

- [Developer documentation](https://developers.arcgis.com/documentation/) —
  Esri's map of the platform: SDKs, portal and data services, and security.
- [Query (Feature Service/Layer)](https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/)
  — every query parameter, including `outSR`, the output formats and the three
  ways to page.
- [Python migration from 10.x to ArcGIS Pro](https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/python-migration-for-arcgis-pro.htm)
  — what changed between Python 2 and 3 and in ArcPy itself.
- [ArcMap Life Cycle](https://support.esri.com/en-us/products/arcmap/life-cycle)
  — the support status of ArcMap and why 10.8.x is the last series.
- [ESRI File Geodatabase vector (OpenFileGDB)](https://gdal.org/en/stable/drivers/vector/openfilegdb.html)
  — GDAL's driver for `.gdb` directories, with the versions that added writing
  and raster support.
- [ESRIJSON / FeatureService driver](https://gdal.org/en/stable/drivers/vector/esrijson.html)
  — reading feature service results with GDAL, and how its automatic paging
  works.

<https://engineer.company/glossary/arcgis/>
