コード例 #1
0
    def calculate_bounds(self):
        """
            Calculate the time_range, bbox, and size of this collection.
            Will scan all data.
            Ensures that .size, .bbox and .time_range return non-null.

            If the collection already knows its bbox; time_range; and/or size,
            they are recomputed.
        """ 
        single_point_collection = PointCollection(elements=list(AsaList.flatten(self)))
        single_point_collection.calculate_bounds()
        self.bbox = single_point_collection.bbox
        self.time_range = single_point_collection.time_range
        self.depth_range = single_point_collection.depth_range
        self._point_size = single_point_collection.size
        self.size = len(self._elements)
コード例 #2
0
 def flatten(self):
     """
         Returns a Generator of Points that are part of this collection
     """
     return AsaList.flatten(self)