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


##########
common/src/main/java/org/apache/sedona/common/raster/RasterOutputs.java:
##########
@@ -62,6 +63,19 @@ public static byte[] asGeoTiff(
       throw new RuntimeException(e);
     }
     ParameterValueGroup defaultParams = 
writer.getFormat().getWriteParameters();
+    // Without this, GeoTiffWriter writes a default GDAL_NODATA of 0 for 
coverages that
+    // have no no-data value, so a cleared (or never set) no-data value comes 
back as 0
+    // when the written bytes are read again.
+    boolean hasNoDataValue = false;
+    for (int band = 1; band <= raster.getNumSampleDimensions(); band++) {

Review Comment:
   AFAICT theres no standard for heterogenous no data values in Tiffs. We 
should just reject this state in `RS_AsGeoTiff`. But this is all out of scope 
for this PR; you can file a separate issue if you'd like



-- 
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