Distance
Calculate the distance between two geometries in meters.Request body
Target chain ID. All UIDs must exist on this chain.
First geometry. See Input types for accepted formats.
Second geometry.
EAS schema UID. The server uses a default schema if not provided.
Ethereum address to receive the attestation. Defaults to the zero address.
Example request
Response
Returns a NumericComputeResponse.Distance in meters (e.g.,
523.45).Always
"meters".Always
"distance".Unix timestamp of computation.
Array of input references (UIDs or geometry hashes).
Signed EAS attestation. See AttestationData.
Signature for delegated onchain submission. See DelegatedAttestationData.
Example response
Notes
- Distance is calculated using PostGIS
ST_Distancewith geodetic coordinates - Result is in meters with centimeter precision
- The onchain attested value is scaled to centimeters (integer) for EVM compatibility
- For raw GeoJSON inputs, a keccak256 hash is used in
inputRefs
SDK Method
See
astral.compute.distance()