cat-cfs / gcbm_preprocessing

0 stars 2 forks source link

Switch to CompressingTiler2D in mojadata/tiler library #35

Closed B-Ron12 closed 6 years ago

B-Ron12 commented 7 years ago

From Max: better to switch over to CompressingTiler2D in the mojadata/tiler library for new projects, but that's a way to deal with old layers without having to re-tile

B-Ron12 commented 7 years ago

This was something I forgot to mention in the call. should be an easy change in the tiler... allows us to read and write compressed tiled and GCBM output so it should minimize the size of spatial output - should have before we go to the cloud I think

mfellows commented 7 years ago

For this, it's literally just changing: from tiler2d import Tiler2D tiler = Tiler2D(bbox)

to: from compressingtiler2d import CompressingTiler2D tiler = CompressingTiler2D(bbox)

once you've pulled the latest tiler from https://github.com/SLEEK-TOOLS/moja.data - if you don't have access, it's also in here: M:\Spatially_explicit\01_Projects\17_BC_ON_1ha\03_tools\mojadata

The only thing that might take some work is if your scripts need to modify the layer's JSON file - you'll need to extract it from the zip and replace it when you're done now (see Python's built-in zipfile library).

Optional thing: Provider config is the same as if you were using the old-style layers - to save space on M:, you could run M:\Spatially_explicit\03_Tools\Compressed_layer_converter on any old runs or runs that are currently in progress without having to change any project config files.

naddison1 commented 6 years ago

https://github.com/cat-miti/gcbm_preprocessing/commit/c191a0bb710cd332a7e49ab43bde528f7469c7e8