public class Point extends Geometry
Geometry
type. TODO for 1.0: Decide whether to remove
it or keep it.Modifier and Type | Field and Description |
---|---|
static String |
LOGICAL_NAME |
private static int |
WKB_POINT |
private static int |
WKB_POINT_SIZE |
static String |
X_FIELD |
static String |
Y_FIELD |
SRID_FIELD, WKB_FIELD
Constructor and Description |
---|
Point() |
Modifier and Type | Method and Description |
---|---|
static org.apache.kafka.connect.data.SchemaBuilder |
builder()
Returns a
SchemaBuilder for a Point field. |
private static byte[] |
buildWKBPoint(double x,
double y)
Creates WKB for a 2D {x,y} point.
|
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
|
static org.apache.kafka.connect.data.Struct |
createValue(org.apache.kafka.connect.data.Schema geomSchema,
double x,
double y)
Creates a value for this schema using 2 given coordinates.
|
static double[] |
parseWKBPoint(byte[] wkb)
Parses a 2D WKB Point into a {x,y} coordinate array.
|
public static final String LOGICAL_NAME
public static final String X_FIELD
public static final String Y_FIELD
private static final int WKB_POINT
private static final int WKB_POINT_SIZE
public static org.apache.kafka.connect.data.SchemaBuilder builder()
SchemaBuilder
for a Point field.
A Geometry with extra X & Y fieldsprivate static byte[] buildWKBPoint(double x, double y)
x
- coordinatey
- coordinatepublic static double[] parseWKBPoint(byte[] wkb) throws IllegalArgumentException
wkb
- OGC WKB geometryIllegalArgumentException
public static org.apache.kafka.connect.data.Struct createValue(org.apache.kafka.connect.data.Schema geomSchema, double x, double y)
pointSchema
- a Schema
instance which represents a point; may not be nullx
- the X coordinate of the point; may not be nully
- the Y coordinate of the point; may not be nullStruct
which represents a Connect value for this schema; never nullpublic static org.apache.kafka.connect.data.Struct createValue(org.apache.kafka.connect.data.Schema geomSchema, byte[] wkb, Integer srid) throws IllegalArgumentException
pointSchema
- a Schema
instance which represents a point; may not be nullwkb
- the original Well-Known binary representation of the coordinate; may not be nullsrid
- the coordinate reference system identifier; null if unset/unknownStruct
which represents a Connect value for this schema; never nullIllegalArgumentException
Copyright © 2020 JBoss by Red Hat. All rights reserved.