Skip to content

Commit

Permalink
fix '==' bug
Browse files Browse the repository at this point in the history
  • Loading branch information
weiqi-tori committed Sep 19, 2024
1 parent 7766a6b commit d157d9b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions city_metrix/layers/smart_surface_lulc.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,31 +89,31 @@ def get_data(self, bbox):
# classify buildings
if len(buildings) > 0:
# Unclassified ULU
if (buildings['ULU'] == 0):
if buildings['ULU'] == 0:
# large building = low slope
if (buildings['Area_m'] >= 1034):
buildings['Value'] == 46
if buildings['Area_m'] >= 1034:
buildings['Value'] = 46
# small building & high ANBH = low slope
elif (buildings['Area_m'] < 1034) & (buildings['ANBH'] >= 11):
buildings['Value'] == 46
buildings['Value'] = 46
# small building & low ANBH = high slope
elif (buildings['Area_m'] < 1034) & (buildings['ANBH'] < 11):
buildings['Value'] == 43
buildings['Value'] = 43
else:
buildings['Value'] = 40

# Residential ULU
# residential = high slope
elif (buildings['ULU'] == 2):
elif buildings['ULU'] == 2:
buildings['Value'] = 41

# Non-residential
elif (buildings['ULU'] == 1):
elif buildings['ULU'] == 1:
# small building & high ANBH = low slope
if (buildings['Area_m'] < 1034) & (buildings['ANBH'] >= 11):
buildings['Value'] = 45
# large building = low slope
elif (buildings['Area_m'] >= 1034):
elif buildings['Area_m'] >= 1034:
buildings['Value'] = 45
# small building & low ANBH = high slope
elif (buildings['Area_m'] < 1034) & (buildings['ANBH'] < 11):
Expand Down

0 comments on commit d157d9b

Please sign in to comment.