MapInfo Pro

 View Only
Expand all | Collapse all

MapInfo Monday: What3words feature to update a table with the W3W Address

  • 1.  MapInfo Monday: What3words feature to update a table with the W3W Address

    Posted 02-12-2024 03:09
    Edited by Peter Møller 02-21-2024 01:49

    I've been supporting a number of clients using the What3Words tool in MapInfo lately and @Peter Møller asked me to submit this week's article.

    A previous MapInfo Monday has covered the installation and set-up of the What3words tool for MapInfo. The tool is available to install via the MapInfo MarketPlace directly within MapInfo Pro (just make sure you have registered for the MapInfo Services under the Pro tab).

    The tool allows you to click anywhere on the map and retrieve the w3w reference and also to enter a w3w address to locate it on your map. The Help page is here:

    What3Words Help page

    The app for mobile phones is very popular and covers the whole world and many languages. We have received many calls about What3words and the app, with many people asking if the 3m grid is freely available – the answer to that is a definite “No”.

    Indeed, in the early days of using What3Words the usage was free. Now there are business plans to suit different amounts of usage, which is determined when you request an API Key.

    Business plans

    However, there is a useful feature where you can update MapInfo tables with the w3w address. If you scroll down the Help page, the good folk at w3w provide the following SQL query:

    Select WGS84ToWhat3words(CentroidX(obj), CentroidY(obj)) From flpoints Into Selection

    We recently had a client wanting to provide a w3w address to go with all of their sites. So for them, they wanted to update a new column in their table.
    The SQL for that is:

    Update <Tablename>
      Set W3W = WGS84ToWhat3words(CentroidX(obj), CentroidY(obj))

    Where W3W is a string column and the coordsys of your table must be WGS84.

    I saved a copy of the table in the WGS84 projection [EPSG: 4326]

    9,900 sites updated with a W3W address in an instant.

    I hope you find this useful.

    John Ievers
    CDR Group Limited
    Hope Valley, United Kingdom

  • 2.  RE: MapInfo Monday: What3words feature to update a table with the W3W Address

    Posted 02-21-2024 02:04

    Hi John

    This is a pretty cool use case for the what3words add-in.

    I think you can skip the step where you save your table into Lat/Long WGS84. You should be able to just set the session coordsys to this instead:

    Set CoordSys Earth Projection 1, 104

    Update Addresses
      Set W3W = WGS84ToWhat3words(CentroidX(obj), CentroidY(obj))

    Thanks for sharing, John

    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data