                                (update r :visible_id tc/val->int)
                                (dissoc r :lon :lat)))
                            (rest rows))]
-      [header-keys body])))
+      (if (and (contains? header-keys :lon)
+               (contains? header-keys :lon))
+        [(dissoc header-keys :lon :lat) body]
+        (init-throw (str "The provided "
+                         design-type
+                         " CSV file must contain a LAT and LON column."))))))
 
 (defmethod get-file-data :default [distribution _ _ _]
-  (throw (str "No such distribution (" distribution ") defined for ceo.db.projects/get-file-data")))
+  (throw (str "No such distribution (" distribution ") defined for ollect-earth-online.db.projects/get-file-data")))
 
 (defn- check-headers [headers primary-key design-type]
   (let [header-diff     (set/difference (set primary-key) (set headers))


      (#{"csv" "shp"} sample-distribution)
      (do
        ;; FIXME
        (init-throw "Restoring external samples for user drawn samples is temporarily broken.")
        (call-sql "delete_all_samples_by_project" project-id)
        #_(call-sql "copy_saved_samples" project-id))

      :else

       (remove #(= folder-name %))
       (filter #(= ext (peek (str/split % #"\."))))
       (first)))

(defn- parse-as-sh-cmd
  "Split string into an array for use with clojure.java.shell/sh."
