Create a new RTree instance from JSON path or stream
Using a path
rtree = RTree.json_read('rtree.json')
Using a stream
rtree = File.open('rtree.json', 'r') { |io| RTree.json_read(io) }
Parameters:
a path or readable stream
Returns:
the newly instantiated RTree
See Also:
165 166 167 168 169
# File 'lib/rtree.rb', line 165 def json_read(io_arg) RTree::IOUtil.io_with_mode(io_arg, 'r') do |io| super(io) end end