   (or (dissoc (tc/jsonb->clj extra-plot-info) :gid :lat :lon :plotid)
       {}))
 
-(defn- build-plot-object [plot-info project-id]
+(defn- prepare-plot-object [plot-info project-id]
   (let [{:keys [plot_id center flagged plotId geom extra_plot_info]} plot-info]
     {:id            plot_id
      :projectId     project-id ;TODO why do we need to return a value that is already known

                                 (:plot_id plot-info)
                                 user-id
                                 (time-plus-five-min))
                       (build-plot-object plot-info project-id))
                     "done"))))

(defn get-plot-by-id [{:keys [params]}]

                            :analyses assigned})
                         (call-sql "select_limited_project_plots" project-id max-plots)))))

(defn- prepare-samples-object [plot-id project-id]
  (mapv (fn [{:keys [sample_id point sampleId geom value]}]
          {:id       sample_id
           :point    point
