isaacbrodsky / h3-sqlite3

Bindings for H3 to SQLite3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

h3-sqlite3

test-linux H3 Version License

h3-sqlite3 provides bindings for the H3 library to SQLite3.

Compile

Install libsqlite3-dev on Debian like systems.

To compile:

mkdir build
cd build
cmake ..
make

TODO: You must compile H3 with -fPIC too - this should all be in a single build script!

Example

Install sqlite3 on Debian like systems and run sqlite3.

.load ./libh3ext
select printf('%x', latLngToCell(0,0,0));

You should see 8075fffffffffff as the output.

Implemented functions

  • latLngToCell
  • cellToLat
  • cellToLng
  • cellToParent
  • getResolution
  • getBaseCellNumber​
  • stringToH3​
  • h3ToString​
  • isValidCell
  • isResClassIII​
  • isPentagon

TODO

  • Better build and CI system, including testing, coverage, etc.
  • All H3 functions supported
  • Support for Spatialite

License

Copyright 2022 Isaac Brodsky. Licensed under the Apache 2 License.

H3 Copyright 2016 Uber Technologies, Inc.

DGGRID Copyright 2015 Southern Oregon University.

About

Bindings for H3 to SQLite3

License:Apache License 2.0


Languages

Language:C 71.5%Language:CMake 28.5%