Reach-Tools Documentation¶
This documentation is generated from the template defined in ./docsrc/source/index.rst
. This location and
file is the place to start creating documentation for your project.
reStructured Text¶
Since not everybody knows the reStructured Text syntax cold, it does help to have a good reference or two.
NBSphinx¶
Since frequently Jupyter Notebooks are valuable documentation in themselves, using NBSphinx you can include
them directly in the documentation. Just ensure you start the notebook with a markdown cell using a level one
header (# Level One Title
).
Contents¶
reacher_tools¶
Example using the Sphinx Autodoc extension to document the automatically included support library for this
project located in ./src/reacher_tools
.
- class reach_tools.Reach(reach_id)[source]¶
-
- property centroid¶
Get a point geometry centroid for the hydroline.
- Returns:
Point Geometry Centroid representing the reach location as a point.
- property centroid_feature: arcgis.features.Feature¶
Get a feature with the centroid geometry. :return: Feature with point geometry for the reach centroid.
- property extent¶
Provide the extent of the reach as (xmin, ymin, xmax, ymax) :return: Set (xmin, ymin, xmax, ymax)
- classmethod from_aw(reach_id)[source]¶
Get a reach by retrieving JSON directly from American Whitewater.
- classmethod from_aw_json(raw_aw_json)[source]¶
Create a reach from a raw AW JSON string representation of reach data.
- property geometry: arcgis.geometry.Polyline¶
Reach polyline geometry.
- property line_feature: arcgis.features.Feature¶
ArcGIS Python API Feature object for the reach.
- property reach_points_dataframe¶
Get the reach points as an Esri Spatially Enabled Pandas DataFrame. :return:
- property reach_points_features¶
Get all the reach points as a list of features. :return: List of ArcGIS Python API Feature objects.
- class reach_tools.ReachPoint(reach_id, geometry, point_type, uid=None, subtype=None, name=None, side_of_river=None, update_date=None, notes=None, description=None, difficulty=None, **kwargs)[source]¶
Discrete object facilitating working with reach points.
- property dictionary¶
Get the point as a dictionary of values making it easier to build DataFrames. :return: Dictionary of all properties, with a little modification for geometries.
- property feature¶
Get the access as an ArcGIS Python API Feature object. :return: ArcGIS Python API Feature object representing the access.
- property geometry¶
Point geometry for the access.
- set_geometry(geometry)[source]¶
Set the geometry for the point.
- Parameters:
geometry – ArcGIS Python API Point Geometry object.
reach_tools.utils¶
These utilities are included by default to speed up the development process.
- reach_tools.utils.build_data_directory(dir_path)[source]¶
Create a directory in the specified path.
Note
If the parents for the directory path do not exist, they will automatically be created.
- reach_tools.utils.cleanup_string(input_string)[source]¶
Helper function to clean up description strings.
- Return type:
- reach_tools.utils.configure_logging(level='INFO', logfile_path=None, propagate=False)[source]¶
Get Python
Logger
configured to provide stream, file or, if available, ArcPy output. The way the method is set up, logging will be routed through ArcPy messaging usingArcpyHandler
if ArcPy is available. If ArcPy is not available, messages will be sent to the console using aStreamHandler
. Next, if thelogfile_path
is provided, log messages will also be written to the provided path to a logfile using aFileHandler
.Valid
log_level
inputs include: *DEBUG
- Detailed information, typically of interest only when diagnosing problems. *INFO
- Confirmation that things are working as expected. *WARNING
orWARN
- An indication that something unexpected happened, or indicative of some problem in thenear future (e.g. ‘disk space low’). The software is still working as expected.
ERROR
- Due to a more serious problem, the software has not been able to perform some function.CRITICAL
- A serious error, indicating that the program itself may be unable to continue running.
- Parameters:
- Return type:
# only output to console and potentially Pro if ArcPy is available configure_logging('DEBUG') logging.debug('nauseatingly detailed debugging message') logging.info('something actually useful to know') logging.warning('The sky may be falling') logging.error('The sky is falling.) logging.critical('The sky appears to be falling because a giant meteor is colliding with the earth.')