def _get_submap(self, eopatch):
        """
        Returns a new geopandas dataframe with same structure as original one (columns) except that
        it contains only polygons that are contained within the given bbox.

        :param eopatch: input EOPatch
        :type eopatch: EOPatch
        :return: New EOPatch
        :rtype: EOPatch
        """
        bbox_poly = eopatch.bbox.get_geometry()

        filtered_data = self.vector_data[self.vector_data.geometry.intersects(bbox_poly)].copy(deep=True)
        filtered_data.geometry = filtered_data.geometry.intersection(bbox_poly)

        return filtered_data
def _get_submap ( self , eopatch ) : bbox_poly = eopatch . bbox . get_geometry ( ) filtered_data = self . vector_data [ self . vector_data . geometry . intersects ( bbox_poly ) ] . copy ( deep = True ) filtered_data . geometry = filtered_data . geometry . intersection ( bbox_poly ) return filtered_data
Returns a new geopandas dataframe with same structure as original one (columns) except that
        it contains only polygons that are contained within the given bbox.

        :param eopatch: input EOPatch
        :type eopatch: EOPatch
        :return: New EOPatch
        :rtype: EOPatch