# `NebulaGraphEx.Types.Geography`
[🔗](https://github.com/VChain/nebula_graph_ex/blob/v0.1.10/lib/nebula_graph_ex/types/geography.ex#L1)

NebulaGraph geography (geospatial) value.

## Fields

* `:kind` — `:point`, `:linestring`, or `:polygon`
* `:coords` — coordinate data whose shape depends on `:kind`:
  * `:point` — `%{x: float(), y: float()}`
  * `:linestring` — `[%{x: float(), y: float()}]`
  * `:polygon` — `[[%{x: float(), y: float()}]]` (list of rings)

## Example

    %NebulaGraphEx.Types.Geography{kind: :point, coords: %{x: 120.12, y: 30.16}}

# `coord`

```elixir
@type coord() :: %{x: float(), y: float()}
```

# `t`

```elixir
@type t() :: %NebulaGraphEx.Types.Geography{
  coords: coord() | [coord()] | [[coord()]],
  kind: :point | :linestring | :polygon
}
```

# `point?`

```elixir
@spec point?(t()) :: boolean()
```

Returns `true` if this geography is a point.

# `to_lonlat`

```elixir
@spec to_lonlat(t()) :: {float(), float()} | nil
```

Returns `{longitude, latitude}` for a point geography, or `nil`.

---

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