ArcGIS Connector is a Coda pack that provides core integration with public ArcGIS REST Services for geographic data access and lightweight spatial analysis. It exposes service discovery, attribute queries, ownership lookups, range analysis, and distance calculations as Coda formulas and a sync table.
- Purpose: Query ArcGIS REST feature services from inside Coda and run small spatial computations on the results.
- Inputs: ArcGIS REST service URLs, SQL
WHEREclauses, field names, and geographic coordinates. - Outputs: Service catalogs, feature attributes as objects, range/statistic summaries, and distances in miles.
- Audience: Coda makers who consume open ArcGIS feature services and want to keep query, lookup, and analysis logic inside their docs.
- A Coda account with permission to install Packs.
- Access to one or more public (or otherwise reachable) ArcGIS REST Services Directory endpoints, for example
https://services6.arcgis.com/<org>/ArcGIS/rest/services. - Network access from Coda to the
arcgis.comdomain (declared viapack.addNetworkDomain('arcgis.com')). - Familiarity with ArcGIS feature service URLs (
.../FeatureServer/<layerId>or.../MapServer/<layerId>) and basic SQLWHEREsyntax.
- Install the ArcGIS Connector pack into your Coda doc from the Pack Gallery or by uploading from this repository.
- No account connection prompt appears -- the pack uses unauthenticated public endpoints.
- Add the AvailableServices sync table to discover services, or call any of the formulas (
QueryFeatures,OwnershipLookup,RangeAnalysis,CalculateDistance,ListAllArcGISServices) directly in a formula or column.
No authentication required. The pack only declares arcgis.com as a network domain and calls public ArcGIS REST endpoints; if a target endpoint is private, requests will fail with the underlying ArcGIS error.
| Name | Type | Description | Inputs | Returns |
|---|---|---|---|---|
QueryFeatures |
Formula | Queries features from an ArcGIS feature/map layer with field selection and WHERE filtering. |
serviceUrl, optional fields, optional where |
Array of feature attribute objects |
OwnershipLookup |
Formula | Looks up property ownership records for a given owner name on an ArcGIS property service. | ownerName, serviceUrl |
Array of { PropertyID, Address, Owner, TaxInfo } objects |
RangeAnalysis |
Formula | Analyzes the distribution of a numeric field within a min/max range. | serviceUrl, fieldName, minValue, maxValue |
Range analysis object (counts and bucketed stats) |
CalculateDistance |
Formula | Computes the great-circle distance between two coordinates in miles. | lat1, lon1, lat2, lon2 |
Number (miles) |
ListAllArcGISServices |
Formula | Lists all services discovered from an ArcGIS REST Services Directory base URL. | baseUrl |
Array of service descriptors |
Lists every service discovered under the supplied ArcGIS REST Services Directory base URL. The sync resolves the directory, walks folder/service entries, and emits one row per service keyed by serviceId. The default baseUrl is https://services6.arcgis.com/z6WYi9VRHfgwgtyW/ArcGIS/rest/services; override it to point at any other directory. Sync model: full re-fetch on every sync (no incremental cursor); results are cached in-process for ~5 minutes to avoid hammering the directory during a single execution.
- Add the AvailableServices sync table and point it at your county's ArcGIS REST directory to find the service URL you need (for example a parcel
FeatureServer/0). - In a separate column, call
QueryFeatures("https://.../FeatureServer/0", "PIN,Address,Acres", "Acres > 1")to pull all parcels larger than one acre. - Add a column that calls
CalculateDistance(thisRow.lat, thisRow.lon, 47.6062, -122.3321)to compute each parcel's distance to a reference point in miles. - Use
RangeAnalysison a numeric field (for exampleAcres) to bucket parcels into a value range and inspect the distribution.
- Only public/unauthenticated ArcGIS endpoints are supported; the pack does not negotiate ArcGIS tokens or OAuth.
QueryFeaturesreturns attribute fields only; geometry is not projected into the result by default.- Result sets are bounded by the underlying service's
maxRecordCount. The pack does not perform server-side pagination across that limit. - In-memory caches (features, ownership lookups, range analysis) live for ~5 minutes per execution context and are not shared across pack executions.
- The rate limiter caps outgoing requests at ~5 per second; very large parallel batches may queue.
| Problem | Likely cause | Resolution |
|---|---|---|
Empty result from QueryFeatures |
WHERE clause did not match any features, or the service URL points at a folder rather than a layer |
Verify the URL ends in /FeatureServer/<id> or /MapServer/<id>, and test the WHERE clause against the service in a browser |
serviceUrl is required or similar UserVisibleError |
A required string parameter was empty or whitespace | Re-check the formula inputs; the pack rejects empty strings up front |
AvailableServices sync returns nothing |
The base URL is not an ArcGIS REST Services Directory or the directory is empty | Confirm the URL responds with ?f=pjson JSON and lists services/folders |
| Slow or stalled formulas | Per-execution rate limit (5 req/s) is queuing many calls | Reduce parallel formula calls or split work across multiple cells |
RangeAnalysis returns zero counts |
minValue/maxValue exclude all records, or the field is non-numeric on the service |
Check the field type via QueryFeatures and adjust the range |
- Entry point:
src/pack.ts. - Validate:
pnpm coda:validate. - Build:
pnpm coda:build(orpnpm build). - Upload:
pnpm coda:upload; release withpnpm coda:release. - Tests:
pnpm test(Jest -- pre-existing; new packs in this workspace default to Mocha). - Lint / typecheck / format:
pnpm lint,pnpm typecheck,pnpm format.
- Source: https://github.com/ramiisaac/coda-pack-arcgis-connector
- Issue tracking: https://github.com/ramiisaac/coda-pack-arcgis-connector/issues
MIT -- see LICENSE.
Rami Isaac raisaac@icloud.com -- https://github.com/ramiisaac