Function Repository Resource:

What3WordsLookup

Source Notebook

Look up a location or a triple of words on the what3words service

Contributed by: Jan Mangaldan

ResourceFunction["What3WordsLookup"][loc]

looks up the geo location loc on the what3words API.

ResourceFunction["What3WordsLookup"][{word1,word2,word3}]

looks up the triple of words on the what3words API.

Details and Options

what3words divides the world into 3 meter squares, where each square has an associated unique triple of words.
To use ResourceFunction["What3WordsLookup"], obtain your own API key from the what3words website. The key must be stored as SystemCredential["What3WordsAPIKey"].
In ResourceFunction["What3WordsLookup"][loc], loc can be a GeoPosition or a geo Entity object.
ResourceFunction["What3WordsLookup"] returns an Association.

Examples

Basic Examples (2) 

Obtain an API key from the what3words website and enter it as your SystemCredential (one time only):

Look up your current location:

In[1]:=
ResourceFunction["What3WordsLookup"][Here]
Out[2]=

Show the square corresponding to the word triple in GeoGraphics:

In[3]:=
GeoGraphics[{Pink, Lookup[%, "GeoBoundsRegion"]}, PlotLabel -> Lookup[%, "Words"], {GeoBackground -> "Satellite", GeoRangePadding -> Scaled[5.]}]
Out[3]=

Look up a given word triple:

In[4]:=
ResourceFunction["What3WordsLookup"][{"comb", "intent", "noisy"}]
Out[4]=

Scope (2) 

Look up a geo position:

In[5]:=
ResourceFunction["What3WordsLookup"][
 GeoPositionENU[{0, 100000, 0}, GeoPosition[{45, 0}]]]
Out[5]=

Look up a geo Entity:

In[6]:=
ResourceFunction["What3WordsLookup"][
 Entity["Building", "ArcDeTriomphe::92x88"]]
Out[6]=

Version History

  • 1.0.0 – 30 August 2022

Related Resources

License Information