Skip to content

weacw/GeoHash.Net

 
 

Repository files navigation

GeoHash.Net Alt

Features

Allows you to translate a lat/lng coordinate to a GeoHashed string. This allows you to quickly cluster coordinates within predefined grids.

You can learn more about how to use this here.

Getting Started

Install via GeoHash.Net package on Nuget.

Install-Package GeoHash.Net

Usage

####To encode coordinates to geohashes####

// Create an encoder.
var encoder = new GeoHashEncoder<string>();

// Encode it into a geohash.
var geoHash = encoder.Encode("-33.916667,151.266667");

####To find if a geohash falls within a certain cluster:#####

// Create a matcher.
var encoder = new GeoHashMatcher<string>();

// Test for match within 5km.
var isMatch = encoder.IsMatch("r3gx4", "r3gx41tj0g40", GeoHashPrecision.Level5);

// You can also pass in collections of geohahes to test for matches.
var matches = encoder.GetMatches("r3gx4", IEnumerable<string>, GeoHashPrecision.Level5);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%