Skip to content

Instantly share code, notes, and snippets.

@jmettes
jmettes / gm_blue.vrt
Created November 25, 2025 01:41
gm mosaic vrts
<VRTDataset rasterXSize="140800" rasterYSize="131200">
<SRS dataAxisToSRSAxisMapping="1,2">PROJCS["GDA94 / Australian Albers",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",132],PARAMETER["standard_parallel_1",-18],PARAMETER["standard_parallel_2",-36],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","3577"]]</SRS>
<GeoTransform> -2.0160000000000000e+06, 3.0000000000000000e+01, 0.0000000000000000e+00, -9.6000000000000000e+05, 0.0000000000000000e+00, -3.0000000000000000e+01</GeoTransform>
<VRTRasterBand dataType="Int16" band="1">
<NoDataValue>-999</NoDat
@jmettes
jmettes / README.md
Last active November 24, 2025 05:21
generating a VRT from COG tiles

Usage

  1. grap the url for vrt in this gist
  2. open it in QGIS > Data Source Manager > Raster > Protocol: HTTP(S),cloud,etc. > URI
image

(Note: it's missing exactly 24 tiles because I was too lazy to paginate the STAC API just for this demo) image

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

lets download all stac files for a particular polarisation product

s5cmd cp s3://deant-data-public-dev/experimental/for_zhengshu/ga_s1_nrb_iw_hh_0/*/*/*/*/*stac-item.json .

let's use stac_geoparquet

>>> import stac_geoparquet
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmettes
jmettes / template.yml
Last active July 11, 2022 03:13
Basic usage of Argo WorkflowTemplates, with minimal duplication and boiler plate. The DAG is the only template, using inline sub-templates for tasks (instead of additional task templates), and a single global parameter passed by Workflow at top level (without having redefine the DAG structure to pass separate parameters)
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: workflow-template-submittable
spec:
entrypoint: dag
templates:
- name: dag
inputs:
parameters:
import cartopy.crs as ccrs
from mpl_toolkits.axes_grid1 import make_axes_locatable
proj = ccrs.PlateCarree()
fig, ax = plt.subplots(subplot_kw=dict(projection=proj), figsize=(10, 10))
s = ax.scatter(x['longitude'], x['latitude'], 10, x['iwv'])
gl = ax.gridlines(crs=proj, alpha=0.5, linestyle='--', draw_labels=True)
ax.coastlines(resolution='50m', color='black', linewidth=1)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmettes
jmettes / build-closure.sh
Last active June 4, 2021 06:09
NixOS ISO
nix-build --attr system "./nixos.nix" -o result-closure
readlink -f result-closure > closure-nix-store-path.txt
rm -r system
mkdir system
nix copy ./result-closure --to file://./system