@@ -341,11 +341,11 @@ private static void DrawLinestring(Geometry.Linestring linestring, Geometry.Box
341341 }
342342 }
343343
344- private static Geometry . Box AabbRange ( Geometry . IRandomAccessRange < Geometry . Point > rng , Geometry . Traits traits , bool calculateEnvelope )
344+ private static Geometry . Box AabbRange ( Geometry . IRandomAccessRange < Geometry . Point > rng , bool closed , Geometry . Traits traits , bool calculateEnvelope )
345345 {
346346 return calculateEnvelope
347- ? Geometry . Envelope ( rng , traits )
348- : Geometry . Aabb ( rng , traits . Unit ) ;
347+ ? Geometry . Envelope ( rng , closed , traits )
348+ : Geometry . Aabb ( rng , closed , traits . Unit ) ;
349349 }
350350
351351 public class Linestring : Geometry . Linestring , IDrawable
@@ -357,7 +357,7 @@ public void Draw(Geometry.Box box, Graphics graphics, Settings settings, Geometr
357357
358358 public Geometry . Box Aabb ( Geometry . Traits traits , bool calculateEnvelope )
359359 {
360- return AabbRange ( this , traits , calculateEnvelope ) ;
360+ return AabbRange ( this , false , traits , calculateEnvelope ) ;
361361 }
362362 }
363363
@@ -397,7 +397,7 @@ public void Draw(Geometry.Box box, Graphics graphics, Settings settings, Geometr
397397
398398 public Geometry . Box Aabb ( Geometry . Traits traits , bool calculateEnvelope )
399399 {
400- return AabbRange ( this , traits , calculateEnvelope ) ;
400+ return AabbRange ( this , true , traits , calculateEnvelope ) ;
401401 }
402402 }
403403
@@ -459,11 +459,11 @@ private static void DrawPolygon(Geometry.Polygon polygon, Geometry.Box box, Grap
459459
460460 private static Geometry . Box AabbPolygon ( Geometry . Polygon poly , Geometry . Traits traits , bool calculateEnvelope )
461461 {
462- Geometry . Box result = AabbRange ( poly . Outer , traits , calculateEnvelope ) ;
462+ Geometry . Box result = AabbRange ( poly . Outer , true , traits , calculateEnvelope ) ;
463463
464464 foreach ( Geometry . Ring inner in poly . Inners )
465465 {
466- Geometry . Box aabb = AabbRange ( inner , traits , calculateEnvelope ) ;
466+ Geometry . Box aabb = AabbRange ( inner , true , traits , calculateEnvelope ) ;
467467 if ( calculateEnvelope )
468468 Geometry . Expand ( result , aabb , traits ) ;
469469 else
@@ -556,7 +556,7 @@ public Geometry.Box Aabb(Geometry.Traits traits, bool calculateEnvelope)
556556
557557 for ( int i = 0 ; i < this . Count ; ++ i )
558558 {
559- Geometry . Box ls_box = AabbRange ( this [ i ] , traits , calculateEnvelope ) ;
559+ Geometry . Box ls_box = AabbRange ( this [ i ] , false , traits , calculateEnvelope ) ;
560560
561561 if ( box == null )
562562 box = ls_box ;
0 commit comments