# coast_distance_m

> Distance in metres to the nearest NOAA CUSP mapped shoreline line (ocean, estuary, tidal river, Great Lakes, marsh or man-made), from NOAA's Shoreline Data Explorer tiles.

Source: https://docs.invariant-ai.com/fields/coast_distance_m

|  |  |
| --- | --- |
| Name | `coast_distance_m` |
| Layer | terrain |
| Type, unit | float, meters |
| Sources (in order) | `NOAA_CUSP` |
| Cache | 90 days (`ttl_seconds` 7776000) |

## What it is

Distance in metres to the nearest NOAA CUSP mapped shoreline line (ocean, estuary, tidal river, Great Lakes, marsh or man-made), from NOAA's Shoreline Data Explorer tiles. Precision follows distance: about +/- 1 m on the coast, +/- 30 m at 30 km, +/- 0.5-1 km beyond 400 km (stated in notes).

## Nulls

status "absent": no CUSP shoreline anywhere in the coarsest search area (not expected in the US). "failed": NOAA tiles did not answer or were inconsistent between zooms.

## Example

```bash
curl -s https://api.invariant-ai.com/v1/fetch \
  -H "X-API-Key: $INVARIANT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lat": 39.0438, "lng": -77.4874, "fields": ["coast_distance_m"]}'
```

Field object keys are described in [Responses](https://docs.invariant-ai.com/responses). Live definition: [`GET /v1/meta/fields`](https://docs.invariant-ai.com/api/meta-fields).
