Skip to content

Jasmine is an open source nearest point finder program with K-D Tree implementation in Go.

License

Notifications You must be signed in to change notification settings

mseptiaan/jasmine

Repository files navigation

       ░▒▓█▓▒░  ░▒▓██████▓▒░   ░▒▓███████▓▒░ ░▒▓██████████████▓▒░  ░▒▓█▓▒░ ░▒▓███████▓▒░  ░▒▓████████▓▒░ 
       ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░        ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░        
       ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░        ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░        
       ░▒▓█▓▒░ ░▒▓████████▓▒░  ░▒▓██████▓▒░  ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓██████▓▒░   
░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░        ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░        
░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░        ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░        
 ░▒▓██████▓▒░  ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓███████▓▒░  ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓████████▓▒░ 
                                                                                                         
                                                                                                         

Jasmine is an open source nearest point finder program with K-D Tree implementation in Go.

What Are K-D Trees?

A K-D Tree is a binary tree in which each node represents a k-dimensional point. Every non-leaf node in the tree acts as a hyperplane, dividing the space into two partitions. This hyperplane is perpendicular to the chosen axis, which is associated with one of the K dimensions.

There are different strategies for choosing an axis when dividing, but the most common one would be to cycle through each of the K dimensions repeatedly and select a midpoint along it to divide the space. For instance, in the case of 2-dimensional points with x and y axes, we first split along the x-axis, then the y-axis, and then the x-axis again, continuing in this manner until all points are accounted for:

K-D Tree

Introduction to K-D Trees. (2023). baeldung.com (Accessed on: July 26, 2024)

How Does a K-D Tree Work find nearest point?

K-D Tree

K-d tree. (2024). wikimedia (Accessed on: July 26, 2024)

Features

  • In-memory database
  • Backup and Restore file
  • gRpc
  • Rest API
  • Export to GeoJson
  • TTL (Time to Live)
  • OSRM Integration
  • Valhalla Integration

Benchmark

goos: windows
goarch: amd64
pkg: github.com/mseptiaan/jasmine/internal/core
cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
BenchmarkPostStore
BenchmarkPostStore-8        	 8055708	       132.5 ns/op
BenchmarkGetData
BenchmarkGetData-8          	 4027813	       280.1 ns/op
BenchmarkGetDataGeoJson
BenchmarkGetDataGeoJson-8   	 3060290	       407.7 ns/op
BenchmarkPostNearby
BenchmarkPostNearby-8       	 1236009	       918.5 ns/op
PASS

Contributors

Thanks to all of the following who contributed to JASMINE:

About

Jasmine is an open source nearest point finder program with K-D Tree implementation in Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published