Quickstart

Install agol_fdw

From zero to a materialized AGOL layer in four steps.

  1. Meet the prerequisites

    PostgreSQL 15+, PostGIS 3+, PL/Python 3 (plpython3u), and pgcrypto. Optionally ogr_fdw for live reads.

    -- required extensions in your database
    CREATE EXTENSION postgis;
    CREATE EXTENSION plpython3u;
    CREATE EXTENSION pgcrypto;
    -- optional, for live reads:
    -- CREATE EXTENSION ogr_fdw;
  2. Install the package

    pip install agol_fdw
  3. Enable the extension

    CREATE EXTENSION agol_fdw;
  4. Provide your encryption key & materialize a layer

    # encryption key for stored AGOL secrets (give it to the PG process)
    export AGOL_FDW_KEY="<32-byte-key>"
    
    SELECT agol_fdw.register_credentials(
      client_id := '<client-id>',
      client_secret := '<client-secret>'
    );
    
    SELECT agol_fdw.materialize_layer(
      layer_url := 'https://services.arcgis.com/.../FeatureServer/0',
      layer_name := 'poles',
      target_schema := 'data'
    );

    You now have data.poles as a real PostGIS table with full geodatabase semantics, populated from ArcGIS Online.

Prefer a UI? The agol_fdw Console web app exposes all of this through a browser — see the Console feature page.

Next steps

← Back to home