Round the coordinates of a shapely geometry to some decimal precision.

    Parameters
    ----------
    shape : shapely geometry, one of Point, MultiPoint, LineString,
            MultiLineString, Polygon, or MultiPolygon
        the geometry to round the coordinates of
    precision : int
        decimal precision to round coordinates to

    Returns
    -------
    shapely geometry

def round_shape_coords(shape, precision):
    """
    Round the coordinates of a shapely geometry to some decimal precision.

    Parameters
    ----------
    shape : shapely geometry, one of Point, MultiPoint, LineString,
            MultiLineString, Polygon, or MultiPolygon
        the geometry to round the coordinates of
    precision : int
        decimal precision to round coordinates to

    Returns
    -------
    shapely geometry
    """
    
    if isinstance(shape, Point):
        return round_point_coords(shape, precision)
    
    elif isinstance(shape, MultiPoint):
        return round_multipoint_coords(shape, precision)
    
    elif isinstance(shape, LineString):
        return round_linestring_coords(shape, precision)
    
    elif isinstance(shape, MultiLineString):
        return round_multilinestring_coords(shape, precision)
    
    elif isinstance(shape, Polygon):
        return round_polygon_coords(shape, precision)
    
    elif isinstance(shape, MultiPolygon):
        return round_multipolygon_coords(shape, precision)
    
    else:
        raise TypeError('cannot round coordinates of unhandled geometry type: {}'.format(type(shape)))