Struct MySqlGeometry
Represents a geometry data type object in a MySql database.
Namespace: MySql.Data.Types
Assembly: MySql.Data.dll
Version: 8.3.0
Syntax
public struct MySqlGeometry
Constructors
MySqlGeometry(MySqlDbType, Byte[])
Declaration
public MySqlGeometry(MySqlDbType type, byte[] val)
Parameters
Type | Name | Description |
---|---|---|
MySqlDbType | type | |
System.Byte[] | val |
MySqlGeometry(Boolean)
Declaration
public MySqlGeometry(bool isNull)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isNull |
MySqlGeometry(Double, Double)
Declaration
public MySqlGeometry(double xValue, double yValue)
Parameters
Type | Name | Description |
---|---|---|
System.Double | xValue | |
System.Double | yValue |
MySqlGeometry(Double, Double, Int32)
Declaration
public MySqlGeometry(double xValue, double yValue, int srid)
Parameters
Type | Name | Description |
---|---|---|
System.Double | xValue | |
System.Double | yValue | |
Int32 | srid |
Properties
IsNull
Gets a boolean value that signals if the type is null
.
Declaration
public readonly bool IsNull { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SRID
Gets the SRID value.
Declaration
public readonly int? SRID { get; }
Property Value
Type | Description |
---|---|
System.Nullable<Int32> |
Value
Gets the value associated to this type.
Declaration
public readonly byte[] Value { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
XCoordinate
Gets the x coordinate.
Declaration
public readonly double? XCoordinate { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> |
YCoordinate
Gets the y coordinate.
Declaration
public readonly double? YCoordinate { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> |
Methods
GetWKT()
Gets the well-known text representation of the geomtry object.
Declaration
public string GetWKT()
Returns
Type | Description |
---|---|
String | A string representation of the WKT. |
Parse(String)
Get value from WKT format SRID=0;POINT (x y) or POINT (x y)
Declaration
public static MySqlGeometry Parse(string value)
Parameters
Type | Name | Description |
---|---|---|
String | value | WKT string format |
Returns
Type | Description |
---|---|
MySqlGeometry |
SetDSInfo(MySqlSchemaCollection)
Sets the DSInfo when GetSchema is called for the DataSourceInformation collection.
Declaration
public static void SetDSInfo(MySqlSchemaCollection dsTable)
Parameters
Type | Name | Description |
---|---|---|
MySqlSchemaCollection | dsTable |
ToString()
Returns the Well-Known Text representation of this value
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
System.ValueType.ToString()
TryParse(String, out MySqlGeometry)
Try to get value from WKT format SRID=0;POINT (x y) or POINT (x y)
Declaration
public static bool TryParse(string value, out MySqlGeometry mySqlGeometryValue)
Parameters
Type | Name | Description |
---|---|---|
String | value | WKT string format |
MySqlGeometry | mySqlGeometryValue | Out mysqlGeometryValue |
Returns
Type | Description |
---|---|
System.Boolean |