Tools & Exercises

From Open Foris Wiki

Jump to: navigation, search

Example data set




Tools included in OFGT




Here is a list of all tools that have been added so far to the OFGT for processing spatial data, mainly raster imagery but also vector files. For each tool an exercise is provided with sample data.


General Tools


CsvToPolygon.py convert CSV file from GExml2csv.bash into a vector file

genericCsvToPolygon.py convert CSV file from genericGEkml2csv.bash into a vector file

genericGEkml2csv.bash convert separate kml files from Google Earth into one CSV file

GExml2csv.bash convers xml files from Google Earth training data collection tool into one CSV file

oft-addattr.py add integer attribute in a shape file

oft-addpct.py add pseudo colour table to a raster

oft-admin-mask.bash prepare a mask with administrational borders to be used in oft-nn analysis

oft-bb calculate minimum bounding box for given pixel values

oft-classvalues-compare.bash create comparison plots of classes based on result of prev. script - to be tested

oft-classvalues-plot.bash create scatterplots of pixels within training classes (given in a shapefile)- to be tested

oft-combine-masks.bash combine several masks (images or shapes) to one mask file

oft-compare_overlap.bash calculate correlation of spatially overlapping region of two input images - to be tested

oft-crop.bash crop a raster to the extent of a certain pixel value

oft-cuttile.pl cut squares of a raster based on a list of coordinates indicating the centres

oft-filter moving window filters

oft-gengrid.bash generate a systematic grid over a raster

oft-gensyssample.bash generate a systematic sample in different clustering schemes

oft-getcorners.bash get the coordinates of corners of a raster or OGR vector layer

oft-polygonize.bash a wrapper for gdal_polygonize

oft-sample-within-polys.bash sample pixels within polygons and generates training data for k-nn

oft-shptif.bash rasterize a vector file to the resolution of a reference image

oft-sigshp.bash create a signature file of a raster based on training area polygons

PointsToSquares.py convert XY-locations into 100 x 100 m squares in a kml-file


Image Manipulation



multifillerThermal.bash build a multi-temporal image

oft-calc raster image calculator

oft-chdet.bash automatic change detection between two input rasters (images)

oft-clip.pl create subset of a raster using the extent and pixels size of a reference image.

oft-combine-images.bash combine two separately gapfilled rasters into one composite

oft-gapfill fill the gaps in an input image using locally built regression models

oft-ndvi.bash compute NDVI image using the Red and NIR band

oft-prepare-images-for-gapfill.bash prepare two rasters for oft-gapfill analysis

oft-reclass reclassification program

oft-shrink to be completed

oft-stack image stacker

oft-trim analyse the content of the spatial neighbourhood of each pixel

oft-trim-mask.bash create a 0/1 mask of a 6 or 7 band raster


Statistics


oft-ascstat.awk compute basic statistics for a space separated text file

oft-avg compute segment averages and standard deviations

oft-countpix.pl count number of pixel with, below or above a specific value

oft-crossvalidate compute RMSE and bias estimates for k-nn via leave-one-out cross-validation

oft-extr pixel value extractor

oft-his compute raster histogram

oft-mm compute minimum and maximum values

oft-segstat output segments shape and spectral statistics in a text file

oft-stat extract image statistics into a text file, based on zone/segment level


Classification


oft-cluster.bash clusters rasters using oft-gengrid.bash, gdal_extr and gdal_kmeans

oft-kmeans kmeans clustering (see also oft-cluster.bash)

oft-nn nearest neighbour classifier - To be tested

oft-nn-training-data.bash prepare a training data file for oft-nn analysis

oft-normalize.bash normalize a raster and corresponding training data grey values for oft-nn analysis

oft-prepare-image-for-nn.bash prepare a raster for oft-nn analysis

oft-unique-mask-for-nn.bash prepare a mask so that usable areas from an overlapping mask are removed


Segmentation


oft-clump connected component labelling

oft-seg region merging segmentation

oft-segmode.bash zonal statistics : burn the mode of raster values into defined zones


Projection


oft-getproj.bash fetch projection definition files for UTM zones


Tools using LEDAPS output


ledapsscript.bash perform atmospheric correction using programs from NASA's ledaps-project

oft-mask.bash create a gap and cloud and cloud shadow mask using 1-2 hdf images originating from atmospheric correction process ("ledaps")

oft-stack_mask2images.bash create a 14 band composite from two landsat hdf ("ledaps") images, and a common mask similar to oft-mask.bash

stack.bash create a 7-band Landsat composite image from a hdf image originating from atmospheric correction process ("ledaps")

stack_modis_ls_brdf.bash create a 12-band composite from a landsat hdf ("ledaps") and a brdf-corrected modis hdf - and also some other stuff

trim_ledaps.bash create a simple mask of the effective area of an image originating from atmospheric correction process ("ledaps") TBR?


Get Info, Update, Uninstall OFGT


oft-info.bash - current version info

sudo oft-update.bash – run update

sudo oft-uninstall.bash – unistall OFGT

Exercises




General exercises



Exercises combining several tools



Complex process chain


  • Here is an example of an application of OFGT tools for supervised and unsupervised LandCover classifications, including geometric and atmospheric corrections, dealing with training data and others.




Back to Open Foris Toolkit Main Page


Personal tools