-
Notifications
You must be signed in to change notification settings - Fork 46
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
rf_resample parameters #608
Labels
Comments
I guess it is a python question, then yes, it is two args function, see https://github.com/locationtech/rasterframes/blob/0.11.1/python/pyrasterframes/rasterfunctions.py#L1009-L1014: def rf_resample(tile_col: Column_type, scale_factor: Union[int, float, Column_type]) -> Column:
"""Resample tile to different size based on scalar factor or tile whose dimension to match
Scalar less than one will downsample tile; greater than one will upsample. Uses nearest-neighbor."""
if isinstance(scale_factor, (int, float)):
scale_factor = lit(scale_factor)
return _apply_column_function("rf_resample", tile_col, scale_factor) |
Definitely feels like it's never been exposed. You can try using Spark CQL though. |
So to upsampling or dowsampling is not possible using "average" in pyspark? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have rasterframes version 0.11.1. When I try to use the rf_resample function:
df.select(rf_resample("proj_raster.tile", 0.25, "max")),
I get the following error:
rf_resample() takes 2 positional arguments but 3 were given
This function is supposed to take three inputs right? Or am I missing something?
The text was updated successfully, but these errors were encountered: