Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vnessamartinez committed May 2, 2024
1 parent 794ea82 commit 9bb1ba2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions inciweb_wildfires/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,19 @@ 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"])
if x > 0:
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)

Expand Down
1 change: 1 addition & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
class InciwebWildfiresUnitTest(unittest.TestCase):
def test_inciweb(self):
get_incidents()
get_prescribed_fires()


if __name__ == "__main__":
Expand Down

0 comments on commit 9bb1ba2

Please sign in to comment.