Skip to content

Commit

Permalink
if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
vnessamartinez committed Apr 17, 2024
1 parent bf7310d commit 1d7659b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions inciweb_wildfires/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ def get_incidents() -> FeatureCollection:
# Loop through all the placemarks
feature_list = []
for d in data:
# 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)

# Add it to the list
feature_list.append(f)
# Do not include "Prescribed Fire" types
if (d['type'] != 'Prescribed Fire'):
# 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)

# Add it to the list
feature_list.append(f)

# Pass it out
return FeatureCollection(feature_list)
Expand Down

0 comments on commit 1d7659b

Please sign in to comment.