ó
O'—^c           @   sY   d  d l  m Z m Z m Z m Z m Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d S(   iÿÿÿÿ(   t   pit   atant   sinht   degreest   powc         C   s   t  d |  ƒ S(   Ni   (   t   math_pow(   t   z(    (    s>   /tmp/pip-unpacked-wheel-aI1tzL/rest_framework_gis/tilenames.pyt	   num_tiles   s    c         C   sd   t  | ƒ } d | } |  | } | | } t t d d | ƒ } t t d d | ƒ } | | f S(   Ni   i   (   R   t   mercator_to_latR    (   t   yR   t   nt   unitt   relY1t   relY2t   lat1t   lat2(    (    s>   /tmp/pip-unpacked-wheel-aI1tzL/rest_framework_gis/tilenames.pyt	   lat_edges   s    


c         C   s8   t  | ƒ } d | } d |  | } | | } | | f S(   Nih  iLÿÿÿ(   R   (   t   xR   R
   R   t   lon1t   lon2(    (    s>   /tmp/pip-unpacked-wheel-aI1tzL/rest_framework_gis/tilenames.pyt	   lon_edges   s
    

c         C   s:   t  | | ƒ \ } } t |  | ƒ \ } } | | | | f S(   N(   R   R   (   R   R	   R   R   R   R   R   (    (    s>   /tmp/pip-unpacked-wheel-aI1tzL/rest_framework_gis/tilenames.pyt
   tile_edges$   s    c         C   s   t  t t |  ƒ ƒ ƒ S(   N(   R   R   R   (   t	   mercatorY(    (    s>   /tmp/pip-unpacked-wheel-aI1tzL/rest_framework_gis/tilenames.pyR   *   s    N(   t   mathR    R   R   R   R   R   R   R   R   R   R   (    (    (    s>   /tmp/pip-unpacked-wheel-aI1tzL/rest_framework_gis/tilenames.pyt   <module>   s
   (		
		