Changeset 1390 for Rtree/trunk/tests/index.txt
- Timestamp:
- 08/17/09 10:30:44 (12 months ago)
- Files:
-
- 1 modified
-
Rtree/trunk/tests/index.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Rtree/trunk/tests/index.txt
r1389 r1390 38 38 ... if i.id == 4321: 39 39 ... i.object 40 ... i.b ounds40 ... i.bbox 41 41 42 42 [34.3776829412, 49.3776829412, 26.737585373400002, 41.737585373400002]42 [34.3776829412, 26.737585373400002, 49.3776829412, 41.737585373400002] 43 43 44 44 … … 64 64 3 65 65 66 67 Default order is [xmin, ymin, xmax, ymax] 66 68 >>> idx.bounds 69 [-186.673789279, -96.717721818399994, 184.76138755599999, 96.604369977800005] 70 71 To get in order [xmin, xmax, ymin, ymax (... for n-d indexes)] use the kwarg: 72 >>> idx.get_bounds(coordinate_interleaved=False) 67 73 [-186.673789279, 184.76138755599999, -96.717721818399994, 96.604369977800005] 68 74 … … 175 181 >>> p.dimension = 3 176 182 177 >>> idx3d = index.Index(properties=p) 183 184 with interleaved=False, the order of input and output is: 185 (xmin, xmax, ymin, ymax, zmin, zmax) 186 187 >>> idx3d = index.Index(properties=p, interleaved=False) 178 188 >>> idx3d 179 189 <rtree.index.Index object at 0x...> 180 190 181 >>> idx3d.insert(1, (0, 0, 60, 60, 23.0, 42.0)) 182 183 >>> idx3d.intersection( (-1, -1, 62, 62, 22, 43)) 191 >>> idx3d.insert(1, (0, 0, 60, 60, 22, 22.0)) 192 193 >>> idx3d.intersection((-1, 1, 58, 62, 22, 24)) 194 [1L] 195 196 197 Make a 4D index 198 >>> p = index.Property() 199 >>> p.dimension = 4 200 201 202 with interleaved=False, the order of input and output is: 203 (xmin, xmax, ymin, ymax, zmin, zmax, kmin, kmax) 204 205 >>> idx4d = index.Index(properties=p, interleaved=False) 206 >>> idx4d 207 <rtree.index.Index object at 0x...> 208 209 >>> idx4d.insert(1, (0, 0, 60, 60, 22, 22.0, 128, 142)) 210 211 >>> idx4d.intersection((-1, 1, 58, 62, 22, 24, 120, 150)) 184 212 [1L] 185 213
