Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io.shapefile: add support for writing origin uncertainties to shapefile #1701

Closed
wants to merge 3 commits into from

Conversation

megies
Copy link
Member

@megies megies commented Mar 6, 2017

This PR adds functionality to write event origin uncertainties to shapefile format (e.g. to use in GIS applications).

ToDo:

  • example / tutorial
  • test
  • write uncertainties into shapefile table for reuse in GIS applications
  • other information on the event would be useful to have in the shapefile database table as well, especially origin quality metrics, e.g. number of stations used in location, azimuthal gap, ...

+DOCS

Usage example:

from obspy import read_events
cat = read_events('my_catalog.xml')
cat.write('/tmp/tmp_my_events.shp', format='SHAPEFILE',
          error_ellipses={'filename': '/tmp/tmp_my_events_errors.shp', 'epsg': 31468})

Potential improvement:

  • also write origin uncertainties to feature tables (so that filtering by error margins in GIS applications is possible)
  • automatic lookup of appropriate UTM zone, based on event locations in catalog (or raise exception if catalog is too wide-spread so that a single geocentric zone will not work)

@megies megies added this to the 1.1.0 milestone Mar 6, 2017
@megies megies added .core.event issues related to our Catalog/Event functionality .io issues generally related to our read/write plugins enhancement feature request labels Mar 6, 2017
@megies
Copy link
Member Author

megies commented Mar 21, 2017

Maybe should also add writing columns with hypocenter uncertainties to the shapefile, for use in GIS applications..

Done.

@megies megies self-assigned this Mar 21, 2017
@megies megies modified the milestones: 1.2.0, 1.1.0 Jul 27, 2017
@megies
Copy link
Member Author

megies commented Oct 17, 2017

Closing this one. The whole approach was a bit awkward anyway and uncertainties are now in the main shapefile table, so applications can use that information for plotting.

@megies megies closed this Oct 17, 2017
@megies
Copy link
Member Author

megies commented Oct 18, 2017

Mada a backup of this branch here: https://github.com/megies/obspy/tree/shapefile_error_ellipses

@megies megies deleted the shapefile_error_ellipses branch October 18, 2017 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.core.event issues related to our Catalog/Event functionality enhancement feature request .io issues generally related to our read/write plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant