         samples-per-plot (case sample-distribution
                            "gridded" (count (create-gridded-sample-set
                                              circle?
+                                             45
+                                             45
                                              radius
                                              buffer
-                                             sample-resolution
-                                             45
-                                             45))
+                                             sample-resolution))
                            "random"  samples-per-plot
                            "center"  1.0
                            "none"    1.0)]

  (let [[[left bottom] [right top]] (EPSG:4326->3857 [lon-min lat-min] [lon-max lat-max])
        [left bottom right top]     (pad-bounds left bottom right top (/ plot-size 2.0))]
    (check-plot-limits (if (= "gridded" plot-distribution)
                         (count-gridded-points left bottom right top (* 2.0 plot-size))
                         num-plots)
                       5000.0)
    (map-indexed (fn [idx [lon lat]]

        theta (* (Math/random) 2 Math/PI)]
    [(+ center-x (* r (Math/cos theta))) (+ center-y (* r (Math/sin theta)))]))

(defn- gen-random-points [num-plots spacing point-gen-fn]
  (let [max-iterations (* 2 num-plots)]
    (loop [points     []
           iterations 0]
      (cond
