obspy/obspy — pull request #752 by markcwill (2014-03-05 17:44:32+00:00)
Title: geo_interface impplementation

This is an implementation of the `__geo_interface__` attribute proposed here:
https://gist.github.com/sgillies/2217756 for the obspy classes that have coordinates (namely, `Origin`, `Station`, plus `Event`). They return a dictionary of valid GeoJSON, which can be used by other programs. Useful for making JSON to kick out for mapping or a web app. The PyPi module `geojson` already supports this:
```python
>>> from obspy.core.event import *
>>> import geojson
>>> o = Origin(latitude=44.5, longitude=123.4, depth=12.0, time=UTCDateTime())
>>> geojson.dumps(o)
'{"geometry": {"type": "Point", "id": "smi:local/069f5b1a-20b7-4950-9a90-bda084794efb", "coordinates": [123.4, 44.5, 12.0]}, "type": "Feature", "properties": {"updated": null, "time": 1394041177.414326}}'
```
Tests may need to be cleaned up a bit, and this could also be added to `Catalog` and `Network` by looping over its children.