Skip to content

Instantly share code, notes, and snippets.

View danclewley's full-sized avatar

Daniel Clewley danclewley

View GitHub Profile
@danclewley
danclewley / run_tiled_segmentation.py
Created July 9, 2016 17:02
RSGISLib Tiled Segmentation
#!/usr/bin/env python
"""
Apply RSGISLib segmentation to image
using standard or tiled approach.
For more details see:
https://spectraldifferences.wordpress.com/2016/07/09/scalable-image-segmentation-using-rsgislib/
Dan Clewley (09/07/2016)
@danclewley
danclewley / read_plot_spectra.py
Created May 1, 2018 13:22
Example of reading a spectra from a BIL file
"""
Example of reading the spectra from a single pixel using
arsf_envi_reader (https://github.com/pmlrsg/arsf_tools)
Dan Clewley, NERC-ARF-DAN
2018-05-01
"""
from arsf_envi_reader import numpy_bin_reader
from arsf_envi_reader import envi_header
from matplotlib import pyplot as plt
<!-- SPDLib Metrics file -->
<spdlib:metrics xmlns:spdlib="http://www.spdlib.org/xml/">
<!-- HOME -->
<spdlib:metric metric="home" field="HOME"/>
<!-- WD -->
@danclewley
danclewley / reproject_neodaas_netcdf.py
Created November 14, 2018 21:21
Reproject NEODAAS NetCDF
#!/usr/bin/env python
"""
Create a single layer tif in WGS84 projection from
NEODAAS (https://www.neodaas.ac.uk/) netCDF files in mercator projection.
Converts the location array to GCPs and uses these to warp the image with
GDAL.
Dan Clewley (dac@pml.ac.uk).