From d157d9bd8bc2fa550e367ba39898f27b23e59a8a Mon Sep 17 00:00:00 2001 From: weiqi-tori Date: Thu, 19 Sep 2024 14:45:48 +0800 Subject: [PATCH] fix '==' bug --- city_metrix/layers/smart_surface_lulc.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/city_metrix/layers/smart_surface_lulc.py b/city_metrix/layers/smart_surface_lulc.py index 56ca8a9..fc5c2ef 100644 --- a/city_metrix/layers/smart_surface_lulc.py +++ b/city_metrix/layers/smart_surface_lulc.py @@ -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):