Skip to content

[SEDONA-754] feat: make rasterization orientation-agnostic by supporting positive scaleY#2961

Open
prantogg wants to merge 1 commit into
apache:masterfrom
prantogg:pranav/feature/rasterization-positive-scaley
Open

[SEDONA-754] feat: make rasterization orientation-agnostic by supporting positive scaleY#2961
prantogg wants to merge 1 commit into
apache:masterfrom
prantogg:pranav/feature/rasterization-positive-scaley

Conversation

@prantogg
Copy link
Copy Markdown
Contributor

@prantogg prantogg commented May 16, 2026

Did you read the Contributor Guide?

Is this PR related to a ticket?

  • Yes, and the PR name follows the format [SEDONA-XXX] my subject.

What changes were proposed in this PR?

Rasterization assumes top-down orientation (negative scaleY) and throws an error for positive scaleY values. Bottom-up rasters (positive scaleY) are common in formats like BMP and certain GeoTIFF configurations.

This PR makes rasterization orientation-agnostic by:

  • Detecting bottom-up rasters (positive scaleY) and flipping the grid space internally during rasterization
  • Flipping the result back after rasterization so the output matches the requested orientation
  • Adding flipVerticallyGridSpace helper to RasterUtils
  • Removing the scaleY > 0 restriction from RS_AsRaster documentation

How was this patch tested?

  • Added tests for positive scaleY rasterization
  • Passes all existing rasterization tests (RS_ZonalStats, RS_SetValues, RS_Clip)

Did this PR include necessary documentation updates?

  • Yes, removed the restriction note about positive scaleY from the RS_AsRaster documentation.

@prantogg prantogg changed the title feat: make rasterization orientation-agnostic by supporting positive scaleY [SEDONA-754] feat: make rasterization orientation-agnostic by supporting positive scaleY May 16, 2026
@prantogg prantogg force-pushed the pranav/feature/rasterization-positive-scaley branch from e1a7e0e to 0277015 Compare May 16, 2026 01:33
@prantogg prantogg force-pushed the pranav/feature/rasterization-positive-scaley branch from 0277015 to a616b0f Compare May 16, 2026 02:07
@prantogg prantogg marked this pull request as ready for review May 16, 2026 02:22
@prantogg prantogg requested a review from jiayuasu as a code owner May 16, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant