This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- SPDLib Metrics file --> | |
<spdlib:metrics xmlns:spdlib="http://www.spdlib.org/xml/"> | |
<!-- HOME --> | |
<spdlib:metric metric="home" field="HOME"/> | |
<!-- WD --> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Apply Savitzky-Golay filter to an ENVI BIL file | |
Uses scipy | |
http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.savgol_filter.html | |
And arsf_envi_reader (available from: https://github.com/pmlrsg/arsf_tools) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Mosaic files within a zip archive using RSGISLib | |
Author: Dan Clewley | |
Creation Date: 02/09/2015 | |
Designed to mosaic Environemnt Agency LiDAR-derived DTM and DSM files | |
downloaded in ASCII format from http://environment.data.gov.uk/ds/survey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
A script to create a GIF from a sequence of images using | |
ImageMagick. | |
Applies natural sorting to file names. | |
Dan Clewley (http://spectraldifferences.wordpress.com) | |
""" | |
import argparse | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from rios import applier | |
from rios import cuiprogress | |
import numpy | |
def calcstats(info, inputs, outputs): | |
# Calc standard deviation of bands for each pixel | |
stdev_pixels = numpy.std(inputs.inimage, axis=0) | |
# Reshape to make 3-dimensional array (required for output) | |
outputs.outimage = stdev_pixels.reshape((1,stdev_pixels.shape[0],stdev_pixels.shape[1])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from rios import applier | |
from rios import cuiprogress | |
import numpy | |
def calcstats(info, inputs, outputs): | |
# Calc standard deviation of bands for each pixel | |
stdev_pixels = numpy.std(inputs.inimage, axis=0) | |
# Reshape to make 3-dimensional array (required for output) | |
outputs.outimage = stdev_pixels.reshape((1,stdev_pixels.shape[0],stdev_pixels.shape[1])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# A script topographically correct SAR data using RIOS applier. | |
# | |
# Dan Clewley (clewley@usc.edu) - 05/02/2013 | |
# | |
# The correction uses: | |
# | |
# sigma0_norm = sigma0 * (A_flat / A_slope) * (cos(theta_ref) / cos(theta_loc))^n | |
# |
NewerOlder