This process outlines the process for creating Cloud Optimised Geotiffs suitable for hosting in services such as AWS S3. COGs enables more efficient workflows use cases such as fast access from Functions as a Services (E.g AWS Lambda), or comsumption into client desktop GIS systems (e.g QGIS). For more details on COGs please see https://www.cogeo.org/in-depth.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
outdir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) | |
if not os.path.exists(outdir): | |
os.mkdir(outdir) | |
input_elevation = "dem.img" | |
gisbase = os.environ['GISBASE'] = "/usr/local/grass-7.0.0svn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rolling_window(array, window=(0,), asteps=None, wsteps=None, axes=None, toend=True): | |
"""Create a view of `array` which for every point gives the n-dimensional | |
neighbourhood of size window. New dimensions are added at the end of | |
`array` or after the corresponding original dimension. | |
Parameters | |
---------- | |
array : array_like | |
Array to which the rolling window is applied. | |
window : int or tuple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/data | |
/mosaic.gdb | |
/scratch.gdb |