 (defn bounding-info->pixels
   [bounding-info]
   (map #(->pixels (:dimensions %) (:bounds %)) bounding-info))
+
+(defn bounding-info->opendap-query
+  [bounding-info]
+  (when (seq bounding-info)
+    (->> bounding-info
+         (map identity)
+         (string/join ",")
+         (str "?"))))
 
 ;; XXX WARNING!!! The pattern matching code has been taken from the Node.js
 ;;                prototype ... and IT IS AWFUL. This is only temporary ...

                          (str "$1" fallback-replacement "$3")))))))

(defn data-files->opendap-urls
  [params pattern-info data-files]
  (->> data-files
       (map (partial data-file->opendap-url pattern-info))
       (map #(str % "." (:format params)))))

(defn get-opendap-urls
  [search-endpoint user-token raw-params]

;;; documented. Additionally, this will make converting between parameter
;;; schemes an explicit operation on explicit data.

(defn ->pixels
  [{x-dim :x y-dim :y} bounds]
  (let [[lon-lo lat-lo lon-hi lat-hi] (map #(Integer/parseInt %) bounds)
