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
fieldNamestringThe column name.
Returns
- T
The geometry value with its SRID cleared to 0, or
nullif the field is SQL NULL. The stored SRID is set by the connection'sGeometrySridand can be read back with theSpatialSridfunction.
Type Parameters
TThe 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
fieldNamestringThe column name.
Returns
- Geometry
The NetTopologySuite.Geometries.Geometry value, or
nullif the field is SQL NULL.