Class Geometry

  • Direct Known Subclasses:
    Geography, Point

    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
    • Constructor Detail

      • Geometry

        public Geometry()
    • Method Detail

      • builder

        public static org.apache.kafka.connect.data.SchemaBuilder builder()
        Returns a SchemaBuilder 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 a SchemaBuilder 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 - a Schema instance which represents a geometry; may not be null
        wkb - OGC Well-Known Binary representation of the geometry; may not be null
        srid - the coordinate reference system identifier; may be null if unset/unknown
        Returns:
        a Struct which represents a Connect value for this schema; never null