This adds a from_macrostrat method to striplog.striplog. It expects a lng lat point, and will then use the MacroStrat API to get nearby geological units and construct a column based on the ages of the rocks within a buffer zone of the point (by default 0.2 degrees, but easily changed through a parameter). The column is returned as a striplog.Striplog.
While in striplog.py, this is not part of the Striplog class.
It is possible that I should just refactor this so that it does work as part of the class, but there are a handful of additional functions that handle part of the data munging. These could be pulled into the main function which could be moved into the class proper, if so desired. They have relatively little utility outside this specific application.
The plotting call should perhaps be overloaded to hide some complexity?
Resolves #109, but in a more roundabout way, since getting data at a point does not give a column, it returns values from all the data sources at the point.
Coverage decreased (-0.8%) to 76.204% when pulling b2bd0554ca6dec83b97f6fadc96a031724d70d16 on mtb-za:macrostrat_columns into 02ae02ec4ec7c31990faa06e5156924a9b87254f on agile-geoscience:master.
…columns for a given location.
This adds a
from_macrostrat
method tostriplog.striplog
. It expects a lng lat point, and will then use the MacroStrat API to get nearby geological units and construct a column based on the ages of the rocks within a buffer zone of the point (by default 0.2 degrees, but easily changed through a parameter). The column is returned as astriplog.Striplog
.While in
striplog.py
, this is not part of theStriplog
class.It is possible that I should just refactor this so that it does work as part of the class, but there are a handful of additional functions that handle part of the data munging. These could be pulled into the main function which could be moved into the class proper, if so desired. They have relatively little utility outside this specific application.
Example of usage:
The plotting call should perhaps be overloaded to hide some complexity?
Resolves #109, but in a more roundabout way, since getting data at a point does not give a column, it returns values from all the data sources at the point.