-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
-
False
-
-
When a system serializes EWKB and WKB values, the serializer will either choose to write all coordinates using the EPSG coordinate system or the traditional GIS coordinate system. The difference between the two is whether or not the values for specific SRIDs are written in the format of (x, y) versus (y, x) or (longitude lattitude) versus (lattitude longitude).
It's important when dealing with Geometry EWKB/WKB byte arrays that if a consumer expects the values to be provided in a particular coordinate system that users have a way to flip between the two coordinate systems as needed.
We should introduce a new FlipGeometryCoordinates]} transformation that will examine the provided event, locating all {{io.debezium.data.Geometry fields, and converting their values between traditional GIS and EPSG. The transform should automatically apply the conversion for SRIDs 4326, 3857, and 4269, but the user should be able to supply their own list of SRIDs if they wish to omit or add to the list, i.e.
transforms=flip transforms.flip.type=io.debezium.transforms.FlipGeometryCoordinates transforms.flip.srids=4326 // limit transform to only 4326 srids
The EWKB/WKB format does not designate which coordinate system is used in the serialized payload, ergo, it's up to the user to know how the source system serializes the data to know whether the transform should or should not be applied.
The transform is simply designed to flip the coordinates (x, y) to (y, x) or the inverse with no regard to the actual implementation, as the only difference is which order the coordinates are serialized in.