Module: NSWTopo::Spot::Candidate

Defined in:
lib/nswtopo/layer/spot.rb

Defined Under Namespace

Modules: PreferKnolls, PreferNeither, PreferSaddles

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#elevationObject

Returns the value of attribute elevation.



42
43
44
# File 'lib/nswtopo/layer/spot.rb', line 42

def elevation
  @elevation
end

#knollObject

Returns the value of attribute knoll.



42
43
44
# File 'lib/nswtopo/layer/spot.rb', line 42

def knoll
  @knoll
end

Instance Method Details

#<=>(other) ⇒ Object



60
61
62
# File 'lib/nswtopo/layer/spot.rb', line 60

def <=>(other)
  self.ordinal <=> other.ordinal
end

#bounds(buffer: 0) ⇒ Object



64
65
66
# File 'lib/nswtopo/layer/spot.rb', line 64

def bounds(buffer: 0)
  coordinates.map { |coordinate| [coordinate - buffer, coordinate + buffer] }
end

#conflictsObject



56
57
58
# File 'lib/nswtopo/layer/spot.rb', line 56

def conflicts
  @conflicts ||= Set[]
end