Skip to content
A simple C library for working with KD-Trees
C Makefile
Branch: master
Clone or download




kdtree is a simple, easy to use C library for working with kd-trees.

Kd-trees are an extension of binary search trees to k-dimensional data. They facilitate very fast searching, and nearest-neighbor queries.

This particular implementation is designed to be efficient and very easy to use. It is completely written in ANSI/ISO C, and thus completely cross-platform.

See under the doc/ and examples/ directories to find out how to use the kdtree library.


Author: John Tsiombikas <>

kdtree is free software. You may use, modify, and redistribute it under the terms of the 3-clause BSD license.


Latest release (0.5.7):

You can find previous releases here:

You can also grab a copy of the source from github:

You can’t perform that action at this time.