DEV Community

Jim O'Flaherty
Jim O'Flaherty

Posted on

2

Geohash Open-Source library in TSQL for SQL Server

After searching for a SQL Server TSQL implementation of Geohash types and conversion functions, I finally just went and wrote a whole open-source library myself:

I designed it for maximum accuracy, performance, and strong conversion consistency guarantees. It enables an average IT data warehouse analyst or report writer to efficiently use, process, and leverage simple GIS spatial proximity models and queries. Given the steep learning curve of finding and adopting a full GIS style solution for data-science/big-data/data-analytics, this library can enable a temporary or good-enough solution until new requirements require investing in a more fleshed out GIS solution like Mapbox, ESRI, etc.

It provides two Geohash implementation types; Integer (BIGINT) and String (VARCHAR). It also provides two coordinate types; Longitude+Latitude and DMS. And then it provides the conversions to and from these various types. It also provides conversions to/from the SQL Server spatial geography Point type.

Please see the README.md for detailed information.

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more