def intersect_geometry(geometry1, geometry2):
    """
    returns the intersection of two point or polygon geometries

    Parameters
    ----------
    geometry1, geometry2 : OGRGeometry
        geometry objects

    Returns
    -------
    intersection : OGRGeometry
        a geometry representing the intersection area
    """
    geometry1c = geometry1.Clone()
    geometry2c = geometry2.Clone()
    geometry1 = None
    geometry2 = None
    intersection = geometry1c.Intersection(geometry2c)
    return intersection
