From e5417606b35a5b29beee6a317eb1031305d70ee2 Mon Sep 17 00:00:00 2001 From: Erick Pound Date: Mon, 25 Apr 2022 10:54:26 -0400 Subject: [PATCH] add geojson output --- handler.py | 4 ++++ tests/test_integration.py | 1 + 2 files changed, 5 insertions(+) diff --git a/handler.py b/handler.py index 7112b2f..db0976f 100644 --- a/handler.py +++ b/handler.py @@ -614,6 +614,10 @@ def main(): features.write_output(aoi, vector_out, 'aoi') features.write_output(centroids, vector_out, 'centroids') + # create geojson + json_out = Path(args.output_directory).joinpath('vector') / 'damage.geojson' + polygons.to_file(json_out, driver='GeoJSON') + if agol_push: try: to_agol.agol_helper(args, polygons, aoi, centroids) diff --git a/tests/test_integration.py b/tests/test_integration.py index a6ec14e..0b18af4 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -185,6 +185,7 @@ class TestIntegration: ('mosaics/damage.tif'), ('mosaics/overlay.tif'), ('vector/damage.gpkg'), + ('vector/damage.geojson'), ('log/xv2.log') ]) def test_is_files(self, setup, output_path, file):