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, sort_keys=True) # doctest: +ELLIPSIS 
  '{"geometry": {"coordinates": [49..., 55...], "type": "Point"}, "id": 12, "properties": {"foo": "bar"}, "type": "Feature"}'

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