Oft-prepare-image-for-nn.bash

From Open Foris Wiki

Jump to: navigation, search

oft-prepare-image-for-nn.bash for preparing a Landsat image for nn-analysis with Oft-nn

Re-projects and shifts an image if needed

Prepares a 0/1 mask of nodata in image, all values <= 0 are considered nodata

Usage: oft-prepare-image-for-nn.bash <-i image> [-b baseimage] [-p projection] [-s shapefile] [-a attribute]

Description:

  • Image = Landsat image with 6 or 7 bands to be prepared for oft-nn
  • Baseimage = Image already in correct grid, meaning pixel size and pixel locations
  • Target projection in EPSG, e.g. EPSG:32736
  • Shapefile = additional mask areas to be added to the base mask, e.g. clouds
  • If target projection is given, also shapefile is re-projected
  • Attribute = name of attribute field to be used in shapefile. Field must contain 0 in regions to be masked off


Exercise:

  • Get Example data set
  • For this exercise following tools are used: oft-prepare-image-for-nn.bash

1. Open your working directory using

cd /home/...

2. For this exercise we will use landsat_t1.tif as image file and landsat_t2.tif as the base image file, landuse.shp' is the input shapefile of which we define landuse as the attribute to be used:

oft-prepare-image-for-nn.bash -i landsat_t1.tif -b landsat_t2.tif -s landuse.shp -a landuse

3. The output image is automatically processed: landsat_t1_mask.tif

4. Check in QGIS the values of your output-mask


Output of oft-prepare-image-for-nn.bash is landsat_t1_mask.tif



Back to Open Foris Toolkit Main Page

Back to Tools & Exercises



Personal tools