Skip to content

Instantly share code, notes, and snippets.

View omad's full-sized avatar

Damien Ayers omad

View GitHub Profile
@omad
omad / dea_product_definitions.yaml
Created February 15, 2018 23:51
DEA Product Definitions
description: Landsat 5 Fractional Cover 25 metre, 100km tile, Australian Albers Equal
Area projection (EPSG:3577)
managed: true
measurements:
- aliases: [bare]
dtype: int8
name: BS
nodata: -1
units: percent
- aliases: [green_veg]
@omad
omad / Grouping Datasets by Solar Day.ipynb
Created March 21, 2018 01:33
Grouping Datasets by Solar Day
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@omad
omad / spatio-temporal-access-catalogues.org
Last active May 15, 2018 22:35
SpatioTemporal Access Catalogues and the Open Data Cube

SpatioTemporal Access Catalogues and ODC

What is STAC?

The SpatioTemporal Asset Catalog specification is a simple specification being designed to make open geospatial assets searchable and crawlable. It aims to

@omad
omad / delete_odc_product_steps.sql
Created May 18, 2018 02:12
SQL for deleting a Data Cube Product.
------------------------------------------
-- Some SQL to Delete a Data Cube Product
------------------------------------------
--
-- COUNT NUMBER OF DATASETS OF EACH TYPE (including archived)
--
select
count(*),
t.name
@omad
omad / MODIS OC.ipynb
Last active September 11, 2018 00:38
MODIS Ocean Colour on DEA
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@omad
omad / README.md
Created September 14, 2018 01:22
MODIS Ocean Colour Available Through DEA Datacube

MODIS Ocean Colour Available Through DEA Datacube

@omad
omad / ODC Dataset Metadata Updates.md
Created November 8, 2018 00:04
ODC Dataset Metadata Updates

ODC Dataset Metadata Updates

Problems

  • Too many definitions of spatial extents
    • Including
  • Insufficient spatial metadata
    • Not enough information to define the pixel grid
    • Requires CRS + Affine transform + Shape (width, height)
  • Shape and Transform can be different per band
@omad
omad / delete_odc_product.sql
Last active March 17, 2021 17:22
Delete an Open Data Cube Product using RAW SQL
--------------------------------------
-- SQL to Delete a Data Cube Product
--------------------------------------
--
-- Use with psql from the command line:
--
-- psql -v product_name=<product-to-delete> -f delete_odc_product.sql -h <database-hostname> <dbname>
--
--
@omad
omad / axis.csv
Last active November 19, 2019 03:15
Axis table from Proj.6
EPSG 1039 Easting M east EPSG 1024 1 EPSG 9001
EPSG 1040 Northing P north EPSG 1024 2 EPSG 9001
EPSG 1062 Easting X North along 130°W EPSG 1025 1 EPSG 9001
EPSG 1063 Northing Y North along 140°E EPSG 1025 2 EPSG 9001
EPSG 1065 Easting E South along 90°E EPSG 1026 1 EPSG 9001
EPSG 1066 Northing N South along 180°E EPSG 1026 2 EPSG 9001
EPSG 1056 Easting E North along 90°E EPSG 1027 1 EPSG 9001
EPSG 1058 Northing N North along 0°E EPSG 1027 2 EPSG 9001
EPSG 1073 Easting E east EPSG 1028 1 EPSG 9037
EPSG 1074 Northing N north EPSG 1028 2 EPSG 9037
@omad
omad / odc_to_postgis.sql
Created February 6, 2020 22:55
Experiments in converting ODC Datasets to PostGIS Geometries
-- Experiments with PostgreSQL, connecting to a remote server.
CREATE EXTENSION postgres_fdw;
DROP SERVER IF EXISTS collection2;
CREATE SERVER collection2 FOREIGN DATA WRAPPER postgres_fdw OPTIONS (dbname 'datacube', host 'localhost');
DROP USER MAPPING IF EXISTS FOR CURRENT_USER SERVER collection2;
CREATE USER MAPPING FOR dra547 SERVER collection2 OPTIONS (user 'dra547', password 'xxxxx');