From cfa316a44822f78e53ffc46df07ba4601c0de2f6 Mon Sep 17 00:00:00 2001 From: weiqi-tori Date: Thu, 22 Aug 2024 18:48:31 +0800 Subject: [PATCH] remove force data type and update classifier --- city_metrix/layers/smart_surface_lulc.py | 10 +++++----- .../building_classifier.pkl | Bin 4230 -> 4210 bytes .../building_classifier.py | 14 +++++++------- environment.yml | 2 +- setup.py | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/city_metrix/layers/smart_surface_lulc.py b/city_metrix/layers/smart_surface_lulc.py index 49b1814..a8ce378 100644 --- a/city_metrix/layers/smart_surface_lulc.py +++ b/city_metrix/layers/smart_surface_lulc.py @@ -34,12 +34,12 @@ def get_data(self, bbox): # Open space open_space_osm = OpenStreetMap(osm_class=OpenStreetMapClass.OPEN_SPACE_HEAT).get_data(bbox).to_crs(crs).reset_index() - open_space_osm['Value'] = np.uint16(10) + open_space_osm['Value'] = 10 # Water water_osm = OpenStreetMap(osm_class=OpenStreetMapClass.WATER).get_data(bbox).to_crs(crs).reset_index() - water_osm['Value'] = np.uint16(20) + water_osm['Value'] = 20 # Roads @@ -60,7 +60,7 @@ def get_data(self, bbox): roads_osm['lanes'] = roads_osm['lanes'].fillna(roads_osm['avg_lanes']) # Add value field (30) - roads_osm['Value'] = np.uint16(30) + roads_osm['Value'] = 30 # Buffer roads by lanes * 10 ft (3.048 m) # https://nacto.org/publication/urban-street-design-guide/street-design-elements/lane-width/#:~:text=wider%20lane%20widths.-,Lane%20widths%20of%2010%20feet%20are%20appropriate%20in%20urban%20areas,be%20used%20in%20each%20direction @@ -74,7 +74,7 @@ def get_data(self, bbox): ) else: # Add value field (30) - roads_osm['Value'] = np.uint16(30) + roads_osm['Value'] = 30 # Building @@ -113,7 +113,7 @@ def get_data(self, bbox): # Parking parking_osm = OpenStreetMap(osm_class=OpenStreetMapClass.PARKING).get_data(bbox).to_crs(crs).reset_index() - parking_osm['Value'] = np.uint16(50) + parking_osm['Value'] = 50 # combine features: open space, water, road, building, parking diff --git a/city_metrix/models/building_classifier/building_classifier.pkl b/city_metrix/models/building_classifier/building_classifier.pkl index d1cee21536816784fea32165dc4b3ed218713d25..4907a22ba948cc5a655b205333d351118a1c1b18 100644 GIT binary patch delta 300 zcmZou{G`Crz%n&`BZ~{ubb#;naed}56J+jDPk%f0=~ev*nO5M7#lkWYNG O2frmFtKpQ=Bs~DsrC!GX delta 258 zcmeyQ(5A@Jz%sRZBZ~{uZM z#gxvD_9;PAG`yKJ>?glt77vceNcZMwo01U=qy>O<97tUniaI|(Kd=8l04BT{N~R=v zO8`~IXXJS+0O_8>7>mOEGL-wnHb=p;eBW6W_|WTMr6ScQ|_#tyq-gH zatCL|=1.5.0", + "scikit-learn>=1.5.1", ], )