# `GeoGenius.Provider.Area`
[🔗](https://github.com/agoodway/geo_genius/blob/main/lib/geo_genius/provider.ex#L52)

The whole vocabulary a provider has for describing one area.

`centroid` is a `%Geo.Point{}` or `nil`. When it is `nil` and `geometry` is
present, the pipeline leaves it `nil` rather than asking PostGIS to derive
one, because `put_area_in_release/5` accepts a null centroid.

# `attributes`

```elixir
@type attributes() :: %{optional(String.t()) =&gt; term()}
```

Free-form, provider-specific attributes carried onto the area as-is.

# `t`

```elixir
@type t() :: %GeoGenius.Provider.Area{
  area_type_key: String.t(),
  attributes: attributes(),
  authority_key: String.t(),
  centroid: Geo.Point.t() | nil,
  code: String.t(),
  codes: [GeoGenius.Provider.Area.Code.t()],
  geometry: Geo.geometry() | nil,
  names: [GeoGenius.Provider.Area.Name.t()]
}
```

# `key`

```elixir
@spec key(t()) :: String.t()
```

The catalog key for an area: `authority_key`, `area_type_key` and `code`
joined by `:`.

This is the same composition PostgreSQL stores in `area.area_key`, which is
what makes the key a provider composes here addressable by every read.
`c:GeoGenius.Provider.asserted_relations/2` returns those keys as strings, so
this is how a provider names the two ends of an edge without re-deriving the
format. An area keyed `census`, `county`, `06075` is `"census:county:06075"`.

The agreement between this and the column is pinned by `GeoGenius.PipelineTest`,
once, rather than per caller.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
