Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SEDONA-516] Add RS_Interpolate #1282

Merged
merged 11 commits into from
Mar 23, 2024
Merged

Conversation

prantogg
Copy link
Contributor

@prantogg prantogg commented Mar 21, 2024

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

What changes were proposed in this PR?

Introduces RS_Interpolate. Key features include:

  • This raster operator performs interpolation on a raster using the Inverse Distance Weighted (IDW) method. This method estimates cell values by averaging the values of sample data points in the vicinity of each processing cell.
  • The influence of a sample point on the interpolated value is inversely proportional to the distance from the cell being estimated, with nearer points having more influence or weight in the averaging process.
  • This technique is effective in scenarios where continuity of spatial data is important, and it is essential to estimate values for locations that do not have direct measurements, often represented by NaN or noDataValue in raster data.
  • Supports 2 modes, "Variable" and "Fixed" mode:
    • "Variable" mode adjusts the search radius to incorporate a specified number of nearest points within a set maximum distance.
    • "Fixed" mode uses a constant radius, expanding as necessary to meet a minimum point threshold.

heatmap_Interpolate
heatmap_Interpolate2

How was this patch tested?

  • Passes new tests

Did this PR include necessary documentation updates?

values[177] = 14; values[182] = 10; values[189] = 15; values[201] = 30; values[215] = 23; values[219] = 12; values[224] = 30;
values2[1] = 37; values2[7] = 20; values2[110] = 22; values2[133] = 34; values2[215] = 23; values2[219] = 12;

GridCoverage2D raster = RasterConstructors.makeEmptyRaster(1, 15, 15, 0, 0, 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test that use a multi-band raster with non-equal width and height.

@jiayuasu jiayuasu merged commit a683263 into apache:master Mar 23, 2024
37 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants