Skip to content

ArcGIS

Live ArcGIS feature queries, server summaries and raster sampling from service URLs worldwide

Connector software
Free and open source
Service credentials
Optional
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/arcgis/index.md to help me query ArcGIS with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Count the parcels in Covington, Virginia (FIPS 51580); the filter runs on the ArcGIS server

Example output · captured
Connector release
v0.7.0
Engine
2.0.1
VGI protocol
3.4.0
SELECT LOCALITY, count(*) AS parcels
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Parcels/FeatureServer/0')
WHERE FIPS = '51580'
GROUP BY ALL
Result
LOCALITY parcels
Covington City 5811

Quick start

Choose where to run ArcGIS, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach the release directly

Downloads the latest release for your platform and caches it locally.

ATTACH 'arcgis' AS arcgis (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/vgi-arcgis'
);

3. Add service credentials (optional)

Public ArcGIS services need no credentials; add them only for token-secured services. Replace the placeholders with your service settings.

arcgis credentials

Credentials for token-secured ArcGIS REST services (ArcGIS Server, ArcGIS Enterprise and ArcGIS Online) read by arcgis_query: a pre-generated ArcGIS token, an ArcGIS username and password, or an ArcGIS OAuth app's client_id and client_secret. Give it a SCOPE (a URL prefix such as 'https://host/arcgis/rest/services/') so it is only sent to that server; the longest matching scope wins.

Get these credentials →
secret.sql
CREATE SECRET arcgis (
    TYPE arcgis,
    token         '<ARCGIS_TOKEN>',  -- secret
    username      '<username>',
    password      '<ARCGIS_PASSWORD>',  -- secret
    client_id     '<client_id>',
    client_secret '<ARCGIS_CLIENT_SECRET>'  -- secret
);
Credential fields and requirements →

4. Run a query

query.sql
SELECT LOCALITY, count(*) AS parcels
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Parcels/FeatureServer/0')
WHERE FIPS = '51580'
GROUP BY ALL
More example queries →
Technical details
Verified connector release
v0.7.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach the release directly

Uses the verified release each time you attach the connector.

ATTACH 'arcgis' AS arcgis (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/[email protected]'
);

Overview

Live ArcGIS FeatureServer, MapServer and ImageServer data from any service URL as SQL: layers as views with GEOMETRY, server-side counts and statistics, and raster pixel sampling. Public services need no key; secured ones take ArcGIS tokens or OAuth app credentials.

ATTACH options

url
ArcGIS REST URL to expose as tables: a services directory (.../arcgis/rest/services or a folder), a service (.../FeatureServer or .../MapServer) or a single layer (.../FeatureServer/0); or an ArcGIS Hub / Open Data site (https://<site>, one schema per service in its catalog) or one of its dataset pages (https://<site>/datasets/<id>, resolved to the REST layer or service). Omit it to use the ArcGIS query, summary and imagery functions without catalog views.VARCHAR
precision
Decimal places kept in returned coordinates (ArcGIS geometryPrecision), 0-15. 7 is about 1 cm in longitude/latitude.INTEGER
token
A pre-generated ArcGIS token for token-secured services, sent as the token parameter on requests to the ATTACH url's server only (credentials require url). Not renewed: when it expires, attach again. Pass it as token getenv('ARCGIS_TOKEN') to keep it out of the SQL text.VARCHAR
username
ArcGIS Server, ArcGIS Enterprise or ArcGIS Online user name. With password, the worker generates tokens at the server's token service (from <server>/rest/info) and renews them before they expire.VARCHAR
password
Password for username, sent only to the server's token service over HTTPS. Pass it as password getenv('ARCGIS_PASSWORD').VARCHAR
client_id
Client ID of an ArcGIS OAuth application (ArcGIS Online or an ArcGIS Enterprise portal). With client_secret, the worker gets app tokens with the OAuth client-credentials flow and renews them.VARCHAR
client_secret
Client secret of the OAuth application named by client_id, sent only to the portal's oauth2/token endpoint over HTTPS. Pass it as client_secret getenv('ARCGIS_CLIENT_SECRET').VARCHAR

Catalog

Everything arcgis exposes once attached — read straight from the worker's released build.

arcgis 1 schema
main 4 functions

Functions that read, count, summarize and sample any ArcGIS layer or ImageServer by URL, plus views over the attached service's layers.

Schema examples (10)
Examples (10)

Count the parcels in Covington, Virginia (FIPS 51580); the filter runs on the ArcGIS server

SELECT LOCALITY, count(*) AS parcels
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Parcels/FeatureServer/0')
WHERE FIPS = '51580'
GROUP BY ALL;
Result
LOCALITY parcels
Covington City 5811

Centroids of two Virginia cities with DuckDB spatial

SELECT NAMELSAD, round(ST_X(ST_Centroid(geometry)), 4) AS lon,
  round(ST_Y(ST_Centroid(geometry)), 4) AS lat
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Admin_Boundaries/FeatureServer/1')
WHERE NAME IN ('Covington', 'Buena Vista')
ORDER BY NAMELSAD;

Hospitals in Virginia cities whose names start with 'Rich', from the statewide landmarks layer

SELECT LandmkName, City
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Landmarks/FeatureServer/1')
WHERE PlaceType = 'Hospital Points' AND City LIKE 'Rich%'
ORDER BY LandmkName;

Parcels touching a small box in downtown Covington; the server returns only features near the box, not the state's millions of parcels

SELECT count(*) AS parcels
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Parcels/FeatureServer/0')
WHERE ST_Intersects(geometry, ST_MakeEnvelope(-80.005, 37.785, -79.99, 37.795));
6 more examples

The five states with the most counties and county equivalents (Virginia's count includes its independent cities), by name: arcgis_statistics counts them per state FIPS on the Census server, and arcgis_query on the states layer turns each code into its abbreviation and name

SELECT s.STUSAB, s.NAME, c.statistic_value::INTEGER AS counties
FROM arcgis.main.arcgis_query('https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/State_County/MapServer/0') s
JOIN arcgis.main.arcgis_statistics('https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/State_County/MapServer/1', 'OBJECTID', statistic := 'count', group_by := 'STATE') c ON c.group_value = s.STATE
ORDER BY counties DESC, s.STUSAB
LIMIT 5;

Count New York counties on Census TIGERweb

SELECT feature_count
FROM arcgis.main.arcgis_count('https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/State_County/MapServer/1', where_clause := 'STATE = ''36''');

Sum county land area by state on the Census server

SELECT group_value AS state, statistic_value AS land_area
FROM arcgis.main.arcgis_statistics('https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/State_County/MapServer/1', 'AREALAND', group_by := 'STATE', where_clause := 'STATE = ''36''')
ORDER BY state;

Parcels per square mile in four small Virginia cities: arcgis_statistics counts parcels per FIPS on the server, and arcgis_query supplies each city's name and area from the boundaries layer

SELECT b.NAMELSAD, p.statistic_value::BIGINT AS parcels,
  round(b.AREASQMI, 2) AS sq_mi,
  round(p.statistic_value / b.AREASQMI) AS parcels_per_sq_mi
FROM arcgis.main.arcgis_statistics('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Parcels/FeatureServer/0', 'OBJECTID', statistic := 'count', group_by := 'FIPS', where_clause := 'FIPS IN (''51530'', ''51580'', ''51678'', ''51720'')') p
JOIN arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Admin_Boundaries/FeatureServer/1') b ON b.STCOFIPS = p.group_value
ORDER BY parcels_per_sq_mi DESC;

Sample USGS bare-earth elevation in meters near the White House

SELECT point_index, TRY_CAST(value AS DOUBLE) AS elevation_m
FROM arcgis.main.arcgis_sample('https://elevation.nationalmap.gov/arcgis/rest/services/3DEPElevation/ImageServer', '[[-77.0365,38.8977],[-77.04,38.90]]')
ORDER BY point_index;

USGS elevation at four points, labelled with the Virginia city each falls in: arcgis_sample reads the pixels and arcgis_query supplies city boundaries for a point-in-polygon join

SELECT b.NAMELSAD, round(TRY_CAST(s.value AS DOUBLE)) AS elevation_m
FROM arcgis.main.arcgis_sample('https://elevation.nationalmap.gov/arcgis/rest/services/3DEPElevation/ImageServer', '[[-79.9937,37.7935],[-79.3540,37.7343],[-79.4428,37.7840],[-82.6290,36.9334]]') s
JOIN arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Admin_Boundaries/FeatureServer/1') b ON ST_Contains(b.geometry, ST_Point(s.sample_x, s.sample_y))
WHERE b.JURISTYPE = 'CI'
ORDER BY elevation_m DESC;
Table functions
arcgis_count (url VARCHAR, bbox := VARCHAR, where_clause := VARCHAR) 1 example

Count matching ArcGIS features on the server without downloading them

Positional arguments
url VARCHAR
ArcGIS FeatureServer/MapServer layer or Hub dataset URL; NULL is rejected. Uses scoped arcgis credentials.
Named arguments
bbox := VARCHAR
Optional WGS84 xmin,ymin,xmax,ymax bounding box; server uses geometry intersects. Empty or NULL disables it. Invalid bounds and antimeridian-crossing boxes are rejected. · default ""
where_clause := VARCHAR
ArcGIS SQL WHERE expression evaluated by the server, with its collation and null semantics. Default 1=1; NULL uses that default. Blank is rejected. · default "1=1"
Returns columns
feature_count BIGINT
Number of matching features reported by the ArcGIS server; 0 for no matches.
Example

Count New York counties on Census TIGERweb

SELECT feature_count
FROM arcgis.main.arcgis_count('https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/State_County/MapServer/1', where_clause := 'STATE = ''36''');
Link
arcgis_query (url VARCHAR) 5 examples

Read the features of one ArcGIS FeatureServer/MapServer layer or table, with filter pushdown

Arguments
url VARCHAR
Layer or table URL, e.g. 'https://host/arcgis/rest/services/Folder/Name/FeatureServer/0'. Also accepts an ArcGIS Hub / Open Data dataset page for one layer, e.g. 'https://gis.data.ca.gov/datasets/<itemId>_0' or '.../datasets/<orgKey>::<slug>'. Query strings are ignored.
Returns columns
geometry GEOMETRY
Feature geometry in WGS84 longitude/latitude, rounded to the ATTACH `precision`. Spatial filters against a constant run on the server.
Returns columns · depends on the arguments
geometry GEOMETRY
Feature geometry in WGS84 longitude/latitude, rounded to the ATTACH `precision`. Spatial filters against a constant run on the server.
Examples (5)

Count the parcels in Covington, Virginia (FIPS 51580); the filter runs on the ArcGIS server

SELECT LOCALITY, count(*) AS parcels
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Parcels/FeatureServer/0')
WHERE FIPS = '51580'
GROUP BY ALL;
Result
LOCALITY parcels
Covington City 5811

Centroids of two Virginia cities with DuckDB spatial

SELECT NAMELSAD, round(ST_X(ST_Centroid(geometry)), 4) AS lon,
  round(ST_Y(ST_Centroid(geometry)), 4) AS lat
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Admin_Boundaries/FeatureServer/1')
WHERE NAME IN ('Covington', 'Buena Vista')
ORDER BY NAMELSAD;

Hospitals in Virginia cities whose names start with 'Rich', from the statewide landmarks layer

SELECT LandmkName, City
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Landmarks/FeatureServer/1')
WHERE PlaceType = 'Hospital Points' AND City LIKE 'Rich%'
ORDER BY LandmkName;
2 more examples

Parcels touching a small box in downtown Covington; the server returns only features near the box, not the state's millions of parcels

SELECT count(*) AS parcels
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Parcels/FeatureServer/0')
WHERE ST_Intersects(geometry, ST_MakeEnvelope(-80.005, 37.785, -79.99, 37.795));

The five states with the most counties and county equivalents (Virginia's count includes its independent cities), by name: arcgis_statistics counts them per state FIPS on the Census server, and arcgis_query on the states layer turns each code into its abbreviation and name

SELECT s.STUSAB, s.NAME, c.statistic_value::INTEGER AS counties
FROM arcgis.main.arcgis_query('https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/State_County/MapServer/0') s
JOIN arcgis.main.arcgis_statistics('https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/State_County/MapServer/1', 'OBJECTID', statistic := 'count', group_by := 'STATE') c ON c.group_value = s.STATE
ORDER BY counties DESC, s.STUSAB
LIMIT 5;
Link
arcgis_sample (url VARCHAR, points_json VARCHAR) 2 examples

Sample elevation or multiband pixel values from an ArcGIS ImageServer at WGS84 points

Arguments
url VARCHAR
HTTP(S) ImageServer URL; query strings are ignored. Uses scoped arcgis credentials. NULL is rejected.
points_json VARCHAR
JSON array of up to 10000 [longitude, latitude] pairs in WGS84, sampled in requests of 100. Empty array returns no rows. NULL and invalid coordinates are rejected.
Returns columns
point_index INTEGER
Zero-based index in points_json, if the server supplies locationId; otherwise NULL.
sample_x DOUBLE
Sample location x coordinate as reported by the service.
sample_y DOUBLE
Sample location y coordinate as reported by the service.
spatial_reference VARCHAR
Sample location's spatial reference as JSON; NULL if omitted by the service.
value VARCHAR
Raw pixel value text, preserving multiband values and NoData; TRY_CAST(value AS DOUBLE) reads single-band numeric values.
raster_id BIGINT
Source raster object ID, or NULL when omitted.
resolution DOUBLE
Spatial resolution of the source raster, in its coordinate system's units, or NULL when omitted.
Examples (2)

Sample USGS bare-earth elevation in meters near the White House

SELECT point_index, TRY_CAST(value AS DOUBLE) AS elevation_m
FROM arcgis.main.arcgis_sample('https://elevation.nationalmap.gov/arcgis/rest/services/3DEPElevation/ImageServer', '[[-77.0365,38.8977],[-77.04,38.90]]')
ORDER BY point_index;

USGS elevation at four points, labelled with the Virginia city each falls in: arcgis_sample reads the pixels and arcgis_query supplies city boundaries for a point-in-polygon join

SELECT b.NAMELSAD, round(TRY_CAST(s.value AS DOUBLE)) AS elevation_m
FROM arcgis.main.arcgis_sample('https://elevation.nationalmap.gov/arcgis/rest/services/3DEPElevation/ImageServer', '[[-79.9937,37.7935],[-79.3540,37.7343],[-79.4428,37.7840],[-82.6290,36.9334]]') s
JOIN arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Admin_Boundaries/FeatureServer/1') b ON ST_Contains(b.geometry, ST_Point(s.sample_x, s.sample_y))
WHERE b.JURISTYPE = 'CI'
ORDER BY elevation_m DESC;
Link
arcgis_statistics (url VARCHAR, statistic_field VARCHAR, bbox := VARCHAR, group_by := VARCHAR, statistic := VARCHAR, where_clause := VARCHAR) 2 examples

Compute a numeric statistic, optionally grouped by one field, on an ArcGIS server

Positional arguments
url VARCHAR
ArcGIS FeatureServer/MapServer layer or Hub dataset URL; NULL is rejected. Uses scoped arcgis credentials.
statistic_field VARCHAR
Exact numeric layer field name (any attribute field for count); expressions and NULL are rejected.
Named arguments
bbox := VARCHAR
Optional WGS84 xmin,ymin,xmax,ymax bounding box; server uses geometry intersects. Empty or NULL disables it. Invalid bounds and antimeridian-crossing boxes are rejected. · default ""
group_by := VARCHAR
Optional single exact attribute field name to group by. Empty or NULL returns one ungrouped statistic. · default ""
statistic := VARCHAR
Server statistic: count, sum, min, max, avg, stddev or var. Default sum. · default "sum"
where_clause := VARCHAR
ArcGIS SQL WHERE expression evaluated by the server, with its collation and null semantics. Default 1=1; NULL uses that default. Blank is rejected. · default "1=1"
Returns columns
group_value VARCHAR
Group field value as text; NULL for an ungrouped aggregate or a null-valued group.
statistic_value DOUBLE
Server aggregate as `DOUBLE`, possibly NULL for no non-null values. Large integers may lose precision; use arcgis_count for exact total counts.
Examples (2)

Sum county land area by state on the Census server

SELECT group_value AS state, statistic_value AS land_area
FROM arcgis.main.arcgis_statistics('https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/State_County/MapServer/1', 'AREALAND', group_by := 'STATE', where_clause := 'STATE = ''36''')
ORDER BY state;

Parcels per square mile in four small Virginia cities: arcgis_statistics counts parcels per FIPS on the server, and arcgis_query supplies each city's name and area from the boundaries layer

SELECT b.NAMELSAD, p.statistic_value::BIGINT AS parcels,
  round(b.AREASQMI, 2) AS sq_mi,
  round(p.statistic_value / b.AREASQMI) AS parcels_per_sq_mi
FROM arcgis.main.arcgis_statistics('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Parcels/FeatureServer/0', 'OBJECTID', statistic := 'count', group_by := 'FIPS', where_clause := 'FIPS IN (''51530'', ''51580'', ''51678'', ''51720'')') p
JOIN arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Admin_Boundaries/FeatureServer/1') b ON b.STCOFIPS = p.group_value
ORDER BY parcels_per_sq_mi DESC;
Link

Credentials

The secret type arcgis declares, as reported by the worker itself.

arcgis

How to get these credentials

Credentials for token-secured ArcGIS REST services (ArcGIS Server, ArcGIS Enterprise and ArcGIS Online) read by arcgis_query: a pre-generated ArcGIS token, an ArcGIS username and password, or an ArcGIS OAuth app's client_id and client_secret. Give it a SCOPE (a URL prefix such as 'https://host/arcgis/rest/services/') so it is only sent to that server; the longest matching scope wins.

secret.sql
CREATE SECRET arcgis (
    TYPE arcgis,
    token         '<ARCGIS_TOKEN>',  -- secret
    username      '<username>',
    password      '<ARCGIS_PASSWORD>',  -- secret
    client_id     '<client_id>',
    client_secret '<ARCGIS_CLIENT_SECRET>'  -- secret
);
Key Type Required Description
token secret VARCHAR — A pre-generated ArcGIS token (from the server's generateToken page, or an ArcGIS Online API key), sent as the token parameter as is. Generate it with client=requestip, or with referer https://github.com/Query-farm/vgi-arcgis. It is not renewed when it expires.
username VARCHAR — ArcGIS Server, ArcGIS Enterprise or ArcGIS Online user name; exchanged with password for a token at the server's token service (authInfo.tokenServicesUrl of <server>/rest/info).
password secret VARCHAR — Password of username. Sent only to the server's token service, over HTTPS.
client_id VARCHAR — Client ID of an ArcGIS OAuth application (ArcGIS Online or an ArcGIS Enterprise portal: Content > the app item > Settings), used with client_secret for the client-credentials flow.
client_secret secret VARCHAR — Client secret of the OAuth application named by client_id. Sent only to the portal's oauth2/token endpoint, over HTTPS.

The worker doesn't mark which keys are required.

Create the secret in the same session, after attaching arcgis — the worker registers its secret types at ATTACH. Keys marked secret are masked in duckdb_secrets(); angle-bracket values are placeholders. Read credentials from your environment or secret store in your application and pass them through your SQL client’s parameter bindings. Keep real values out of saved SQL and history. Native DuckDB and Haybarn do not provide a SQL getenv() function.

Try these queries

Empty point input returns no samples without contacting a service

SELECT count(*) AS sample_count
FROM arcgis.main.arcgis_sample('https://example.org/arcgis/rest/services/Elevation/ImageServer', '[]')
ORDER BY sample_count;

Uses arcgis_sample

Centroids of two Virginia cities with DuckDB spatial

SELECT NAMELSAD, round(ST_X(ST_Centroid(geometry)), 4) AS lon,
  round(ST_Y(ST_Centroid(geometry)), 4) AS lat
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Admin_Boundaries/FeatureServer/1')
WHERE NAME IN ('Covington', 'Buena Vista')
ORDER BY NAMELSAD

Uses arcgis_query

Hospitals in Virginia cities whose names start with 'Rich', from the statewide landmarks layer

SELECT LandmkName, City
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Landmarks/FeatureServer/1')
WHERE PlaceType = 'Hospital Points' AND City LIKE 'Rich%'
ORDER BY LandmkName

Uses arcgis_query

Parcels touching a small box in downtown Covington; the server returns only features near the box, not the state's millions of parcels

SELECT count(*) AS parcels
FROM arcgis.main.arcgis_query('https://vginmaps.vdem.virginia.gov/arcgis/rest/services/VA_Base_Layers/VA_Parcels/FeatureServer/0')
WHERE ST_Intersects(geometry, ST_MakeEnvelope(-80.005, 37.785, -79.99, 37.795))

Uses arcgis_query

Count New York counties on Census TIGERweb

SELECT feature_count
FROM arcgis.main.arcgis_count('https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/State_County/MapServer/1', where_clause := 'STATE = ''36''')

Uses arcgis_count

Sum county land area by state on the Census server

SELECT group_value AS state, statistic_value AS land_area
FROM arcgis.main.arcgis_statistics('https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/State_County/MapServer/1', 'AREALAND', group_by := 'STATE', where_clause := 'STATE = ''36''')
ORDER BY state

Uses arcgis_statistics

4 more examples in the Catalog, each listed under the table or function it uses.

ArcGIS is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.