# Path: mapbox/errors.py
# class InvalidFeatureError(ValidationError):
#     pass


import json
import polyline
from .errors import InvalidFeatureError



def _geom_points(geom):
    """GeoJSON geometry to a sequence of point tuples
    """
    if geom['type'] == 'Point':
        yield tuple(geom['coordinates'])
    elif geom['type'] in ('MultiPoint', 'LineString'):
        for position in geom['coordinates']:
            yield tuple(position)
    else:

# Path: mapbox/errors.py
# class InvalidFeatureError(ValidationError):
#     pass


# Path: mapbox/encoding.py
import json
import polyline
from .errors import InvalidFeatureError




def _geom_points(geom):
    """GeoJSON geometry to a sequence of point tuples
    """
    if geom['type'] == 'Point':
        yield tuple(geom['coordinates'])
    elif geom['type'] in ('MultiPoint', 'LineString'):
        for position in geom['coordinates']:
            yield tuple(position)
    else:

        raise InvalidFeatureError(