h3-pg

PostgreSQL bindings for H3, a hierarchical hexagonal geospatial indexing system

https://github.com/zachasme/h3-pg

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords

geospatial h3 postgis postgresql
Last synced: 6 months ago · JSON representation ·

Repository

PostgreSQL bindings for H3, a hierarchical hexagonal geospatial indexing system

Basic Info
  • Host: GitHub
  • Owner: zachasme
  • License: apache-2.0
  • Language: PLpgSQL
  • Default Branch: main
  • Homepage:
  • Size: 711 KB
Statistics
  • Stars: 316
  • Watchers: 10
  • Forks: 42
  • Open Issues: 7
  • Releases: 35
Topics
geospatial h3 postgis postgresql
Created about 7 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog Funding License Citation

README.md

h3-pg: Uber's H3 Hexagonal Hierarchical Geospatial Indexing System in PostgreSQL

test-linux test-macos test-windows License

This library provides PostgreSQL bindings for the H3 Core Library. For API reference, please see the H3 Documentation.

Developed in collaboration with Scandinavian Highlands.

Binary distributions

These don't require you have the development headers or cmake installed.

Debian/Ubuntu (Ubuntu 22.04 LTS (Jammy Jellyfish) +)

Replace 16 with your postgresql version. Refer to PGDG Ubuntu and PGDG Debian for installing PostgreSQL. More details about the various packages at https://apt.postgresql.org sudo apt install postgresql-16-h3

Redhat Derivatives (Rocky / EL 8+ / Fedora 37+)

Replace 16 with your postgresql version Refer to PGDG Redhat Derivatives for installing PostgreSQL. More details about the various packages at https://yum.postgresql.org sudo yum install h3-pg_16

Windows

Included as part of PostGIS Bundle 3.3+ for PostgreSQL 11-16 Details: postgis.net windows
Works with PostgreSQL Windows and PostGIS bundle is accessible via the included Application Stackbuilder.

Compiling Prerequisites

  • PostgreSQL 11+ (including server headers, e.g. postgresql-server-dev-14)
  • C compiler (e.g., gcc)
  • CMake 3.20+
  • GNU Make

Quick Overview

If the prerequisites are met you can use the PGXN Client to download, build, and install, e.g.:

```shell $ pgxn install h3 $ pgxn load h3 $ psql =# SELECT h3latlngto_cell(POINT('37.3615593,-122.0553238'), 5);

h3latlngto_cell

85e35e73fffffff (1 row) ```

(You can install a specific version using pgxn install 'h3=3.7.2' and pgxn load 'h3=3.7.2' for example)

See Building for other installation methods.

Usage

:tada: Note: The following usage docs apply to H3 v4, which was released on August 23, 2022.

Generally, all functions have been renamed from camelCase in H3 to snake_case in SQL.

See API reference for all provided functions.

Building

```bash

Generate native build system

cmake -B build -DCMAKEBUILDTYPE=Release

Build extension(s)

cmake --build build

Install extensions (might require sudo)

cmake --install build --component h3-pg ```

Contributing

Pull requests and GitHub issues are welcome. Please include tests for new work. Please note that the purpose of this extension is to expose the API of the H3 Core library, so we will rarely accept new features that are not part of that API. New proposed feature work is more appropriate in the core C library or in a new extension that depends on h3-pg.

See Development.

License

This project is released under the Apache 2.0 License.

Owner

  • Name: Zacharias Knudsen
  • Login: zachasme
  • Kind: user
  • Location: Copenhagen

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Knudsen"
  given-names: "Zacharias"
  orcid:  https://orcid.org/0000-0003-3662-8396
title: "h3-pg"
version: v3.7.2
doi: 10.5281/zenodo.6856596
date-released: 2022-04-13
url: "https://github.com/zachasme/h3-pg"

GitHub Events

Total
  • Create event: 14
  • Commit comment event: 1
  • Release event: 4
  • Issues event: 19
  • Watch event: 44
  • Delete event: 10
  • Issue comment event: 46
  • Push event: 122
  • Pull request review event: 5
  • Pull request review comment event: 4
  • Pull request event: 23
  • Fork event: 6
Last Year
  • Create event: 14
  • Commit comment event: 1
  • Release event: 4
  • Issues event: 19
  • Watch event: 44
  • Delete event: 10
  • Issue comment event: 46
  • Push event: 122
  • Pull request review event: 5
  • Pull request review comment event: 4
  • Pull request event: 23
  • Fork event: 6

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 9
  • Total pull requests: 7
  • Average time to close issues: 2 days
  • Average time to close pull requests: 9 months
  • Total issue authors: 8
  • Total pull request authors: 3
  • Average comments per issue: 1.11
  • Average comments per pull request: 2.43
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 9
  • Pull requests: 6
  • Average time to close issues: 2 days
  • Average time to close pull requests: 17 days
  • Issue authors: 8
  • Pull request authors: 3
  • Average comments per issue: 1.11
  • Average comments per pull request: 2.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • df7cb (2)
  • hfs (1)
  • CtrlC-Root (1)
  • Jukurrpa (1)
  • psparrow (1)
  • jmealo (1)
  • iaguerri (1)
  • shaunakv1 (1)
  • Boris-creator (1)
  • GeorgeWillaman (1)
  • devrimgunduz (1)
  • kdannies (1)
  • graeme44 (1)
  • zachasme (1)
  • bertday (1)
Pull Request Authors
  • zachasme (8)
  • jmealo (2)
  • sleeping-h (1)
  • robertozimek (1)
  • graeme44 (1)
Top Labels
Issue Labels
needs more info :raised_hand_with_fingers_splayed: (1)
Pull Request Labels
enhancement :rocket: (2) help wanted :pick: (1)

Dependencies

.github/workflows/documentation.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/pgxn.yml actions
  • actions/checkout v3 composite
.github/workflows/test-linux.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
.github/workflows/test-macos.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
.github/workflows/test-windows.yml actions
  • actions/checkout v3 composite
scripts/sql2doc/Pipfile pypi
  • lark-parser *
scripts/sql2doc/poetry.lock pypi
  • lark-parser 0.12.0
scripts/sql2doc/pyproject.toml pypi
  • lark-parser ^0.12.0
  • python ^3.10