Skip to content

Instantly share code, notes, and snippets.

View sixy6e's full-sized avatar

Josh Sixsmith sixy6e

  • Geoscience Australia
View GitHub Profile
@sixy6e
sixy6e / subset_geobox.py
Last active August 29, 2015 14:10
reading an image subset and returning a geobox instead of separate geotransform and projection items
from GriddedGeoBox import GriddedGeoBox
from io import read_subset
import rasterio
fname = '/g/data/v10/eoancillarydata/Land_Sea_Rasters/WORLDzone56.tif'
ds = rasterio.open(fname)
gb = GriddedGeoBox.from_dataset(ds)
gb.origin
ds.get_transform()
q = read_subset(fname, gb.convert_coordinates((100,100)), gb.convert_coordinates((200,100)), gb.convert_coordinates((200,200)), gb.convert_coordinates((100,200)))
q[1]
@sixy6e
sixy6e / binary_segmentation_example.py
Last active August 29, 2015 14:15
segmentation examples
#!/usr/bin/env python
import numpy
from scipy import ndimage
from image_processing.segmentation.segmentation import SegmentVisitor
"""
This example looks at segmentation from the results of a binary threshold.
The pixel quality code in the ga-neo-landsat-processor repo is a production
example of this methodolgy.
@sixy6e
sixy6e / combine.py
Last active August 29, 2015 14:15
Water body characterization across time
#!/usr/bin/env python
import os
from os.path import join as pjoin, dirname, basename
import cPickle as pickle
import argparse
import numpy
import luigi
import pandas
@sixy6e
sixy6e / README.md
Last active August 29, 2015 14:16
Tiled time series

A demo of how to calculate the NDVI and compute statistics across the z-axis (time) in a tiled/chunking workflow.

@sixy6e
sixy6e / mock_workflow.py
Last active August 4, 2016 06:14
luigi mpi mock
#!/usr/bin/env python
import numpy
import luigi
import luigi.contrib.mpi as mpi
import cPickle as pickle
from os.path import exists
import time
from datetime import datetime
[work]
output_directory = /g/data/v10/testing_ground/jps547/sue-fyfe/results
logs_directory = %(output_directory)s/logs
satellites = LS5,LS7,LS8
min_date = 1985_01_01
max_date = 2015_12_31
vector_filename = /g/data/v10/testing_ground/jps547/sue-fyfe/LH_Nominated_EC_Saltmarsh.shp
[internals]
envelope = 0
@sixy6e
sixy6e / README.md
Last active August 29, 2015 14:22
bathymetry

A MATLAB translation of a function that reads OTPS GRID binary files.

@sixy6e
sixy6e / README.md
Last active August 29, 2015 14:23
baresoil_percentiles

A baresoils percentiles mosaicing workflow. Just to be used as a computational baseline.

@sixy6e
sixy6e / README.md
Last active December 6, 2015 11:18
KEA-format

KEA Image Format

A h5py interface to the KEA image format

@sixy6e
sixy6e / README.md
Created December 2, 2015 05:14
clouds

Cloud analysis

A draft analysis into clouds across Australia through time. Metrics include percent coverage, minimum, maximum, and average cloud size. Would be ideal if access to the thermal data was made available, then metrics on cloud heights could be calculated as well.

Spectral metrics can come later.