You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "jiayuasu (via GitHub)" <gi...@apache.org> on 2026/09/10 07:40:43 UTC
[PR] [GH-1776] Report oversized raster values with tiling guidance [sedona]
jiayuasu opened a new pull request, #3343:
URL: https://github.com/apache/sedona/pull/3343
## Did you read the Contributor Guide?
Yes, I have read the [Contributor Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor Development Guide](https://sedona.apache.org/latest/community/develop/).
## Is this PR related to a ticket?
Refs #1776.
## What changes were proposed in this PR?
Serializing an oversized raster can fail with an unhelpful exception in Kryo's `Unsafe.copyMemory`. Check the required output size before copying pixel banks and report the required bytes, the limit, and how to produce smaller tiles with the raster reader or `RS_TileExplode`.
The check uses the actual backing array lengths and accounts for existing output and bank headers. It covers all supported pixel types and preserves the existing path for stream-backed outputs. Regression tests cover oversized banks, size accounting, and small child rasters backed by large parent images.
This is a diagnostic improvement. The roughly 2 GiB limit and serialization format remain unchanged. It does not address the separate TIFF metadata `EOFException` reported later in the issue.
## How was this patch tested?
With Java 11, 42 targeted serialization tests passed, including three new regression tests:
```bash
mvn -B -pl common -am \
-Dtest=DataBufferSerializerTest,SampleModelSerializerTest,CRSSerializerTest,KryoUtilTest,SerdeTest \
-Dsurefire.failIfNoSpecifiedTests=false verify
```
The two oversized-buffer tests failed against the original implementation and passed with the new diagnostic. Maven verification, Spotless, and all applicable pre-commit checks passed.
For a Spark runtime check, used Spark 3.5.0, Java 17.0.13, released Sedona 1.9.1, and geotools-wrapper 1.9.1-33.5, replacing only the candidate serializer class. The [representative WRI raster used in the issue reproduction](https://github.com/apache/sedona/issues/1776#issuecomment-5607231386) now reports **3,732,481,104 required bytes versus 2,147,483,639 allowed**. Nested tiling and raster-reader tiling returned five sampled tiles each, including non-NoData pixels in the reader sample. Metadata-only access returned the correct full dimensions.
The Spark check used a patched release jar, not a full current-master Spark build. Tiling validation sampled output; it did not scan every tile.
## Did this PR include necessary documentation updates?
Yes. Added the single-raster size limit and explicit tiling examples to `RS_FromGeoTiff` and `RS_TileExplode`, including the need to decode TIFF bytes and tile before materializing the whole raster.
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GH-1776] Report oversized raster values with tiling guidance [sedona]
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu merged PR #3343:
URL: https://github.com/apache/sedona/pull/3343
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org