Class: GeoRuby::Rtree

Inherits:
Object
  • Object
show all
Defined in:
lib/georuby-ext/georuby/rtree.rb

Defined Under Namespace

Classes: Node, STRBuilder

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root) ⇒ Rtree

Returns a new instance of Rtree.



5
6
7
# File 'lib/georuby-ext/georuby/rtree.rb', line 5

def initialize(root)
  @root = root
end

Instance Attribute Details

#rootObject

Returns the value of attribute root.



3
4
5
# File 'lib/georuby-ext/georuby/rtree.rb', line 3

def root
  @root
end

Class Method Details

.bulk_loading(elements, options = {}) ⇒ Object



9
10
11
12
# File 'lib/georuby-ext/georuby/rtree.rb', line 9

def self.bulk_loading(elements, options = {})
  options = { :node_size => 2 }.merge(options)
  STRBuilder.new(elements, options[:node_size]).to_rtree
end