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 hidden or 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
#!/bin/bash | |
FILE_IN= | |
file_name=$( basename $FILE_IN | sed 's/.tif//' ) | |
output_dir= | |
div | |
function gdal_extent_gdalwarp_te() { |

This file contains hidden or 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
wget https://files.pythonhosted.org/packages/dc/d5/90339b48bdcabc76124eaa058a32d796963a05624eb418ed5ea5af7db9fa/GDAL-2.4.2.tar.gz | |
tar -xpf GDAL-2.4.2.tar.gz | |
cd GDAL-2.4.2 | |
python setup.py build_ext -I/Library/Frameworks/GDAL.framework/Versions/2.4/Headers -L/Library/Frameworks/GDAL.framework/Versions/2.4/unix/lib --gdal-config /Library/Frameworks/GDAL.framework/Versions/2.4/unix/bin/gdal-config | |
python setup.py build | |
python setup.py install |
This file contains hidden or 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
#!/bin/bash | |
# Quick script to download LDS data and prepare it for loading into | |
# a POSTGIS Database | |
endpoint="https://data.linz.govt.nz/services/api/v1/exports/" | |
download_file="nz-data.zip" | |
poll_interval=10 | |
if [ -z "$LDS_API_KEY" ] |
This file contains hidden or 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
#!/bin/bash | |
set -Eeuo pipefail | |
BLOCKSIZE=256 | |
OVERVIEW_BLOCKSIZE=256 | |
MIN_OVERVIEW_SIZE=256 | |
KEEP_TEMP=0 | |
MOSAIC_VRT="mosaic.vrt" | |
MOSAIC_RGB_VRT="mosaicrgb.vrt" |
This file contains hidden or 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
GNM: GNMRegisterAllInternal | |
GNM: RegisterGNMFile | |
GNM: RegisterGNMdatabase | |
CSW: http://geodata.govt.nz/geonetwork/srv/eng/csw?SERVICE=CSW&REQUEST=GetCapabilities | |
HTTP: Fetch(http://geodata.govt.nz/geonetwork/srv/eng/csw?SERVICE=CSW&REQUEST=GetCapabilities) | |
HTTP: libcurl/7.54.0 LibreSSL/2.6.4 zlib/1.2.11 nghttp2/1.24.1 | |
HTTP: GDAL was built against curl 7.43.0, but is running against 7.54.0. | |
GDAL: GDALOpen(CSW:http://geodata.govt.nz/geonetwork/srv/eng/csw, this=0x7fc8c7500d40) succeeds as CSW. | |
GDAL: QuietDelete(geodata.govt.nz.csv) invoking Delete() | |
GDAL: GDALDriver::Create(CSV,geodata.govt.nz.csv,0,0,0,Unknown,0x0) |
This file contains hidden or 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
2018-10-10 16:45:50 +1300 | |
make | |
(cd port; /Applications/Xcode.app/Contents/Developer/usr/bin/make) | |
(cd gcore; /Applications/Xcode.app/Contents/Developer/usr/bin/make generate_gdal_version_h) | |
rm -f gdal.pc | |
echo 'CONFIG_VERSION='`cat ./VERSION`'' >> gdal.pc | |
/bin/sh /private/tmp/gdal-20181010-68482-1e3e6pj/gdal-2.3.1/libtool --mode=compile --silent --tag=CXX clang++ -std=c++11 -I/private/tmp/gdal-20181010-68482-1e3e6pj/gdal-2.3.1/port -I/private/tmp/gdal-20181010-68482-1e3e6pj/gdal-2.3.1/gcore -I/private/tmp/gdal-20181010-68482-1e3e6pj/gdal-2.3.1/alg -I/private/tmp/gdal-20181010-68482-1e3e6pj/gdal-2.3.1/ogr -I/private/tmp/gdal-20181010-68482-1e3e6pj/gdal-2.3.1/ogr/ogrsf_frmts -I/private/tmp/gdal-20181010-68482-1e3e6pj/gdal-2.3.1/gnm -I/private/tmp/gdal-20181010-68482-1e3e6pj/gdal-2.3.1/apps -Wold-style-cast -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2 -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wshorten-64-to |
