Package io.debezium.data.geometry
Class Geometry
- java.lang.Object
-
- io.debezium.data.geometry.Geometry
-
public class Geometry extends Object
A semantic type for an OGC Simple Features for SQL Geometry. Used to describe geometries on a planar basis (rather than Geography, which is a spherical basis).See the Open Geospatial Consortium Simple Features Access specification for details on the Well-Known-Binary format http://www.opengeospatial.org/standards/sfa
WKB has to be forwards-compatible to the spec, so strict OGC WKB, and EWKB (PostGIS) are both ok.
- Author:
- Robert Coup
-
-
Field Summary
Fields Modifier and Type Field Description static String
LOGICAL_NAME
static String
SRID_FIELD
static String
WKB_FIELD
-
Constructor Summary
Constructors Constructor Description Geometry()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.kafka.connect.data.SchemaBuilder
builder()
Returns aSchemaBuilder
for a Geometry field.static org.apache.kafka.connect.data.Struct
createValue(org.apache.kafka.connect.data.Schema geomSchema, byte[] wkb, Integer srid)
Create a value for this schema using WKB and SRIDstatic org.apache.kafka.connect.data.Schema
schema()
Returns aSchemaBuilder
for a Geometry field, with all other default Schema settings.
-
-
-
Field Detail
-
LOGICAL_NAME
public static final String LOGICAL_NAME
- See Also:
- Constant Field Values
-
WKB_FIELD
public static final String WKB_FIELD
- See Also:
- Constant Field Values
-
SRID_FIELD
public static final String SRID_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
builder
public static org.apache.kafka.connect.data.SchemaBuilder builder()
Returns aSchemaBuilder
for a Geometry field. You can use the resulting SchemaBuilder to set additional schema settings such as required/optional, default value, and documentation.- Returns:
- the schema builder
-
schema
public static org.apache.kafka.connect.data.Schema schema()
Returns aSchemaBuilder
for a Geometry field, with all other default Schema settings.- Returns:
- the schema
- See Also:
builder()
-
createValue
public static org.apache.kafka.connect.data.Struct createValue(org.apache.kafka.connect.data.Schema geomSchema, byte[] wkb, Integer srid)
Create a value for this schema using WKB and SRID- Parameters:
geomSchema
- aSchema
instance which represents a geometry; may not be nullwkb
- OGC Well-Known Binary representation of the geometry; may not be nullsrid
- the coordinate reference system identifier; may be null if unset/unknown- Returns:
- a
Struct
which represents a Connect value for this schema; never null
-
-