diff --git a/inciweb_wildfires/__init__.py b/inciweb_wildfires/__init__.py index 334df60..839c01a 100644 --- a/inciweb_wildfires/__init__.py +++ b/inciweb_wildfires/__init__.py @@ -30,9 +30,8 @@ def get_data(t) -> FeatureCollection: # Loop through all the placemarks feature_list = [] for d in data: - print(d['type'], '/ type is ' + t, '/', d['type'] == str(t)) # Only type specified - if [d['type'] == str(t)]: + if d['type'] == t: # Reformat as GeoJSON x = convert_coords(d["long_deg"], d["long_min"], d["long_sec"]) y = convert_coords(d["lat_deg"], d["lat_min"], d["lat_sec"]) @@ -40,10 +39,10 @@ def get_data(t) -> FeatureCollection: x = -x p = Point((x, y)) f = Feature(geometry=p, properties=d) - print('yes to:', d['type']) # Add it to the list feature_list.append(f) - # print(feature_list) + else: + continue # Pass it out return FeatureCollection(feature_list) diff --git a/test.py b/test.py index 30faa67..53da022 100644 --- a/test.py +++ b/test.py @@ -6,6 +6,7 @@ class InciwebWildfiresUnitTest(unittest.TestCase): def test_inciweb(self): get_incidents() + get_prescribed_fires() if __name__ == "__main__":