Esempio n. 1
0
 def AsArea(self):
     '''! \brief Return the area which is the union of all infrastructure's footprint.
     '''
     out = []
     for i in self.Instrastructures():
         out.extend(i.vertices())
     if out:
         a = base_polygon(geometry_rubberband().Solve(out))
         b = a.Centroid()
         return position_descriptor(b.x, b.y, a)
     else:
         return None
Esempio n. 2
0
 def AsArea(self):
     '''! \brief Return the area which is the union of all infrastructure's footprint.
     '''
     out = []
     for i in self.Instrastructures():
         out.extend(i.vertices())
     if out:
         a = base_polygon(geometry_rubberband().Solve(out))
         b = a.Centroid()
         return position_descriptor(b.x, b.y, a)
     else:
         return None
Esempio n. 3
0
    def __init__(self, X=0.0, Y=0.0, footprint = None):
        # the footprint
        self.footprint = footprint
        if type(self.footprint) == type([]):
            self.footprint = sandbox_geometry.base_polygon(self.footprint)

        if hasattr(X,'x'):
            # case where a vector is provided as first argument
            vect_5D.__init__(self, X.x, X.y)
        else:
            # case where the data is passed as intended
            vect_5D.__init__(self,X,Y)
Esempio n. 4
0
 def __init__(self, AoI = None):
     # The Area of Interest (Empty AoI)
     if not AoI:
         self.AoI = sandbox_geometry.base_polygon()
     else:
         self.AoI = AoI
         
     # Name
     self.name = ''
     
     # Range
     self.max_range = 0.0
     
     # Signature target
     self.signal = ''
         
     # Requirements
     self.requires = []
     self.degraded_by = []
     self.enhanced_by = []
     
     # Classification filters
     self.classification_filter = {}