Package io.debezium.connector.postgresql
Class PostgisGeometry
java.lang.Object
io.debezium.connector.postgresql.PostgisGeometry
A parser API for Postgres Geometry types
- Author:
- Robert Coup
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePostgisGeometry(byte[] ewkb, Integer srid) Create a PostgisGeometry using the supplied EWKB and SRID. -
Method Summary
Modifier and TypeMethodDescriptionstatic PostgisGeometryCreate a GEOMETRYCOLLECTION EMPTY PostgisGeometrystatic PostgisGeometryfromEwkb(byte[] ewkb) Create a PostgisGeometry using the supplied PostGIS EWKB.static PostgisGeometryfromHexEwkb(String hexEwkb) Create a PostgisGeometry using the supplied PostGIS Hex EWKB string.getSrid()Returns the coordinate reference system identifier (SRID)byte[]getWkb()Returns the standard well-known binary representationprivate static IntegerparseSrid(byte[] ewkb) Parses an EWKB Geometry and extracts the SRID (if any) https://trac.osgeo.org/postgis/browser/trunk/doc/ZMSgeoms.txt
-
Field Details
-
HEXEWKB_EMPTY_GEOMETRYCOLLECTION
Static Hex EKWB for a GEOMETRYCOLLECTION EMPTY.- See Also:
-
wkb
private final byte[] wkbPostGIS Extended-Well-Known-Binary (EWKB) geometry representation. An extension of the Open Geospatial Consortium Well-Known-Binary format. Since EWKB is a superset of WKB, we use EWKB here. https://postgis.net/docs/using_postgis_dbmanagement.html#EWKB_EWKT http://www.opengeospatial.org/standards/sfa -
srid
Coordinate reference system identifier. While it's technically user-defined, the standard/common values in use are the EPSG code list http://www.epsg.org/ null if unset/unspecified
-
-
Constructor Details
-
PostgisGeometry
Create a PostgisGeometry using the supplied EWKB and SRID.- Parameters:
ewkb- the Extended Well-Known binary representation of the coordinate in the standard formatsrid- the coordinate system identifier (SRID); null if unset/unknown
-
-
Method Details
-
fromHexEwkb
Create a PostgisGeometry using the supplied PostGIS Hex EWKB string. SRID is extracted from the EWKB -
fromEwkb
Create a PostgisGeometry using the supplied PostGIS EWKB. SRID is extracted from the EWKB -
createEmpty
Create a GEOMETRYCOLLECTION EMPTY PostgisGeometry- Returns:
- a
PostgisGeometrywhich represents a PostgisGeometry API
-
getWkb
public byte[] getWkb()Returns the standard well-known binary representation- Returns:
bytewhich represents the standard well-known binary
-
getSrid
Returns the coordinate reference system identifier (SRID)- Returns:
- srid
-
parseSrid
Parses an EWKB Geometry and extracts the SRID (if any) https://trac.osgeo.org/postgis/browser/trunk/doc/ZMSgeoms.txt- Parameters:
ewkb- PostGIS EWKB geometry- Returns:
- Geometry SRID or null if there is no SRID.
-