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

Add cell value scaling functions #449

Merged
merged 8 commits into from
Jan 30, 2020
Merged

Conversation

vpipkt
Copy link
Member

@vpipkt vpipkt commented Jan 14, 2020

Fix #218

Functions we would like to include here:

Initial commit is just some of the functions. Still a few more to go.

Signed-off-by: Jason T. Brown <jason@astraea.earth>
Signed-off-by: Jason T. Brown <jason@astraea.earth>
Signed-off-by: Jason T. Brown <jason@astraea.earth>
Signed-off-by: Jason T. Brown <jason@astraea.earth>
@vpipkt vpipkt marked this pull request as ready for review January 20, 2020 19:20
Signed-off-by: Jason T. Brown <jason@astraea.earth>
@vpipkt
Copy link
Member Author

vpipkt commented Jan 21, 2020

#443

…page

Signed-off-by: Jason T. Brown <jason@astraea.earth>
Copy link
Member

@metasim metasim left a comment

Choose a reason for hiding this comment

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

Wow!

Wow!

Wow!

💯

Change Clip to Clamp and let's get it out in the wild!

* min - scalar or tile setting the minimum value for each cell
* max - scalar or tile setting the maximum value for each cell"""
)
case class Clip(left: Expression, middle: Expression, right: Expression)
Copy link
Member

Choose a reason for hiding this comment

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

There's already precident for calling this kind of operation "clamp".
https://github.com/locationtech/rasterframes/search?q=clamp&unscoped_q=clamp

A clip in imagery usually implies trimming the pixel edges, where as a clamp is on the pixel values.
https://imagemagick.org/script/command-line-options.php#clamp

So my preference here (sorry) is to keep with that nomenclature.

}
}

describe("standardize and rescale") {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if these should go in the StatFunctionsSpec file....

@vpipkt vpipkt merged commit 4b32ec7 into locationtech:develop Jan 30, 2020
@vpipkt vpipkt deleted the feature/clip branch January 30, 2020 17:42
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.

Add rf_clip and rf_rescale and rf_normalize
2 participants