本文整理汇总了Python中treemap.models.Tree.height_m方法的典型用法代码示例。如果您正苦于以下问题:Python Tree.height_m方法的具体用法?Python Tree.height_m怎么用?Python Tree.height_m使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类treemap.models.Tree
的用法示例。
在下文中一共展示了Tree.height_m方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handle_row
# 需要导入模块: from treemap.models import Tree [as 别名]
# 或者: from treemap.models.Tree import height_m [as 别名]
#.........这里部分代码省略.........
pass
if not date:
raise ValueError("Date strings must be in mm/dd/yyyy or yyyy/mm/dd format")
tree.date_planted = date.strftime("%Y-%m-%d")
if row.get("DIAMETER"):
tree.dbh = float(row["DIAMETER"])
if row.get("HEIGHT"):
tree.height = float(row["HEIGHT"])
if row.get("CANOPYHEIGHT"):
tree.canopy_height = float(row["CANOPYHEIGHT"])
if row.get("CONDITION"):
for k, v in choices["conditions"]:
if v == row["CONDITION"]:
tree.condition = k
break
if row.get("CANOPYCONDITION"):
for k, v in choices["canopy_conditions"]:
if v == row["CANOPYCONDITION"]:
tree.canopy_condition = k
break
# FOR OTM INDIA
# GIRTH_CM", "GIRTH_M", "HEIGHT_FT", "HEIGHT_M", "NEST", "BURROWS", "FLOWERS", "FRUITS", "NAILS", "POSTER", "WIRES", "TREE_GUARD", "NUISANCE", "NUISANCE_DESC", "HEALTH_OF_TREE", "FOUND_ON_GROUND", "GROUND_DESCRIPTION", "RISK_ON_TREE", "RISK_DESC", "RARE", "ENDANGERED", "VULNERABLE", "PEST_AFFECTED", "REFER_TO_DEPT", "SPECIAL_OTHER", "SPECIAL_OTHER_DESCRIPTION", "LATITUDE", "LONGITUDE", "CREATION_DATE", "DEVICE_ID", "TIME", "DATE"])
if row.get("GIRTH_M"):
tree.girth_m = float(row["GIRTH_M"])
if row.get("HEIGHT_M"):
tree.height_m = float(row["HEIGHT_M"])
if row.get("NEST"):
tree.nest = str(row["NEST"])
if row.get("BURROWS"):
tree.burrows = str(row["BURROWS"])
if row.get("FLOWERS"):
tree.flowers = str(row["FLOWERS"])
if row.get("FRUITS"):
tree.fruits = str(row["FRUITS"])
if row.get("NAILS"):
tree.nails = str(row["NAILS"])
if row.get("POSTER"):
tree.poster = str(row["POSTER"])
if row.get("WIRES"):
tree.wires = str(row["WIRES"])
if row.get("TREE_GUARD"):
tree.tree_guard = str(row["TREE_GUARD"])
if row.get("NUISANCE"):
tree.other_nuisance = bool(row["NUISANCE"])
if row.get("NUISANCE_DESC"):
tree.other_nuisance_desc = str(row["NUISANCE_DESC"])
if row.get("HEALTH_OF_TREE"):