3 ms·
That is the big take-home problem here. I looked up the address that they said was in Nigeria (it's actually in Mali), REJATE-POKAJA. I wanted to know, "well, w
by drostie 12y ago
That is the big take-home problem here. I looked up the address that they said was in Nigeria (it's actually in Mali), REJATE-POKAJA. I wanted to know, "well, what's the address of the building across the road?" and it turns out that that is: RIJATE-PIKAJAS. I think my first thought is, "Is that really what you want?" Those sound pretty darn similar, and it'd be easy to get confused. In reality you already have a lot of info about a place implicitly, so you want to focus on the stuff that you don't know, magnifying that to cover the whole number.
It seems that they get something like 16-20 bits per word or so. I think my first approach in this case would be to feed lat/long through a cylindrical equal-area projection, since the math for those is pretty simple (so it can be implemented in diverse systems easily) and at least there is a semblance of fairness to the resulting numbers -- but really, I think what you want is to cover the Earth with a massive geodesic dome of points and just number the vertices with some algorithm, perhaps placing a great circle on the Greenwich line and then descending around in some sort of spiral. There's no fundamental reason I can see why we'd need to project at all, really.
So, you form two numbers with the Gall-Peters projection:
2^9 * (most significant 9 bits of x) + most significant 9 bits of y
2^9 * (least significant 9 bits of x) + least significant 9 bits of y
or else you label each of 2^18 geodesic faces in a spiral and do coordinates on the faces; either way.
You take these numbers, and multiply them by some large prime, modulo the number that you've got. Prime multiplication is a simple way to permute the numbers so that adjacent vertices are unlikely to be numbered similarly. If you really wanted, you could then XOR it with some fixed pattern and multiply by another large prime, which may help with names being similar at the poles themselves or something (depending on the size of the prime). Any quasi-random permutation will work, I just figure "let's take the ones that are only a couple fixed lines of code." The nice thing about these permutations, too, is that they're invertible: someone gives you a name, you convert it to a number, you pass it back through this, and you get map/geodesic coordinates.
Then you convert those numbers into syllables. This way you can know that your city is mostly DAFAXO except the northeastern part is part of LINUZU, completely different names. The most significant bits are thus scrambled but isolated. The least significant bits are scrambled separately and give every point on the ground a wildly different name, so that nobody confuses your place with one down the street.
- roberdam 12y agoHi Drostie, It is an excellent analysis, when designing the algorithm there are 2 choices, to make the Global Addresses somehow related, so you can know that REJATE-POKAJA is near RIJATE-PIKAJAS, or to make them totally different so you wont get confused by the similarity, both approaches have their advantages and disadvantages , and as you say, is not something difficult to implement