         y-steps   (Math/floor (/ y-range spacing))
         x-padding (/ (- x-range (* x-steps spacing)) 2.0)
         y-padding (/ (- y-range (* y-steps spacing)) 2.0)]
-    (for [x (range (+ 1 x-steps))
-          y (range (+ 1 y-steps))]
+    (for [x (range (inc x-steps))
+          y (range (inc y-steps))]
       [(+ (* x spacing) left x-padding) (+ (* y spacing) bottom y-padding)])))
 
 (defn- create-gridded-plots-in-bounds [left bottom right top spacing]
   (->> (get-all-gridded-points left bottom right top spacing)
        (map EPSG:3857->4326)))
 
-(defn- create-gridded-sample-set [circle? radius buffer sample-resolution center-x center-y]
+(defn- create-gridded-sample-set [circle? center-x center-y radius buffer sample-resolution]
   (let [[left bottom right top] (pad-bounds (- center-x radius)
                                             (- center-y radius)
                                             (+ center-x radius)

        (init-throw "Unable to generate random plots.  Try a lower number of plots, smaller plot size, or bigger area.")

        :else
        (let [test-point (if circle?
                           (random-point-in-circle center-x center-y radius)
                           (random-point-in-bounds left bottom right top))]
          (recur (if (some (fn [[x1 y1]]
                             (let [[x2 y2] test-point
                                   dist (distance x1 y1 x2 y2)]
                               (< dist buffer)))
                           points)
                   points
                   (conj points test-point))

(defn- create-random-plots-in-bounds [left bottom right top plot-size num-plots]
  (->> (gen-random-points num-plots
                          (* 2.0 plot-size)
                          #(random-point-in-bounds left bottom right top))
       (map EPSG:3857->4326)))

(defn- create-random-sample-set [circle? center-x center-y radius spacing samples-per-plot]
  (let [[left bottom right top] (pad-bounds (- center-x radius)
                                            (- center-y radius)
                                            (+ center-x radius)
                                            (+ center-y radius)
                                            spacing)] ; Add buffer = spacing
    (->> (gen-random-points samples-per-plot
                            spacing
                            (if circle?
                              #(random-point-in-circle center-x center-y (- radius spacing)) ; Add buffer = spacing
                              #(random-point-in-bounds left bottom right top)))
         (map EPSG:3857->4326))))

(defn generate-point-samples [plots
                              plot-count
