# `GeoFrame.CRS`
[🔗](https://github.com/CountlinkX-Solutions/geoframe/blob/v0.3.4/lib/geo_frame/crs.ex#L1)

Helpers on CRS strings (`"EPSG:<code>"`, `"OGC:CRS84"`).

# `equivalent?`

```elixir
@spec equivalent?(String.t() | nil, String.t() | nil) :: boolean()
```

Whether two CRS labels are compatible for binary operations, joins, overlays and `concat`.

The comparison ignores case and treats `OGC:CRS84` as `EPSG:4326` (GeoFrame is always
longitude/latitude). Labels are never rewritten. Two `nil` CRSs are equivalent; `nil` against
a CRS is not (operations that let an unset CRS match anything handle `nil` themselves).

    iex> GeoFrame.CRS.equivalent?("epsg:4326", "OGC:CRS84")
    true
    iex> GeoFrame.CRS.equivalent?("EPSG:4326", "EPSG:3857")
    false

# `geographic?`

```elixir
@spec geographic?(String.t() | nil) :: boolean() | nil
```

Whether `crs` names a geographic (lon/lat) CRS.

Returns `true` for `OGC:CRS84`, `EPSG:4326` and any EPSG code whose definition is
`+proj=longlat`, `false` for projected CRSs, and `nil` for `nil` or a CRS that cannot be
resolved.

    iex> GeoFrame.CRS.geographic?("EPSG:4326")
    true
    iex> GeoFrame.CRS.geographic?("EPSG:3857")
    false
    iex> GeoFrame.CRS.geographic?(nil)
    nil

---

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