public class MySqlGeometry extends Object
Modifier and Type | Field and Description |
---|---|
private Integer |
srid
Coordinate reference system identifier.
|
private byte[] |
wkb
Open Geospatial Consortium Well-Known-Binary representation of the Geometry.
|
private static byte[] |
WKB_EMPTY_GEOMETRYCOLLECTION |
private static int |
WKB_POINT_SIZE |
Modifier | Constructor and Description |
---|---|
private |
MySqlGeometry(byte[] wkb,
Integer srid)
Create a MySqlGeometry using the supplied wkb, note this should be the cleaned wkb for MySQL
|
Modifier and Type | Method and Description |
---|---|
static MySqlGeometry |
createEmpty()
Create a GEOMETRYCOLLECTION EMPTY MySqlGeometry
|
static MySqlGeometry |
fromBytes(byte[] mysqlBytes)
Create a MySqlGeometry from the original byte array from MySQL binlog event
|
Integer |
getSrid()
Returns the coordinate reference system identifier (SRID)
|
byte[] |
getWkb()
Returns the standard well-known binary representation of the MySQL byte
|
boolean |
isPoint()
Returns whether this geometry is a 2D POINT type.
|
private static final int WKB_POINT_SIZE
private static final byte[] WKB_EMPTY_GEOMETRYCOLLECTION
private final byte[] wkb
private final Integer srid
private MySqlGeometry(byte[] wkb, Integer srid)
wkb
- the Well-Known binary representation of the coordinate in the standard formatpublic static MySqlGeometry fromBytes(byte[] mysqlBytes)
mysqlBytes
- he original byte array from MySQL binlog eventMySqlGeometry
which represents a MySqlGeometry APIpublic byte[] getWkb()
byte[]
which represents the standard well-known binarypublic Integer getSrid()
public boolean isPoint()
public static MySqlGeometry createEmpty()
MySqlGeometry
which represents a MySqlGeometry APICopyright © 2020 JBoss by Red Hat. All rights reserved.