public int Compare(ILinearRing x, ILinearRing y) { var pm = PrecisionModel.MostPrecise(x.PrecisionModel, y.PrecisionModel); var geometryFactory = new GeometryFactory(pm); var p1 = geometryFactory.CreatePolygon(x, null); var p2 = geometryFactory.CreatePolygon(y, null); ; if (p1.Area < p2.Area) return _r1; return p1.Area > p2.Area ? _r2 : 0; }