Table of Contents

Method GetFieldGeometry

Namespace
YndigoBlue.Velocity.Model
Assembly
YndigoBlue.Velocity.dll

GetFieldGeometry<T>(string)

Gets the value of a geometry (planar spatial) field as the specified geometry subtype. Parses WKT/WKB if the value is stored as string or blob.

public T GetFieldGeometry<T>(string fieldName) where T : Geometry

Parameters

fieldName string

The column name.

Returns

T

The geometry value with its SRID cleared to 0, or null if the field is SQL NULL. The stored SRID is set by the connection's GeometrySrid and can be read back with the SpatialSrid function.

Type Parameters

T

The NetTopologySuite.Geometries.Geometry subtype to cast to (e.g. Point, Polygon).

Exceptions

Exception

Thrown when the field name is invalid or no geometry-compatible value can be found.

GetFieldGeometry(string)

Gets the value of a geometry (planar spatial) field as a NetTopologySuite.Geometries.Geometry base type.

public Geometry GetFieldGeometry(string fieldName)

Parameters

fieldName string

The column name.

Returns

Geometry

The NetTopologySuite.Geometries.Geometry value, or null if the field is SQL NULL.