From ed7d1e2cd7119110b90cb95f3285f7282d611289 Mon Sep 17 00:00:00 2001 From: Furqaanahmed Khan Date: Mon, 18 Sep 2023 11:10:59 -0400 Subject: [PATCH] fix: looping variables --- .../org/apache/sedona/common/raster/PixelFunctionEditors.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/org/apache/sedona/common/raster/PixelFunctionEditors.java b/common/src/main/java/org/apache/sedona/common/raster/PixelFunctionEditors.java index f2f5284ec4..043fbdaed8 100644 --- a/common/src/main/java/org/apache/sedona/common/raster/PixelFunctionEditors.java +++ b/common/src/main/java/org/apache/sedona/common/raster/PixelFunctionEditors.java @@ -146,8 +146,8 @@ public static GridCoverage2D setValues(GridCoverage2D raster, int band, Geometry int x = pixelLocation.x, y = pixelLocation.y; // i & j is for main raster // k & l is for rasterized geom - for (int j = x, l = 0; j < height + x; j++, l++) { - for (int i = y, k = 0; i < width + y; i++, k++) { + for (int j = y, l = 0; j < height + y; j++, l++) { + for (int i = x, k = 0; i < width + x; i++, k++) { double[] pixel = rasterCopied.getPixel(i, j, (double[]) null); // [0] as only one band in the rasterized Geometry double pixelNew = rasterizedGeomData.getPixel(k, l, (double[]) null)[0];