Method: RTree.from_csv

Defined in:
lib/rtree.rb

.from_csv(csv, dim, **kwarg) ⇒ RTree

Build a new RTree instance from CSV string

Parameters:

  • csv (String)

    the CSV data in a string

  • dim (Integer)

    the dimension of the tree

  • kwarg (Hash)

    As for csv_read

Returns:

  • (RTree)

    the newly built RTree



229
230
231
232
233
# File 'lib/rtree.rb', line 229

def from_csv(csv, dim, **kwarg)
  deserialise(csv, Encoding::UTF_8) do |io|
    csv_read(io, dim, **kwarg)
  end
end