Geospatial · Combine and measure
Spatial Measure
Adds a measurement per shape: length, area, perimeter, compass bearing, or the distance from the previous point on a track.
Also known as: Area, distance, length
How it works
Pick the Geometry column and a Measure: Length, Area, Perimeter, Bearing or Leg distance (to previous row). Method is Geodesic (ellipsoidal) by default, which measures on the earth's surface; Planar (CRS units) measures on the flat plane of the data's coordinate system. Unit offers Metres, Kilometres (the default) and Miles for lengths, and Square metres, Square kilometres (the default) and Square miles for areas. The result goes into the Output column, named measure unless you change it.
Bearing ignores the unit: it is the compass direction from the start to the end of a line, 0 to 360 with 0 as north, and a point or a closed line gives NULL. For leg distance, Group by and Order by appear straight under Measure: Group by restarts the sequence per track and the required Order by sequences the rows, and the first row of every track is NULL. On lon/lat data leg distance is always measured on the spheroid, even with Planar selected.
Inputs and outputs
Inputs
data— Table
Outputs
data— Table
Settings
The Attributes panel of Spatial Measure, as in the app: the controls work, but nothing runs — there is no data behind it.
The same settings, as the Assistant writes them
{
geometryColumn: string
operation: "length"|"area"|"perimeter"|"bearing"|"leg-distance"
method: "geodesic"|"planar"
unit: "meters"|"km"|"miles"|"sqm"|"sqkm"|"sqmi"
outputColumn: string
partitionBy: string[]
orderBy: string
orderDirection: "asc"|"desc"
}bearing is the start→end azimuth of a LINE as a compass bearing (0° = north, clockwise, 0-360) and ignores unit — geodesic gives the true initial great-circle bearing, planar the grid bearing; a point or a closed line has none and comes back NULL. leg-distance is the distance from each row to the PREVIOUS row (per-leg distance along an ordered track) and is the only operation that reads partitionBy/orderBy/orderDirection: orderBy is required (it sequences the rows), partitionBy restarts the sequence per track (e.g. trip id) and may be empty, and the first row of every partition is NULL. On lon/lat data leg-distance always measures on the spheroid, so method: "planar" is ignored there rather than returning degrees
Example
You have GPS points for delivery trips and want how far each point is from the previous one. Set Measure to Leg distance (to previous row), Group by to trip_id, Order by to recorded_at ascending, Unit to Kilometres, and name the Output column leg_km. Summing leg_km per trip with Aggregate gives the trip length.