private void DisplayMap_Load(object sender, EventArgs e) { MyLineShape a = new MyLineShape("LINESTRING(-181 0,0 0)"); var b = a.GetLength(GeographyUnit.DecimalDegree, DistanceUnit.Kilometer); } class MyLineShape : LineShape { public MyLineShape(string WKT) : base(WKT) { } protected override double GetLengthCore(GeographyUnit shapeUnit, DistanceUnit returningUnit) { double X = this.GetBoundingBox().UpperLeftPoint.X; if (shapeUnit == GeographyUnit.DecimalDegree && X < -180) { LineShape line = this.CloneDeep() as LineShape; line.TranslateByOffset(-180 - X, 0); return line.GetLength(shapeUnit, returningUnit); } else { return base.GetLengthCore(shapeUnit, returningUnit); } } }