Repository navigation
Changed ZoomedLayoutScheme zooming functions - #2029
Conversation
d2a4c1d to
f5821d4
Compare
| def zoomOut(level: LayoutLevel) = { | ||
| val layout = level.layout | ||
| val newZoom = level.zoom - 1 | ||
| val newSize = math.pow(2, newZoom).toInt |
There was a problem hiding this comment.
Does this change allow to correctly pyramid a floating layer into a zoomed layout scheme? I think so, but there should be a small unit test for that.
If all of that works out fine I'm not sure there is any reason to change FloatingLayoutScheme as its primary purpose it to produce a layer with cell width matching the source rasters.
There was a problem hiding this comment.
@echeipesh what do you mean by that? as floating layout scheme has no gotcha.def levelFor(extent: Extent, cellSize: CellSize) function, I am not sure how to identify max zoom level for the floating layout scheme
There was a problem hiding this comment.
For zoomed layout scheme i think we can create a new, called SquareZoomedLayoutScheme, and the old one would still be called ZoomedLayoutScheme, +that would mean a good unit test for it :)
There was a problem hiding this comment.
Not sure we need to keep the /2 *2 functionality, that was just poor implementation I think. The way this scheme is intended to be used is with square, power of two, layouts. The fact that it may work under some conditions for non-power of two is incidental and would not have produce a usably correct result if it completed. We're just fixing and testing an implementation here right now.
f5821d4 to
ba21410
Compare
Signed-off-by: Grigory Pomadchin <[email protected]>
ba21410 to
425aafb
Compare
Signed-off-by: Grigory Pomadchin <[email protected]>
71e84ab to
01b4cd3
Compare
…/pyramid-improvements Signed-off-by: Grigory Pomadchin <[email protected]>
Signed-off-by: Grigory Pomadchin <[email protected]>
Signed-off-by: Grigory Pomadchin <[email protected]>
7063e2a to
193e795
Compare
| val layoutScheme = ZoomedLayoutScheme(LatLng, 2) | ||
|
|
||
| val LayoutLevel(_, layout) = FloatingLayoutScheme(512).levelFor(LatLng.worldExtent, CellSize(0.5, 0.5)) | ||
| val LayoutLevel(zoom, _) = layoutScheme.levelForZoom(LatLng.worldExtent, 2) |
There was a problem hiding this comment.
Whats the point of this line ? ZoomedLayoutScheme.levelForZoom will always just give you the same zoomed you asked for, its the layout that is the real output of this function.
b017176 to
78ee2eb
Compare
Signed-off-by: Grigory Pomadchin <[email protected]>
78ee2eb to
ab27b07
Compare
Closes #2021