Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
Provides geo-hashing functions, enabling the encoding and decoding of coordinates into hierarchical strings.
Contributed by: Arnoud Buzing
Geohashing is a technique that converts geographic coordinates (latitude and longitude) into a short string of letters and numbers. This string, the geohash, acts as a unique identifier representing a rectangular area on the Earth's surface. The system subdivides the world into a grid-like hierarchy, with each geohash defining one of the grid's cells. The longer the geohash string, the smaller and more precise the area it represents, allowing for location-based applications that need to track proximity or categorize items based on their geographic position.
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["WolframExternalFunctions/GeoHashLink"]
To load the code after installation, evaluate this code:
Needs["WolframExternalFunctions`GeoHashLink`"]
Calculate a 5-character "geo-hash" representing your current location:
In[1]:= | ![]() |
Out[1]= | ![]() |
Decode the hash, returning the GeoPosition of the center point and the GeoBoundsRegion that the hash represents:
In[2]:= | ![]() |
Out[2]= | ![]() |
Display the location on a map, marked with a GeoMarker and highlighting the surrounding area with a GeoBoundsRegion:
In[3]:= | ![]() |
Out[3]= | ![]() |
Find the geohashes of the regions directly surrounding the location represented by the given hash:
In[4]:= | ![]() |
Out[4]= | ![]() |
And decode those:
In[5]:= | ![]() |
Out[5]= | ![]() |
And visualize them:
In[6]:= | ![]() |
Out[6]= | ![]() |
Wolfram Language Version 14.1