Skip to content

Add Quadtree and other Indexes (Quadtree query returns undefined values) #13

@akidee

Description

@akidee

I run example/quadtree.coffee on Mac OS 10.6, node v0.6.12. It breaks with an error, because undefined is not an object.
So I have changed the loop to:

for i in r
  if !geometries[i]?
    console.log(i, 'is undefined')
  else
    console.log geometries[i].toString()

Result:

$ coffee examples/quadtree.coffee
...
POINT (1.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 1.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (1.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 2.0000000000000000)
0 'is undefined'
POINT (2.0000000000000000 2.0000000000000000)
0 'is undefined'
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions