Inherits object.
Public Member Functions | |
def | __init__ (self, tag_names, slpposf, reach_shp, hillslpf, landusef) |
def | extract_subbasin_updown (self) |
def | assign_uniqueid_slppos_units (self) |
def | check_unit_id (self) |
def | merge_slopeposition_units (self) |
def | extract_subbasin_hillslope_slppos (self) |
def | output (self, jfile, unitraster, unitshp) |
def | run (self) |
Static Public Member Functions | |
def | check_slppos_sequence (seqs, slppos_tags) |
Construct hillslope-slope position units.
def seims.preprocess.sd_slopeposition_units.SlopePositionUnits.__init__ | ( | self, | |
tag_names, | |||
slpposf, | |||
reach_shp, | |||
hillslpf, | |||
landusef | |||
) |
Initialization. Args: tag_names: [tag(integer), name(str)], tag should be ascending from up to bottom. slpposf: Crisp classification of slope position full filename. reach_shp: Reach shapefile used to extract the up-down relationships of subbasins hillslpf: Delineated hillslope file by sd_hillslope.py. landusef: Landuse, used to statistics areas of each landuse types within slope position units Attributes: slppos_tags(OrderedDict): {tag: name} subbsin_tree: up-down stream relationships of subbasins. {subbsnID: {'upstream': [], 'downstream': []}} units_updwon: Output json data of slope position units. {"slppos_1": {id:{"downslope": [ids], "upslope": [ids], "landuse": {luID: area} "hillslope": [hillslpID], "subbasin": [subbsnID], "area": area } } "slppos_2": ... }
def seims.preprocess.sd_slopeposition_units.SlopePositionUnits.assign_uniqueid_slppos_units | ( | self | ) |
Get unique ID by multiply slope position value and hillslope ID
|
static |
Check the slope position sequence is complete or not.
def seims.preprocess.sd_slopeposition_units.SlopePositionUnits.check_unit_id | ( | self | ) |
check the existence of upslope and downslope units.
def seims.preprocess.sd_slopeposition_units.SlopePositionUnits.extract_subbasin_hillslope_slppos | ( | self | ) |
Extract the hierarchical relationship of spatial units, i.e., Subbasin-Hillslope-Slope position
def seims.preprocess.sd_slopeposition_units.SlopePositionUnits.extract_subbasin_updown | ( | self | ) |
Extract the up-down relationship of subbasins.
def seims.preprocess.sd_slopeposition_units.SlopePositionUnits.merge_slopeposition_units | ( | self | ) |
Merge hillslope/subbasin with incomplete slope position sequences
def seims.preprocess.sd_slopeposition_units.SlopePositionUnits.output | ( | self, | |
jfile, | |||
unitraster, | |||
unitshp | |||
) |
output json file and slope position units raster file
def seims.preprocess.sd_slopeposition_units.SlopePositionUnits.run | ( | self | ) |
Workflow.