:page-aliases: configuration/geometry-format-transformer.adoc
[id="convert-between-geometry-formats"]
= Convert between Geometry formats

:toc:
:toc-placement: macro
:linkattrs:
:icons: font
:source-highlighter: highlight.js

toc::[]

The 'GeometryFormatTransformer' is a transformation that converts between the WKB (Well-Known Binary) and EWKB (Extended Well-Known Binary) formats.This transformation identifies geometry fields using the 'io.debezium.data.Geometry' logical type.
It can be applied to either a {prodname} source connector to modify the format before events are emitted, or to a {prodname} sink connector to process events from a {prodname} source connector topic.

You can configure the SMT to modify the format in the message.
For more information about configuring the SMT, see the following xref:example-geometry-format-transformer[example].

[[example-geometry-format-transformer]]
== Example

For example, to configure the connector to convert the Geometry formats between WKB and EWKB, add the following lines to the connector configuration:

[source]
----
transforms=convertGeometryFormat
transforms.convertGeometryFormat.type=io.debezium.transforms.GeometryFormatTransformer
----

To apply the transformation to Geometry Format `WKB`, add the following lines to your connector configuration:

[source]
----
transforms=convertGeometryFormat
transforms.convertGeometryFormat.type=io.debezium.transforms.GeometryFormatTransformer
transforms.convertGeometryFormat.format=WKB
----

[[geometry-format-transformer-configuration-options]]
== Configuration options

The following table lists the configuration options that you can use with the `GeometryFormatTransformer` SMT.

.GeometryFormatTransformer SMT configuration options
[cols="14%a,40%a,10%a, 16%a, 16%a, 10%a"]
|===
|Property
|Description
|Type
|Default
|Valid Values
|Importance

|[[geometry-format-transformer-format]]<<geometry-format-transformer-format, `format`>>
|The geometry format that is applied to all Debezium Geometry logical types.
The transformation converts the geometry format between WKB and EWKB.
|enum
|WKB
|WKB, EWKB
|high

|===