3.1.1. AnalyzeData

class pyprom.feature_discovery.AnalyzeData(datamap)[source]

Analyze Data is responsible for discovering the following features: pyprom.lib.locations.saddle.Saddle, pyprom.lib.locations.summit.Summit, pyprom.lib.locations.runoff.Runoff

__init__(datamap)[source]
Parameters

datamap – datamap to discover features on.

Type

pyprom.lib.datamap.DataMap object.

__weakref__

list of weak references to the object (if defined)

analyze()[source]

Analyze Routine. Looks for pyprom.lib.locations.summit.Summit, pyprom.lib.locations.saddle.Saddle and pyprom.lib.locations.runoff.Runoff features

Returns

Containers

Return type

pyprom.lib.containers.saddles.SaddlesContainer, pyprom.lib.containers.summits.SummitsContainer, pyprom.lib.containers.runoffs.RunoffsContainer,

analyze_multipoint(x, y, ptElevation)[source]

Logic for analyzing a feature which fits the definition of a multipoint.

Parameters
  • x (int) – x coordinate in raster data.

  • y (int) – y coordinate in raster data.

  • ptElevation (int, float) – Elevation of Multipoint Blob

Returns

Discovered feature or None

Return type

pyprom.lib.locations.saddle.Saddle, pyprom.lib.locations.summit.Summit, or None.

consolidatedFeatureLogic(x, y, perimeter, multipoint, edge, edgePoints)[source]

Consolidated Feature Logic analyzes the highEdges around a point or multipoint and determines if the pattern matches a pyprom.lib.locations.saddle.Saddle, pyprom.lib.locations.summit.Summit or pyprom.lib.locations.runoff.Runoff

Parameters
Returns

List of Container Objects.

Return type

pyprom.lib.containers.spot_elevation.SpotElevationContainer child objects.

edge_feature_analysis(x, y, perimeter, multipoint, edge, edgePoints, highPerimeter)[source]

figure out edge runoffs and saddles.

Parameters
Returns

List of Container Objects.

Return type

pyprom.lib.containers.spot_elevation.SpotElevationContainer child objects.

run(rebuildSaddles=True)[source]

Shortcut for running analysis. This will find all features on the datamap, as well as rebuild all pyprom.lib.locations.saddle.Saddle into a more digestible format with accurate midpoints and only 2 high edges a piece.

Parameters

rebuildSaddles (bool) – run saddle rebuild logic

Returns

Containers with features

Return type

pyprom.lib.containers.saddles.SaddlesContainer pyprom.lib.containers.summits.SummitsContainer pyprom.lib.containers.runoffs.RunoffsContainer

summit_and_saddle(x, y)[source]

summit_and_saddle does that actual discovery of pyprom.lib.locations.saddle.Saddle, or pyprom.lib.locations.summit.Summit

Parameters
  • x (int) – x coordinate in raster data.

  • y (int) – y coordinate in raster data.

Returns

Disocvered Feature, or None

Return type

pyprom.lib.locations.saddle.Saddle pyprom.lib.locations.summit.Summit or pyprom.lib.locations.runoff.Runoff, or None.