You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "prantogg (via GitHub)" <gi...@apache.org> on 2026/05/16 00:59:30 UTC
[PR] feat: make rasterization orientation-agnostic by supporting positive scaleY [sedona]
prantogg opened a new pull request, #2961:
URL: https://github.com/apache/sedona/pull/2961
## Summary
Makes `RS_AsRaster` and related rasterization functions work correctly with bottom-up rasters (positive scaleY), which are common in formats like BMP and certain GeoTIFF configurations.
### Changes
- **Rasterization.java**: Detect bottom-up orientation via `RasterizationParams.bottomUp` flag; flip rasterized pixels vertically after rasterization so output matches the requested grid orientation. Updated scanline Y calculations to use helper methods.
- **RasterUtils.java**: Added `getRasterUpperLeftY`, `getRasterScaleY`, `flipVerticallyPixelSpace`, and `flipVerticallyGridSpace` utility methods.
- **RS_AsRaster.md**: Removed the `ScaleY must be negative` restriction from documentation.
- **Tests**: Added bottom-up rasterization tests across `RasterizationTests`, `RasterBandAccessorsTest`, `RasterBandEditorsTest`, `RasterConstructorsTest`, and `RasterUtilsTest`.
### Approach
When a raster has positive scaleY (bottom-up), the rasterization pipeline normalizes it to top-down internally (negating scaleY, adjusting upperLeftY), performs rasterization as usual, then flips the result back to match the original bottom-up orientation. This keeps the core rasterization logic unchanged while transparently supporting both orientations.
--
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] [SEDONA-754] feat: make rasterization orientation-agnostic by supporting positive scaleY [sedona]
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu merged PR #2961:
URL: https://github.com/apache/sedona/pull/2961
--
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