-
Notifications
You must be signed in to change notification settings - Fork 361
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 split by cols/rows to SplitMethods #1538
Conversation
@@ -64,7 +64,7 @@ case class Raster[+T <: CellGrid](tile: T, extent: Extent) extends Product2[T, E | |||
|
|||
def cols: Int = tile.cols | |||
def rows: Int = tile.rows | |||
def dimensions: (Int, Int) = tile.dimensions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why get rid of dimensions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You get those from CellGrid
, no need to overwrite here.
@lossyrob: I thought about your comments on |
new GridExtent(extent, cellSize.width, cellSize.height) | ||
|
||
def apply(extent: Extent, cellwidth: Double, cellheight: Double): GridExtent = | ||
new GridExtent(extent, cellwidth, cellheight) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We lose an unapply here by taking away it's case classy-ness. Also proper equality. I get that you want no case class for inheritance - we should provide that functionality ourselves.
Not super psyched about changing the API after the "API freezing" 0.10 release, but this is a small change and a good change, and a good one to rip the scratch the new floors with. +1 after the case class functionality reimplementation. |
This PR adds
split(cols: Int, rows: Int)
overload to split methods. Existing methods required an input ofTileLayout
. In order to be able to perform this operation we impose the restriction thatSplitMethods
must operate onGrid
types.Grid
type is new, it is super-class ofCellGrid
. Specifically we want to be able to splitRasterExtent
which does not have an associatedCellTypes
.Now that type
Grid
exists there is an outstanding question of what interfaces should be loosened fromCellGrid
toGrid
. This PR does not answer that question.