def _geo_to_feature(ob):
    """
    Return a GeoJSON Feature from an object that implements
    __geo_interface__

    If the object's type is a geometry, return a Feature with empty
    properties and the object's mapping as the feature geometry. If the
    object's type is a Feature, then return it.

    """
    mapping = ob.__geo_interface__
    if mapping['type'] == 'Feature':
        return mapping
    else:
        return {'type': 'Feature',
                'geometry': mapping}