Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If I'm reading the signs correctly, your working demo is at maps.google.com

Remember a couple weeks (months?) ago when google changed their maps from being a flat Cartesian style to having a more polar spherical look to them as you actually moved away from the surface of the earth? This is the library responsible for that.



Coordinate system != map projection.

As far as I know, the map tiles google serves are still in mercator projection -- it's just that mercator was always designed to be projected onto a sphere, not a plane, so now it looks better.

What S2 is, is a better way of representing sets of coordinates within GIS systems, such that searching for features that are close to each other, or within a complex polygon, can be performed much quicker than with other coordinate reference systems ie. floating point latitude/longitude pairs. They're storing points on a 3D sphere (unit vectors) as easily subdivisible 64-bit integers which have a logical order which is much faster to index / iterate over nearby areas.

Makes sense for applications like google maps; "find local businesses near point X,Y" etc.


The mercator projection is designed to project a ~sphere onto a plane. The distorted tiles are now being redistorted to drape the plane back onto the sphere.


Yeah I don't actually know if I was using the right terminology. Most of what I wrote in that comment stemmed from me asking a friend 'Hey, so that thing you work on -- looks less flat and more round. What's up with that?'

If I remember correctly, he also mentioned something about the same project being responsible for better stitching and less overlaps/voids in the map.

Thanks for explaining though, helped me understand things a bit better.


S2 has been used inside google for 10+ years.

Honestly, it's one of the best abstractions I've ever used.


Are you sure? I just checked for myself, but (on the google maps version I am served) the south pole is still shows as a black hole when zoomed out far enough that the earth is rendered as a sphere. Also the elongated shape of the tiles near the poles looks an awful lot like a mercator projection.


Pretty sure? I'm just going off a cursory examining of the github repo linked on the website from the OP and a conversation I had in passing with a friend who works on the google maps team.

Also, I'm not a mathematician and everything I know about computer science (and most of math for that matter) I've taught myself or learned on the job. So... maybe I'm using the wrong terminology?

I'm 98% certain the library is the same one currently used on google maps web app.


I find that more annoying than useful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: