3 static inline unsigned int xy2tile(unsigned int x, unsigned int y)
8 for (i = 15; i >= 0; i--)
10 tile = (tile << 1) | ((x >> i) & 1);
11 tile = (tile << 1) | ((y >> i) & 1);
17 static inline unsigned int lon2x(double lon)
19 return round((lon + 180.0) * 65535.0 / 360.0);
22 static inline unsigned int lat2y(double lat)
24 return round((lat + 90.0) * 65535.0 / 180.0);