def euclidean_area(poly, precision=6):
    """
    An implementation of Green's theorem, an algorithm to calculate area of
    a closed polgon. This works for convex and concave polygons that do not
    intersect oneself whose vertices are described by ordered pairs.
    https://gist.github.com/rob-murray/11245628

    Args:
        poly: The polygon expressed as a list of vertices, or 2D vector points
        precision: How many decimal places to truncate for the returned result

    Returns:
        float: The calculated area of input polygon in meteres
    """
    # ensure we have a list; best to assert that it isnt a string as in python
    # several types can act as a list
    assert not isinstance(poly, str)
    total = 0.0
    N = len(poly)

    for i in range(N):
        v1, v2 = poly[i], poly[(i + 1) % N]
        total += v1[0] * v2[1] - v1[1] * v2[0]
    return float(round(abs(total / 2), precision))