diff --git a/src/openeo_gfmap/manager/job_splitters.py b/src/openeo_gfmap/manager/job_splitters.py index da2ff90..400b932 100644 --- a/src/openeo_gfmap/manager/job_splitters.py +++ b/src/openeo_gfmap/manager/job_splitters.py @@ -107,6 +107,8 @@ def append_h3_index( """Append the H3 index to the polygons.""" # Project to Web mercator to calculate centroids + original_crs = polygons.crs + polygons = polygons.to_crs(epsg=3857) geom_col = polygons.geometry.centroid # Project to lat lon to calculate the h3 index @@ -115,6 +117,8 @@ def append_h3_index( polygons["h3index"] = geom_col.apply( lambda pt: h3.latlng_to_cell(pt.y, pt.x, grid_resolution) ) + polygons.to_crs(original_crs) + return polygons diff --git a/tests/tests_integration/results/latlon_features_cdse.nc b/tests/tests_integration/results/latlon_features_cdse.nc index db9ab6b..71a9344 100644 Binary files a/tests/tests_integration/results/latlon_features_cdse.nc and b/tests/tests_integration/results/latlon_features_cdse.nc differ diff --git a/tests/tests_integration/results/patch_features_cdse.nc b/tests/tests_integration/results/patch_features_cdse.nc index 6b61844..914dbf9 100644 Binary files a/tests/tests_integration/results/patch_features_cdse.nc and b/tests/tests_integration/results/patch_features_cdse.nc differ diff --git a/tests/tests_integration/results/s1_rescaled_features_cdse.nc b/tests/tests_integration/results/s1_rescaled_features_cdse.nc index 50877a2..cd80d90 100644 Binary files a/tests/tests_integration/results/s1_rescaled_features_cdse.nc and b/tests/tests_integration/results/s1_rescaled_features_cdse.nc differ