Created
October 29, 2012 20:51
-
-
Save robinkraft/3976462 to your computer and use it in GitHub Desktop.
count rain pixels by tile
This file contains hidden or 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
| (use 'forma.hadoop.jobs.scatter) | |
| (in-ns 'forma.hadoop.jobs.scatter) | |
| (defn rain-count-by-tile | |
| [in-pail run-key] | |
| (let [rain-src (split-chunk-tap in-pail ["precl" run-key])] | |
| (<- [?mod-h ?mod-v ?count] | |
| (rain-src _ ?dc) | |
| (thrift/unpack ?dc :> _ ?loc _ _ _) | |
| (thrift/unpack ?loc :> _ ?mod-h ?mod-v _ _) | |
| (c/count ?count)))) | |
| (?- (hfs-textline "" :sinkmode :replace) | |
| (rain-count-by-tile "" "500-32")) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment