Skip to content

Commit

Permalink
save jsons with geojson ext
Browse files Browse the repository at this point in the history
  • Loading branch information
kaczmarj committed Feb 22, 2024
1 parent a371d27 commit c974d1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wsinfer/write_geojson.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def make_geojson(csv: Path, results_dir: Path) -> None:
if not prob_cols:
raise KeyError("Did not find any columns with prob_ prefix.")
geojson = _dataframe_to_geojson(df, prob_cols)
with open(results_dir / "model-outputs-geojson" / f"{filename}.json", "w") as f:
with open(results_dir / "model-outputs-geojson" / f"{filename}.geojson", "w") as f:
json.dump(geojson, f)


Expand All @@ -95,7 +95,7 @@ def write_geojsons(csvs: list[Path], results_dir: Path, num_workers: int) -> Non
"that contains model-outputs, masks, and patches."
)
if output.exists():
geojsons = list((results_dir / "model-outputs-geojson").glob("*.json"))
geojsons = list((results_dir / "model-outputs-geojson").glob("*.geojson"))

# Makes a list of filenames for both geojsons and csvs
geojson_filenames = [filename.stem for filename in geojsons]
Expand Down

0 comments on commit c974d1b

Please sign in to comment.