Skip to content

Instantly share code, notes, and snippets.

View mdsumner's full-sized avatar

Michael Sumner mdsumner

  • Integrated Digital East Antarctica, Australian Antarctic Division
  • Hobart, Australia
View GitHub Profile
@mdsumner
mdsumner / prompt.md
Last active November 28, 2025 02:35

I want to see how much geospatial solution for a project we can get just by me asking about it, I will use R as the foundation for code.

I want to create a series of grids in (relevant) UTM zones for the terrestrial Australian Antarctic Territory, this consists of the entire Antarctic continent betwen 44E longitude, and 160Elongitude and offshore islands (Macquarie and Heard and McDonald islands at least). The latitudinal range then is at least 70S latitude to 50S (I'm not concerned for now for regions further south as that has implications for using UTM vs something like polar stereographic, I'll keep that as a todo/explore - it might be MGRS).

Because we start with UTM that means each zone is consistent within itself, but there will be some overlap/duplication at zone edges. I won't be rendering every theoretical tile, because only terrestrial (for now). There will be two levels of detail, one targeting pixels at 60m resolution, and one at 10m resolution. The idea is that any "scene" that I rende

sentinel_palette <- function() {
  as.data.frame(list(value = 0:11, class = c("No Data (Missing data)", "Saturated or defective pixel", 
                                                   "Topographic casted shadows (called Dark features/Shadows for data before 2022-01-25)", 
                                                   "Cloud shadows", "Vegetation", "Not-vegetated", "Water", "Unclassified", 
                                                   "Cloud medium probability", "Cloud high probability", "Thin cirrus", 
                                                   "Snow or ice"), col = c("#000000", "#ff0000", "#2f2f2f", "#643200", 
                                                                           "#00a000", "#ffe65a", "#0000ff", "#808080", "#c0c0c0", "#ffffff", 
@mdsumner
mdsumner / epoch.md
Last active November 13, 2025 01:02

https://gdal.org/en/stable/user/coordinate_epoch.html

ogrinfo /vsicurl/https://github.com/OSGeo/gdal/raw/refs/heads/master/autotest/ogr/data/flatgeobuf/test_ogr_flatgeobuf_coordinate_epoch.fgb foo -so
INFO: Open of `/vsicurl/https://github.com/OSGeo/gdal/raw/refs/heads/master/autotest/ogr/data/flatgeobuf/test_ogr_flatgeobuf_coordinate_epoch.fgb'
      using driver `FlatGeobuf' successful.
remotes::install_github("mdsumner/nuyina.underway")

library(nuyina.underway)
d <- nuyina_underway() ## every time this runs it is up to date
range(d$datetime)
#[1] "2021-12-23 05:00:00 UTC" "2025-11-11 23:42:00 UTC"
library(shiny)
library(shinyglide)
ui <- fluidPage(
glide(
screen(
h2("Image 1"),
img(src = "image1.png", width = "100%")
),
screen(

this appears to be working (on setonix I just had to uv venv .venv and install virtual-tiff and it runs)

import obstore
from virtualizarr.registry import ObjectStoreRegistry
from virtual_tiff import VirtualTIFF
import xarray as xr

# Configuration
endpoint = "https://projects.pawsey.org.au/"