Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Commit

Permalink
Merge pull request #141 from reddmetrics/feature/fix-71
Browse files Browse the repository at this point in the history
fix for #71  by replacing call to chunkifier with direct use of thrift API
  • Loading branch information
robinkraft committed Jul 19, 2012
2 parents 5bd0fa4 + dc78dcb commit 97c86ff
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/clj/forma/source/static.clj
Original file line number Diff line number Diff line change
Expand Up @@ -109,20 +109,19 @@
?dataset ?m-res ?t-res !date ?mod-h ?mod-v ?sample ?line ?val"
[val-gen m-res chunk-size nodata]
(let [chunkifier (p/chunkify chunk-size)
src (p/sparse-windower val-gen
(let [src (p/sparse-windower val-gen
["?sample" "?line"]
(r/chunk-dims m-res chunk-size)
"?val"
nodata)]
(<- [?tile-chunk]
(src ?dataset ?s-res ?t-res !date ?h ?v _ ?id ?window)
(src ?dataset ?s-res ?t-res _ ?h ?v _ ?id ?window)
(p/flatten-window ?window :> ?data)
(thrift/pack ?data :> ?val)
(count ?data :> ?count)
(= ?count chunk-size)
(chunkifier ?dataset !date ?s-res ?t-res ?h ?v ?id ?val :> ?tile-chunk)
)))
(thrift/ModisChunkLocation* ?s-res ?h ?v ?id chunk-size :> ?tile-loc)
(thrift/DataChunk* ?dataset ?tile-loc ?val ?t-res :> ?tile-chunk))))

(defn static-chunks
"TODO: DOCS!"
Expand Down

0 comments on commit 97c86ff

Please sign in to comment.