# `GeoFrame.Postgrex.Extension`
[🔗](https://github.com/CountlinkX-Solutions/geoframe/blob/v0.3.4/lib/geo_frame/postgrex/extension.ex#L2)

A `Postgrex.Extension` for the PostGIS `geometry` type.

Postgrex has no built-in handler for `geometry`; this one decodes a value to its raw
**EWKB binary** (WKB plus the SRID) without building Elixir structs, which is exactly what
`GeoFrame.read_postgis/3` consumes. It uses the text transfer format (hex EWKB) because the
binary `geometry_send` drops the SRID. On encode it accepts an EWKB or WKB binary.

Register it through `GeoFrame.Postgrex.Types`, or define your own types module:

    Postgrex.Types.define(MyApp.PostgresTypes, [GeoFrame.Postgrex.Extension])

---

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