james-willis commented on code in PR #3114:
URL: https://github.com/apache/sedona/pull/3114#discussion_r3633597952


##########
common/src/main/java/org/apache/sedona/common/raster/Rasterization.java:
##########
@@ -85,6 +99,23 @@ protected static List<Object> rasterize(
     return objects;
   }
 
+  /**
+   * Fills every pixel of the freshly-allocated raster with the background 
value, so pixels never
+   * covered by the geometry read back as that value instead of the allocation 
default of 0. A null
+   * or zero background keeps the zero-initialized allocation as-is.
+   */
+  private static void fillBackground(WritableRaster writableRaster, Double 
backgroundValue) {
+    if (backgroundValue == null || backgroundValue == 0) {
+      return;
+    }
+    int width = writableRaster.getWidth();
+    double[] row = new double[width];
+    Arrays.fill(row, backgroundValue);

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to