def classifyLevel1Assign(classLevel1Img):
# Create Output Array
level1 = numpy.empty_like(classLevel1Img, dtype = numpy.dtype('a255'))
level1[...] = "NA"
# Non Vegetated
level1 = numpy.where(numpy.logical_or(classLevel1Img == "NA",
numpy.logical_or(classLevel1Img == "Water",
classLevel1Img == "Urban")),
"Non Vegetated", level1)
# Vegetated
level1 = numpy.where(numpy.logical_or(classLevel1Img == "Photosynthetic Vegetated",
classLevel1Img == "Non Photosynthetic Vegetated",
classLevel1Img == "Non Submerged Aquatic Vegetated"),
"Vegetated", level1)
return level1
# A function for classifying level 2
RATSforClassification.py 文件源码
python
阅读 33
收藏 0
点赞 0
评论 0
评论列表
文章目录