11

Does QGIS have any plugin to work with the What3Words mapping project?

24

Using a simple w3w wrapper here:

https://github.com/what3words/w3w-python-wrapper

I wrote a custom python function to return the what3words given a location. Once hooked into the expression engine, you can do something like generate labels with what3words:

enter image description here

This is done with the following expression in the layer label dialog:

concat("name", 
  ' : ',
  w3w(   transform( $geometry, layer_property(@layer_id, 'crs'), 'EPSG:4326')))

and my w3w function looks like this (along with the file from the github repo above)

@qgsfunction(args=1, group='Custom')
def w3w(value1, feature, parent):
    (long, lat) = value1[0].asPoint()

    w3w = what3words(apikey='YOURAPIKEYHERE')
    res = w3w.getWords(lat=lat, lng=long)
    return "%s" % ".".join(res['words'])

In all this took me about twenty minutes.

But the real question is what do you want to do with what3words?

11

Boundless have recently written a plugin that integrates What3Words in to QGIS. The plugin allows you to zoom to a What3Words address and also to click on the map and display the What3Words address of the point you clicked. Note it doesn't display the What3Words 3mx3m grid. Full details can be found here:

http://boundlessgeo.com/2016/03/what3words-in-qgis-down-load-today/

At the moment the plugin needs to be installed manually. This is really easy, you just download the files from GitHub then copy the 'what3words' folder to your plugins directory on your local PC (something like C:\Users\.qgis2\pyton\plugins\ on Windows), then enable the plugin through the plugin manager in QGIS.

The only other thing you need is a What3Words API key, which you can get by registering with them on this page: http://developer.what3words.com/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.