Length
Calculate the length of a line in meters.Request body
Target chain ID (e.g.,
84532 for Base Sepolia).The line geometry to measure. See Input types for accepted formats.
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.Length in meters (e.g.,
2345.67).Always
"meters".Always
"length".Unix timestamp of computation.
Array of input references.
Signed EAS attestation. See AttestationData.
Signature for delegated onchain submission. See DelegatedAttestationData.
Example response
Notes
- Uses PostGIS
ST_Lengthwith geodetic calculation - Result is in meters with centimeter precision
- The onchain attested value is scaled to centimeters (integer) for EVM compatibility
- Valid for LineString and MultiLineString geometries
SDK Method
See
astral.compute.length()