Plans [was: Re: Gconf or GSettings? - leading to a wider question]
Linus Torvalds
torvalds at linux-foundation.org
Tue Jan 22 15:22:16 PST 2013
On Tue, Jan 22, 2013 at 3:03 PM, Robert C. Helling <helling at atdotde.de> wrote:
>
> here is an alternative patch that does it with a bit of algebra instead of the binary search.
I understand why you did it this way, but I'm not convinced this is a good idea.
The binary search is kind of odd, but it should work for pretty much
*any* cylindrical projection, and any zoom factor.
There are multiple ways to do cylindircal projections, and while osm
*seems* to use the one that is just a pure linear version, there are
other common formats like the "equal area" one (that compresses the
poles in the north-south direction to make areas be comparable).
So the binary search is kind of hacky, but it was actually hacky for a
reason - it should work for a much wider set of cases.
(It also has the advantage that it *might* even work for
non-rectangular mappings, although I wouldn't generally bet on it).
Of course, in the end, if OSM always has the pure linear translation
of latitude/longitude to x/y, little of the above matters. Although
the "any zoom factor" obviously still does make a difference.
Linus
More information about the subsurface
mailing list