Skip to content

Commit

Permalink
fix(bbox): remove the bbox in predictions
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Nov 26, 2024
1 parent 7e151b3 commit 73ac1cd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions predictor/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ def predict(
prediction_geojson_data = json.load(f)
if remove_metadata:
shutil.rmtree(base_path)

if (
"features" in prediction_geojson_data
and len(prediction_geojson_data["features"]) > 0
):
prediction_geojson_data["features"].pop(
-1
) # Remove the last feature explicitly for the removal of whole bbox

for feature in prediction_geojson_data["features"]:
feature["properties"]["building"] = "yes"
feature["properties"]["source"] = "fAIr"
Expand Down

0 comments on commit 73ac1cd

Please sign in to comment.