Closed JonMcPherson closed 4 years ago
Will give this a look soon. Thanks for the contribution!
Just as a follow-up, please update the changelog!
@jpolchlo oh right, it is done.
Great, thanks. I'll merge this into master, but I think according to semver, we're going to have to bump to 3.0 to release. We'll discuss on our end timing for that release, in case there are any other breaking changes that are warranted (i.e., it might not be right away).
Thanks for your work!
Overview
This PR changes the
Options
to be more general and accept anySeq[LayoutLevel]
for the desired zoom levels. The only constraints being that each level must define a unique zoom, and the tile layout for each level must be squaretileCols == tileRows
. This allows VectorPipe to be used for different layout schemes other than the power-of-2ZoomedLayoutScheme
. One example use case would be for generating tiles matching the power-of-20 OpenLocationCode grid (my use case 😄).The current
Options()
constructor was moved to a separateapply
method which generates thelayoutLevels
usingZoomedLayoutScheme
in the same way as before. So this change will probably not break any users BUT note that it will break for users that invoke thenew Options()
constructor directly rather than using the generatedapply
method (which is probably nobody?).Demo
I tested this for my use case using the code below which I did not include in this PR (in
PipelineSpec
) because it is NOT a good unit test and was only used to prove that VectorPipe can generate tiles for other layout schemes AND for any layout extent (not just worldExtent)However, this test does fail on only a couple tiles (out of hundreds) that were generated for the area extent but NOT the world extent. I am looking into exactly why this these tiles did not get generated when using the full worldExtent, but I figured the results looked good enough, and that it was probably something wrong with my code or something to do with rounding.
Testing Instructions
Existing unit tests aren't complete and don't assert anything, but they can still be run and the results manually inspected it seems.
Checklist
Closes #XXX