iGN5117 commented on code in PR #972:
URL: https://github.com/apache/sedona/pull/972#discussion_r1294839294
##########
common/src/test/java/org/apache/sedona/common/raster/FunctionsTest.java:
##########
@@ -76,6 +77,14 @@ public void valueWithMultibandRaster() throws
TransformException {
assertEquals(255d, PixelFunctions.value(multiBandRaster,
point(4.5d,4.5d), 4), 0.1d);
}
+ @Test
+ public void testPixelAsPolygon() throws FactoryException,
TransformException {
+ GridCoverage2D emptyRaster = RasterConstructors.makeEmptyRaster(1, 5,
10, 123, -230, 8);
Review Comment:
Please add tests testing skewed rasters as well. Make sure you cross check
results using PostGIS
##########
docs/api/sql/Raster-operators.md:
##########
@@ -32,6 +32,26 @@ Output:
IndexOutOfBoundsException: Specified pixel coordinates (6, 2) do not lie in
the raster
```
+### RS_PixelAsPolygon
+
+Introduction: Returns a polygon geometry that bounds the specified pixel.The
pixel coordinates specified are 1-indexed.
+
Review Comment:
This documentation needs to be updated to reflect that even if colX and rowY
are out of bounds for the raster, they are interpolated assuming the same skew
and translate values
--
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]