Test c2c features
=================

  >>> class Feature(object):
  ...     def __init__(self, id, geometry, **props):
  ...         self.id = id
  ...         self.geometry = geometry
  ...         self.properties = {}
  ...         for key, value in props.items():
  ...             self.properties[key] = value
  ...
  ...     @property
  ...     def __geo_interface__(self):
  ...         return {
  ...                'type': 'Feature',
  ...                'id': self.id,
  ...                'geometry': self.geometry,
  ...                'properties': self.properties
  ...                }

  >>> class FeatureCollection(list):
  ...     @property
  ...     def __geo_interface__(self):
  ...         return {
  ...                'type': 'FeatureCollection',
  ...                'features': list(f for f in self)
  ...                }

  >>> class Point(object):
  ...    """Mock shapely point."""
  ...    def __init__(self, x, y):
  ...        self.x = x; self.y = y
  ...    @property
  ...    def __geo_interface__(self):
  ...        return dict(type="Point", coordinates=[self.x, self.y])

  >>> f = Feature(12, Point(49.132323, 55.341411), foo='bar')
  >>> import geojson
  >>> geojson.dumps(f) # doctest: +ELLIPSIS 
  '{"geometry": {"type": "Point", "coordinates": [49..., 55...]}, "type": "Feature", "properties": {"foo": "bar"}, "id": 12}'
  >>> c = FeatureCollection([f])
  >>> geojson.dumps(c) # doctest: +ELLIPSIS
  '{"type": "FeatureCollection", "features": [{"geometry": {"type": "Point", "coordinates": [49..., 55...]}, "type": "Feature", "properties": {"foo": "bar"}, "id": 12}]}'
