Example #1
0
 internal static bool HasNonEmptyBoundary(com.epl.geometry.Geometry geom, com.epl.geometry.ProgressTracker progress_tracker)
 {
     if (geom.IsEmpty())
     {
         return(false);
     }
     com.epl.geometry.Geometry.Type gt = geom.GetType();
     if (gt == com.epl.geometry.Geometry.Type.Polygon)
     {
         if (geom.CalculateArea2D() == 0)
         {
             return(false);
         }
         return(true);
     }
     else
     {
         if (gt == com.epl.geometry.Geometry.Type.Polyline)
         {
             bool[] b = new bool[1];
             b[0] = false;
             CalculatePolylineBoundary_(geom._getImpl(), progress_tracker, true, b);
             return(b[0]);
         }
         else
         {
             if (gt == com.epl.geometry.Geometry.Type.Envelope)
             {
                 return(true);
             }
             else
             {
                 if (com.epl.geometry.Geometry.IsSegment(gt.Value()))
                 {
                     if (!((com.epl.geometry.Segment)geom).IsClosed())
                     {
                         return(true);
                     }
                     return(false);
                 }
                 else
                 {
                     if (com.epl.geometry.Geometry.IsPoint(gt.Value()))
                     {
                         return(false);
                     }
                 }
             }
         }
     }
     return(false);
 }