app/models/map.rb
#bounds set by "soft" control points
bounds set by "soft" control points
bounds set by " soft " control points
def soft_bounds
    return nil unless self.gcps.soft.size >= 3 
    x_array = []
    y_array = []
    self.gcps.soft.each do |gcp|
      next unless gcp[:lat].is_a? Numeric and gcp[:lon].is_a? Numeric
      x_array << gcp[:lat]
      y_array << gcp[:lon]
    end
    our_bounds = [y_array.min ,x_array.min ,y_array.max, x_array.max].join ','
    our_bounds
  end
def soft_bounds return nil unless self . gcps . soft . size >= 3 x_array = [ ] y_array = [ ] self . gcps . soft . each do | gcp | next unless gcp [ :lat ] . is_a? Numeric and gcp [ :lon ] . is_a? Numeric x_array << gcp [ :lat ] y_array << gcp [ :lon ] end our_bounds = [ y_array . min , x_array . min , y_array . max , x_array . max ] . join ',' our_bounds end
bounds set by "soft" control points
bounds set by " soft " control points
#south, west, north, east