[Swift-commit] r6198 - SwiftApps/modis/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Wed Jan 30 22:13:57 CST 2013


Author: davidk
Date: 2013-01-30 22:13:57 -0600 (Wed, 30 Jan 2013)
New Revision: 6198

Modified:
   SwiftApps/modis/bin/getlanduse.sh
Log:
updated getlanduse


Modified: SwiftApps/modis/bin/getlanduse.sh
===================================================================
--- SwiftApps/modis/bin/getlanduse.sh	2013-01-31 04:01:16 UTC (rev 6197)
+++ SwiftApps/modis/bin/getlanduse.sh	2013-01-31 04:13:57 UTC (rev 6198)
@@ -1,3 +1,5 @@
+#!/bin/bash
+
 #
 # Read a MODIS .tif file and return a histogram of pixel values.
 # The pixel values signify land use for that region (see legend in notes)
@@ -5,10 +7,4 @@
 # Usage: getlanduse.sh modisFile histogramFile
 #
 
-#sleep 1
-convert  $1 -format %c histogram:info:- 2>/dev/null |
-  grep '[0-9]' |
-  sort -nr |
-  sed -e 's/[^0-9 ]//g' |
-  awk '{print $1, $3, sprintf("%02x",$3)}' |
-  sort -n -k $2
+$3/../../../bin/ppmhist.pl $1 | sort -n -k $2




More information about the Swift-commit mailing list