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:

  • local min
  • local max
  • local clip
  • rescale (now much more compelling with #429 merged)
  • standardize
  • ifcell?

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

vpipkt added 4 commits Jan 14, 2020
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 Jan 20, 2020
Signed-off-by: Jason T. Brown <jason@astraea.earth>
@vpipkt
Copy link
Member Author

@vpipkt vpipkt commented Jan 21, 2020

#443

…page

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

@metasim metasim left a comment

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

@metasim metasim Jan 27, 2020

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

@metasim metasim Jan 27, 2020

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
2 checks passed
@vpipkt vpipkt deleted the feature/clip branch Jan 30, 2020
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.

2 participants