Tuesday, 1 December 2015

mercator - How does what3words build a grid of squares on the surface of the Earth?



What3words built a grid of squares of 3m2 on the earth. Does anyone know what is the algorithm ?


I started with this method: the range of longitude is [-180, 180] and the range of latitude is [-90,90]. If you cut them into equal intervals, you can have almost perfect squares near equator, but near the poles, they arenot squares, are they ?




After Gary's answer. I still want some precisions.


If between -85° and 85° (latitudes), the squares are in a grid, do I have to assume that the number of squares at a any latitude is the same (for me, when I say a grid, for each side of the square, there should be one and only one square)? If so, at the equator, we can have a square of 3mx3m, but at latitude 85°, it is a 0.26m x 0.26m then. (Because the parallel at latitude 85° is cos(85°) shorter.)


So, do I have to assume that it is not a perfect grid , since the area of the square always 3m x 3m at any latitude between -85° and 85°. But when I tried to zoom into a what3word map, I always see a perfect grid. How is it possible? Is it possible to see some deformations, directly on a map ?


@Gary, is it possible to see the deformations (near the poles) you mentionned in a map ? (it seems that we can't see on a google map).



Answer



You're on the right lines. The what3words grid is algorithmically generated to be nearly exactly 3m by 3m to within a couple of centimetres at latitudes between -85º and +85º. Between +/- 85º north and south and the poles, the notional grid squares expand the closer to the poles you get and at their largest extent are ~4.5m by ~4.5m with some deformation at the poles.


It's not easy to visualise the deformation, hence my use of the word notional in the previous paragraph. The datum that what3words works with is EPSG:4326 and the algorithm at the heart of what3words "understands" this and so it's always algorithmically able to map a 3 word address to coordinates and vice versa. But most web maps, Google's included, are displaying that data once it's been (re)projected CRS; Google uses EPSG:3857. It's really challenging to display the deformation as you're working against how the underlying mapping API wants you to work. The closest you'll get is the slight shifts in the notional grid that occur as you move north of south from the meridian, as shown near evens.response.fishes if you zoom in enough that the grid will be shown.



evens.response.fishes


(disclaimer - in my day job I work for what3words)


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...