Table of Contents

Method GetFieldGeography

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

GetFieldGeography<T>(string)

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

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

Parameters

fieldName string

The column name.

Returns

T

The geometry value, or null if the field is SQL NULL.

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 geography-compatible value can be found.

GetFieldGeography(string)

Gets the value of a geography (geodetic/spherical) field as a Geography wrapper.

public Geography GetFieldGeography(string fieldName)

Parameters

fieldName string

The column name.

Returns

Geography

A Geography wrapping the underlying geometry, or null if the field is SQL NULL.