3 ms·
I’m not sure why we can’t map a position in a big grid to a position in a small grid by doing: X = Math.floor(bigX / bigXMax * smallXMax) Is there some magic
by Aeolun 6y ago
I’m not sure why we can’t map a position in a big grid to a position in a small grid by doing:
X = Math.floor(bigX / bigXMax * smallXMax)
Is there some magic here I’m not seeing?
- rocqua 6y agoGrid doesn't need to be regular
- etimberg 6y agoAs an example, see this image of the UTM zones and look at the zones labelled in red. https://upload.wikimedia.org/wikipedia/commons/b/b7/Universal_Transverse_Mercator_zones.svg https://upload.wikimedia.org/wikipedia/commons/b/b7/Universa...
- alanbernstein 6y agoThat drives me nuts. I don't see an explanation in the article for why there are just six irregular cells in the whole grid. It does mention that it's "in part to accommodate the southern half of the Kingdom of Norway", despite the system having been developed by the US or maybe Germany. Why Norway? Why only Norway?
- nightcracker 6y agoWhat the person you're responding to did was a very simple form of locality-sensitive hashing. And even for non-regular grids, as long as they're somewhat regular (like timezones), you can narrow it down to just a handful candidates that a linear scan will then solve instantly.
- mattmanser 6y agoOr, if the grids never change, just store the data of the parent grid with the child grid. We've not got the whole picture though, but you don't need CS training to know that a loop within a loop within a loop within a loop is a bad idea.