Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/environmental-modeling-workflows/watershed-workflow
/ functions
Functions
1,294 in github.com/environmental-modeling-workflows/watershed-workflow
⨍
Functions
1,294
◇
Types & classes
71
↳
Endpoints
3
↓ 234 callers
Method
append
Adds a object, returning a handle to that object
watershed_workflow/split_hucs.py:68
↓ 60 callers
Method
getDataset
Get dataset for the given geometry and time range. Blocking request. Parameters ---------- geometry : shapely.geomet
watershed_workflow/sources/manager_dataset.py:245
↓ 59 callers
Method
items
(self)
watershed_workflow/split_hucs.py:105
↓ 45 callers
Method
plot
Plot the flattened 2D mesh.
watershed_workflow/mesh.py:442
↓ 38 callers
Method
copy
Shallow copy using a provided DataFrame
watershed_workflow/river_tree.py:747
↓ 33 callers
Method
extend
Add many objects, returning a list of handles.
watershed_workflow/split_hucs.py:75
↓ 33 callers
Method
keys
(self)
watershed_workflow/river_tree.py:81
↓ 33 callers
Method
preOrder
Generates nodes in PreOrder.
watershed_workflow/tinytree.py:223
↓ 32 callers
Method
split
Split the reach at the ith coordinate of the linestring. Note that this does not split the catchment! self becomes the downstream no
watershed_workflow/river_tree.py:289
↓ 30 callers
Method
pop
Removes a handle and its object.
watershed_workflow/split_hucs.py:79
↓ 24 callers
Method
getShapesByGeometry
Get shapes that intersect with the given geometry. Parameters ---------- geometry : shapely.geometry.base.BaseGeometry | gpd.
watershed_workflow/sources/manager_shapes.py:102
↓ 22 callers
Function
data
(poly_hucs, river_segs)
watershed_workflow/test/test_05_hydrography.py:13
↓ 22 callers
Method
getShapesByID
Get shapes by their ID values. Parameters ---------- ids : List[str] | str Single ID or list of IDs to retrieve.
watershed_workflow/sources/manager_shapes.py:161
↓ 21 callers
Method
remove
Remove this node from its parent. Returns the index this node had in the parent child list.
watershed_workflow/tinytree.py:133
↓ 20 callers
Method
update
Acts on click. Parameters ---------- event : matplotlib event The click event from matplotlib.
watershed_workflow/plot.py:201
↓ 20 callers
Method
values
(self)
watershed_workflow/split_hucs.py:101
↓ 18 callers
Function
run_test_1D
(elev_in, elev_out, alg)
watershed_workflow/test/test_11_condition.py:28
↓ 17 callers
Function
hilevSnap
This helper function simply does all three hydro operations.
watershed_workflow/test/test_05_hydrography.py:36
↓ 17 callers
Method
max
(self)
watershed_workflow/resampling.py:35
↓ 17 callers
Function
shift
(p, t)
watershed_workflow/test/crs_fixtures.py:13
↓ 14 callers
Method
isContinuous
Checks geometric continuity of the river. Confirms that all upstream children's downstream coordinate coincides with self's upstream
watershed_workflow/river_tree.py:599
↓ 14 callers
Method
min
(self)
watershed_workflow/resampling.py:31
↓ 12 callers
Method
computePolygon
Construct polygon i and return a copy.
watershed_workflow/split_hucs.py:234
↓ 12 callers
Method
file_name
(self, *args, **kwargs)
watershed_workflow/sources/filenames.py:38
↓ 12 callers
Function
plotLineString
(reach, fmt, ax)
watershed_workflow/test/test_11_condition.py:87
↓ 12 callers
Function
projectOne
Find a point p_out that is width away from p and such that p_up --> p is right-perpendicular to p --> p_out. Parameters ---------- p_up :
watershed_workflow/river_mesh.py:622
↓ 12 callers
Function
projectTwo
Find a point that is perpendicular to the linestring p_up --> p --> p_dn. Projects by intersecting two lines, one parallel to p_up --> p and widt
watershed_workflow/river_mesh.py:648
↓ 12 callers
Method
replace
Replace this node with a sequence of other nodes. This is equivalent to deleting this node from the child list, and then
watershed_workflow/tinytree.py:153
↓ 12 callers
Function
reverseLineString
Reverse the direction of a LineString. Parameters ---------- ls : shapely.geometry.LineString LineString to reverse.
watershed_workflow/utils.py:556
↓ 11 callers
Method
col_to_id
Maps 2D cell ID and index in the vertical to a 3D cell ID. Parameters ---------- column : int 2D cell ID.
watershed_workflow/mesh.py:145
↓ 11 callers
Method
setLevel
(self, level : int)
watershed_workflow/sources/manager_wbd.py:29
↓ 10 callers
Function
computeWidth
(a)
watershed_workflow/test/test_11_condition.py:292
↓ 10 callers
Method
exterior
Construct boundary polygon and return a copy.
watershed_workflow/split_hucs.py:361
↓ 10 callers
Method
isMonotonic
(self, known_depressions=None)
watershed_workflow/river_tree.py:636
↓ 10 callers
Method
requestDataset
Establish a request for a dataset for the given geometry and time range. Parameters ---------- geometry : shapely.geometry.Po
watershed_workflow/sources/manager_dataset.py:148
↓ 9 callers
Method
addChild
Append a child (upstream) reach to this reach.
watershed_workflow/river_tree.py:122
↓ 9 callers
Method
merge
Merges this node with its parent. Parameters ---------- merge_reach : bool, optional Whether to merge the l
watershed_workflow/river_tree.py:391
↓ 8 callers
Function
_getAngles
Given a list of linestrings whose terminal coordinate is the same, compute angles between each successive pair of strings.
watershed_workflow/angles.py:21
↓ 8 callers
Method
_prerequestDataset
(self)
watershed_workflow/sources/manager_shapes.py:199
↓ 8 callers
Method
add
Add BoundaryEntry object to the waterway
watershed_workflow/condition.py:238
↓ 8 callers
Function
check0
(hucs, rivers)
watershed_workflow/test/test_05_hydrography.py:49
↓ 8 callers
Function
computeLine
Compute line coefficients (Ax + By + C = 0) for a line defined by two points. Parameters ---------- p1 : np.ndarray First point c
watershed_workflow/river_mesh.py:539
↓ 8 callers
Method
fetchRequest
Fetch the request and get the actual data.
watershed_workflow/sources/manager_dataset.py:201
↓ 8 callers
Method
folder_name
(self, *args, **kwargs)
watershed_workflow/sources/filenames.py:21
↓ 8 callers
Method
getNextAvailableLabeledSetID
Returns next available LS id.
watershed_workflow/mesh.py:412
↓ 8 callers
Function
plot
(river, coords, elems, hucs = None, force = False)
watershed_workflow/test/test_10_mesh_mixed.py:83
↓ 8 callers
Function
plot_comparison
(var_estimate, var_reference, var_name, ax)
watershed_workflow/test/test_15_stream_light.py:69
↓ 7 callers
Method
_parseVariable
Parse a variable name to extract base variable and layer. Parameters ---------- var_name : str Variable n
watershed_workflow/sources/manager_soilgrids_2017.py:176
↓ 7 callers
Method
constructRiversByGeometry
Forms a list of River trees from a list of reaches by looking for close endpoints of those reaches. Parameters ----------
watershed_workflow/river_tree.py:769
↓ 7 callers
Function
get_config_from_root
Read the project setup.cfg file to determine Versioneer config.
versioneer.py:336
↓ 7 callers
Function
get_root
Get the project root directory. We require that all commands are run from the project root, i.e. the directory that contains setup.py, setup.
versioneer.py:297
↓ 7 callers
Function
get_versions
Get the project version from whatever source is available. Returns dict with two keys: 'version' and 'full'.
versioneer.py:1646
↓ 7 callers
Method
isReady
Is the request ready for fetching?
watershed_workflow/sources/manager_dataset.py:196
↓ 7 callers
Method
run
(self)
versioneer.py:1905
↓ 7 callers
Method
to_crs
Warp the coordinate system.
watershed_workflow/river_tree.py:708
↓ 6 callers
Method
add
(self, arg)
watershed_workflow/tinytree.py:63
↓ 6 callers
Method
addChild
Add a child to this node. :child A Tree object
watershed_workflow/tinytree.py:102
↓ 6 callers
Function
assert_list_same
(l1, l2)
watershed_workflow/test/test_03_river_tree.py:12
↓ 6 callers
Method
cell_edges
Generator for edges of a cell. Parameters ---------- conn : List[int] Cell connectivity (vertex indices).
watershed_workflow/mesh.py:326
↓ 6 callers
Function
check1
(hucs, rivers, extra_point=None)
watershed_workflow/test/test_05_hydrography.py:161
↓ 6 callers
Method
clearGeometryCache
If coordinates are changed, any computed, cached geometry must be recomputed. It is the USER's responsibility to call this function i
watershed_workflow/mesh.py:433
↓ 6 callers
Method
edge_hash
Hashes edges in a direction-independent way. Parameters ---------- i : int First vertex index. j
watershed_workflow/mesh.py:294
↓ 6 callers
Method
getNode
return node for a given index
watershed_workflow/river_tree.py:552
↓ 6 callers
Function
get_shapes
(filename)
watershed_workflow/test/test_14_find_huc.py:11
↓ 6 callers
Method
polygons
Iterate over the polygons.
watershed_workflow/split_hucs.py:255
↓ 6 callers
Method
prune
Removes this node and all below it, merging properties. This method removes the entire subtree rooted at this node, but first
watershed_workflow/river_tree.py:427
↓ 6 callers
Method
transform
Transform a 2D mesh. Parameters ---------- mat : np.ndarray, optional 3x3 transformation matrix. Default
watershed_workflow/mesh.py:506
↓ 5 callers
Function
check2
(hucs, rivers, extra_point=None)
watershed_workflow/test/test_05_hydrography.py:250
↓ 5 callers
Method
computeCentroid
Computes, based on coords, the centroid of a cell with ID c. Note this ALWAYS recomputes the value, not using the cache.
watershed_workflow/mesh.py:419
↓ 5 callers
Method
data_dir
(self)
watershed_workflow/sources/filenames.py:17
↓ 5 callers
Method
handles
Generator for handles
watershed_workflow/split_hucs.py:91
↓ 5 callers
Method
isLocallyMonotonic
Checks for monotonically decreasing elevation as we march downstream in this reach.
watershed_workflow/river_tree.py:625
↓ 5 callers
Function
is_multi
(thing)
watershed_workflow/utils.py:601
↓ 5 callers
Method
pathToRoot
A generator for the nodes on the path to root, including this.
watershed_workflow/river_tree.py:658
↓ 5 callers
Method
vertex_to_id
Maps 2D vertex ID and index in the vertical to a 3D vertex ID. Parameters ---------- vertex : int 2D vert
watershed_workflow/mesh.py:162
↓ 5 callers
Function
write_to_version_file
Write the given version number to the given _version.py file.
versioneer.py:1381
↓ 4 callers
Method
_isContinuous
Is a given child continuous with self?
watershed_workflow/river_tree.py:587
↓ 4 callers
Method
deepcopy
Creates a deep copy of self
watershed_workflow/river_tree.py:754
↓ 4 callers
Method
deepcopy
Return a deep copy
watershed_workflow/split_hucs.py:373
↓ 4 callers
Function
dist_func
(a_axes, b_axes)
watershed_workflow/scalebar.py:171
↓ 4 callers
Method
edge_to_id
Maps 2D edge hash and index in the vertical to a 3D face ID of a vertical face. Parameters ---------- edge : int
watershed_workflow/mesh.py:179
↓ 4 callers
Function
iter
(thing)
watershed_workflow/utils.py:618
↓ 4 callers
Function
local_len
(thing)
watershed_workflow/utils.py:612
↓ 4 callers
Function
make_reach
Helper function to make a straight reach along y=0 given elevs.
watershed_workflow/test/test_11_condition.py:80
↓ 4 callers
Method
moveCoordinate
Moves the ith coordinate of self.linestring to a new location.
watershed_workflow/river_tree.py:447
↓ 4 callers
Function
plot
(hucs, rivers, points, tris, force = False)
watershed_workflow/test/test_08_triangulate.py:21
↓ 4 callers
Function
plus_or_dot
Return a + if we don't already have one, else return a .
versioneer.py:1392
↓ 4 callers
Function
plus_or_dot
Return a + if we don't already have one, else return a .
watershed_workflow/_version.py:357
↓ 4 callers
Method
update
Recomputes all polygons
watershed_workflow/split_hucs.py:229
↓ 3 callers
Method
_addStandardNames
Convert native column names to standard names. This method should be implemented by derived classes to map their native column names
watershed_workflow/sources/manager_shapes.py:347
↓ 3 callers
Method
_authenticate
Authenticate to the AppEEARS API. Parameters ---------- username : string, optional Username, defaults to value fro
watershed_workflow/sources/manager_modis_appeears.py:149
↓ 3 callers
Function
_computeAverageYear
Compute annual average for a Dataset and generate output times. Parameters ---------- ds : xr.Dataset Input Dataset with
watershed_workflow/data.py:704
↓ 3 callers
Function
_isInternalSharpAngle
(coords : np.ndarray | shapely.geometry.LineString, i : int,
watershed_workflow/angles.py:89
↓ 3 callers
Function
_isSequenceLike
(anobj)
watershed_workflow/tinytree.py:50
↓ 3 callers
Function
_parseStartDate
Parse start_date into cftime.DatetimeNoLeap. Parameters ---------- start_date : str, datetime, or cftime.datetime Start
watershed_workflow/data.py:767
↓ 3 callers
Method
_postprocessShapes
Apply standard postprocessing to shapes. Parameters ---------- df : gpd.GeoDataFrame GeoDataFrame from derived cl
watershed_workflow/sources/manager_shapes.py:203
↓ 3 callers
Method
_readData
Read all files for a request, returning the data as a Dataset.
watershed_workflow/sources/manager_modis_appeears.py:362
↓ 3 callers
Method
_readFile
Open the file and get the data -- currently these reads it all, which may not be necessary.
watershed_workflow/sources/manager_modis_appeears.py:376
↓ 3 callers
Function
_resampleLineStringNonuniform
Resample a linestring by distance with no respect for previous discrete coords.
watershed_workflow/resampling.py:295
↓ 3 callers
Function
_resampleLineStringUniform
Resample a linestring uniformly with no respect for previous discrete coords.
watershed_workflow/resampling.py:258
next →
1–100 of 1,294, ranked by callers