From fa3f3fd419bd2925562e00a1e08f900f1d54e3bc Mon Sep 17 00:00:00 2001 From: Hans Vanrompay Date: Thu, 14 Nov 2024 15:26:56 +0100 Subject: [PATCH] fix: bug --- src/openeo_gfmap/manager/job_splitters.py | 4 ++++ .../results/latlon_features_cdse.nc | Bin 53983 -> 53983 bytes .../results/patch_features_cdse.nc | Bin 50377 -> 50377 bytes .../results/s1_rescaled_features_cdse.nc | Bin 39262 -> 39262 bytes 4 files changed, 4 insertions(+) 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 db9ab6b92767571f449d46cbc7cbcb1bdc3afce5..71a9344547a9f852c146656556ae491e13d1b8e4 100644 GIT binary patch delta 27 jcmcb=l==Qr<_-0X%%*whj$aoO|mg5S2 diff --git a/tests/tests_integration/results/patch_features_cdse.nc b/tests/tests_integration/results/patch_features_cdse.nc index 6b61844e214982585235c6176c5770a86a1ae9dc..914dbf975a3e7a60dcc93f9bc3269540b3ac8ab1 100644 GIT binary patch delta 27 jcmX@v$$YYtc|$!Tv#FlJ