Class: Geoptima::InterpolationLocatorAlgorithm

Inherits:
ClosestLocatorAlgorithm show all
Defined in:
lib/geoptima/locator.rb

Instance Method Summary collapse

Instance Method Details

#locate(locatable) ⇒ Object



53
54
55
56
57
58
59
60
61
# File 'lib/geoptima/locator.rb', line 53

def locate(locatable)
  if locatable.previous_poing && locatable.next_point && locatable.next_point.prev_point
    correlateEvent2Point(point,wavg(point.prev,point.next,point),'interpolated');
  elsif closest = super.locate(locatable)
    correlateEvent2Point(point,closest,'correlated');
  else
    puts "No correlation possible for point: "+point
  end
end