/** * Creates a value for this schema using 2 given coordinates. * * @param pointSchema a {@link Schema} instance which represents a point; may not be null * @param x the X coordinate of the point; may not be null * @param y the Y coordinate of the point; may not be null * @return a {@link Struct} which represents a Connect value for this schema; never null */ public static Struct createValue(Schema geomSchema, double x, double y){ // turn the specified points byte[] wkb = buildWKBPoint(x, y); Struct result = Geometry.createValue(geomSchema, wkb, null); result.put(X_FIELD, x); result.put(Y_FIELD, y); return result; }
/** * Creates a value for this schema using 2 given coordinates. * * @param pointSchema a {@link Schema} instance which represents a point; may not be null * @param x the X coordinate of the point; may not be null * @param y the Y coordinate of the point; may not be null * @return a {@link Struct} which represents a Connect value for this schema; never null */ public static Struct createValue(Schema geomSchema, double x, double y){ // turn the specified points byte[] wkb = buildWKBPoint(x, y); Struct result = Geometry.createValue(geomSchema, wkb, null); result.put(X_FIELD, x); result.put(Y_FIELD, y); return result; }