Skip to content

Commit 1d7659b

Browse files
if statement
1 parent bf7310d commit 1d7659b

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

inciweb_wildfires/__init__.py

+12-10
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,18 @@ def get_incidents() -> FeatureCollection:
2828
# Loop through all the placemarks
2929
feature_list = []
3030
for d in data:
31-
# Reformat as GeoJSON
32-
x = convert_coords(d["long_deg"], d["long_min"], d["long_sec"])
33-
y = convert_coords(d["lat_deg"], d["lat_min"], d["lat_sec"])
34-
if x > 0:
35-
x = -x
36-
p = Point((x, y))
37-
f = Feature(geometry=p, properties=d)
38-
39-
# Add it to the list
40-
feature_list.append(f)
31+
# Do not include "Prescribed Fire" types
32+
if (d['type'] != 'Prescribed Fire'):
33+
# Reformat as GeoJSON
34+
x = convert_coords(d["long_deg"], d["long_min"], d["long_sec"])
35+
y = convert_coords(d["lat_deg"], d["lat_min"], d["lat_sec"])
36+
if x > 0:
37+
x = -x
38+
p = Point((x, y))
39+
f = Feature(geometry=p, properties=d)
40+
41+
# Add it to the list
42+
feature_list.append(f)
4143

4244
# Pass it out
4345
return FeatureCollection(feature_list)

0 commit comments

Comments
 (0)