Hi all,
I'm upgrading from NHibernate 4.x to version 5.5. In version 4 I used NetTopologySuite together with GeoAPI to generate geographical reference points like this:
Init...
private readonly IGeometryFactory _geometryFactory = NetTopologySuite.NtsGeometryServices.Instance.CreateGeometryFactory(4326);
GeoAPI.GeometryServiceProvider.Instance = NetTopologySuite.NtsGeometryServices.Instance;
Generate point...
var c = new Coordinate(LastRecivedPosition.Longitude.DecimalDegrees, LastRecivedPosition.Latitude.DecimalDegrees, _lastTrackingAltitude);
coordinate.GeoPoint = _geometryFactory.CreatePoint(c);
where coordinate.GeoPoint is mapped as
mapping.Map(x => x.GeoPoint).Column("GeoPoint").CustomType<NHibernate.Spatial.Type.MsSql2008GeographyType>();
This code does not work anymore.
Is there a sample or best practice on how to do this in Nhibernate 5.5?
Best Regards
Mathias Håkansson
Dasa Control systems