parameters: (reference, others)
docstring: Take two or more rasters with the same size per pixel, and calculate the areas where they intersect, based on their position. Then, we keep only those areas, discarding the other pixels.
docstring_summary: Take two or more rasters with the same size per pixel, and calculate the areas where they intersect, based on their position. Then, we keep only those areas, discarding the other pixels.
docstring_tokens: Take two or more rasters with the same size per pixel and calculate the areas where they intersect based on their position . Then we keep only those areas discarding the other pixels .
function: def intersect_rasters(reference, others):
      """Take two or more rasters with the same size per pixel, and calculate the areas where they intersect, based on their position. Then, we keep only those areas, discarding the other pixels."""
      final_bounds = reference.get_bounds()
  
      for other in others:
          final_bounds = final_bounds.intersection(other.get_bounds())
  
      reference.reduce_to_bounds(final_bounds)
      for other in others:
          other.reduce_to_bounds(final_bounds)
function_tokens: def intersect_rasters ( reference , others ) : final_bounds = reference . get_bounds ( ) for other in others : final_bounds = final_bounds . intersection ( other . get_bounds ( ) ) reference . reduce_to_bounds ( final_bounds ) for other in others : other . reduce_to_bounds ( final_bounds )