librtree 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rtree.rb +12 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35028e6e74b4682479656b89086bf47fb42a43bd09ce7c9070df53adffcf4cec
4
- data.tar.gz: d58480430dada176e90f0e42e316b82be990fc4c414a993ce627a1b4b11ba707
3
+ metadata.gz: 126a8974cacf26f7c8603d161d4d7de0c121abdf5a0bc45b8244178156cbdca7
4
+ data.tar.gz: 1dd3115fb8a2eb08dd5a8968ad201978b2a956dde48e210cf648027365d91fa9
5
5
  SHA512:
6
- metadata.gz: 5bcb8f2b41ccab397f5accef4846912e9932dd07fa540c020c114a079ed9252296a8324ae647452170a445babcceb03984f258d053eb55d45566ad1b6da03d67
7
- data.tar.gz: 8de9c0cbcfde749d139590c81d41b55bc78c73aa826cb5385f65e9b4a1c36e8a08abc3e1f5b751a082f33fadb3e56001dd8a391f93c6314f4728e5ec772454ab
6
+ metadata.gz: 148bffff79b038c562620bd583f6437bced0426af7210a3a289023162634f681ef1579b523cab78a6ef057be07075868b3e49b06cc48bc4747fdedfd2d0380d8
7
+ data.tar.gz: 375703fbd60f42cf8722188c6fd654bcbc7ceec5886b19705c5993140fb0973a7c68c14df89e8255cef467e13c586579e94691557847ad5b6168bbfb80075eb5
data/lib/rtree.rb CHANGED
@@ -7,6 +7,12 @@ class RTreeC ; end
7
7
  # {http://soliton.vm.bytemark.co.uk/pub/jjg/en/code/librtree librtree}
8
8
  # implementing the R-tree spatial index of Guttman-Green.
9
9
  #
10
+ # Use
11
+ #
12
+ # require 'rtree'
13
+ #
14
+ # to make the {RTree} class available.
15
+ #
10
16
  # Given a set or rectangles (or higher dimensional cuboids) and their
11
17
  # associated ids, one can build an {RTree} using the {.csv_read} class
12
18
  # method or repeated calls to the {#add_rect} instance method. The
@@ -43,7 +49,7 @@ class RTreeC ; end
43
49
  # it as payload. In particular, the value may be non-unique and may be zero.
44
50
  # One should note that the id type used internally by the library is
45
51
  # determined at compile-time (with the RTREE_ID_TYPE variable) and by
46
- # default this is a 32-bit unsigned integer.
52
+ # default this is a 64-bit unsigned integer.
47
53
  #
48
54
  class RTree < RTreeC
49
55
 
@@ -93,6 +99,11 @@ class RTree < RTreeC
93
99
  # @param split [:linear, :quadratic] See {#initialize}
94
100
  # @param node_page [Integer] See {#initialize}
95
101
  # @return [RTree] the newly built RTree
102
+ # @note The CSV file (without header) should have the id in the
103
+ # first column, then twice as many floats as the dimension.
104
+ # Extra columns may be present and will be ignored (this
105
+ # useful feature is the reason that the dimension is a required
106
+ # argument).
96
107
  def csv_read(io, dim, split: :quadratic, node_page: 0)
97
108
  flags = split_flag(split) | node_page_flag(node_page)
98
109
  super(io, dim, flags)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: librtree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - J.J. Green
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-17 00:00:00.000000000 Z
11
+ date: 2021-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1'
97
97
  description: |
98
- A Ruby native extension for librtree implementing the R-tree
98
+ A Ruby extension for librtree implementing the R-tree
99
99
  spatial-index of Guttman-Green.
100
100
  email: j.j.green@gmx.co.uk
101
101
  executables: []