Compute over Earth features

Run eight spatial primitives against remote, cached, or local data.

Documentation navigation

Examples

terminal
e2 compute count restaurant --area Manhattan --near park --distance 500 --mode auto

e2 compute coverage restaurant --near park --distance 500 --mode offline

e2 compute cluster restaurant --db ./e2.db --area Manhattan

Primitives

CommandResult
e2 compute nearest <features...>Rows or distances from remote, cached, or local data.
e2 compute distance <features...>Rows or distances from remote, cached, or local data.
e2 compute within <features...>Rows or distances from remote, cached, or local data.
e2 compute count <features...>A count.
e2 compute density <features...>Rows per square kilometer.
e2 compute coverage <features...>A served fraction.
e2 compute gaps <features...>Unserved target rows.
e2 compute cluster <features...>Radius-based clusters.

Common options

terminal
e2 compute nearest restaurant hospital
  --region e2r:region:nyc --within school
  --distance 1000 --limit 100 --mode auto --json

Use --area for a name or --region for a canonical region ID. Use --near for nearest-distance relations and --within for within, coverage, and gaps relations. Omit --db for remote/offline/auto feature data.

Database lifecycle

terminal
e2 import restaurant --area Manhattan --db ./e2.db
e2 stats --db ./e2.db
e2 query restaurant --db ./e2.db --window 30d --limit 100
e2 compute count restaurant --db ./e2.db