Repository navigation
Add split by cols/rows to SplitMethods - #1538
Conversation
|
|
||
| def cols: Int = tile.cols | ||
| def rows: Int = tile.rows | ||
| def dimensions: (Int, Int) = tile.dimensions |
There was a problem hiding this comment.
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.
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 thatSplitMethodsmust operate onGridtypes.Gridtype is new, it is super-class ofCellGrid. Specifically we want to be able to splitRasterExtentwhich does not have an associatedCellTypes.Now that type
Gridexists there is an outstanding question of what interfaces should be loosened fromCellGridtoGrid. This PR does not answer that question.