ó
rąE^c           @   s:   d  d l  m Z d  d l m Z d e f d     YZ d S(   i   (   t   GEOSBase(   t   preparedt   PreparedGeometryc           B   sz   e  Z d  Z e j Z e j Z d   Z d   Z	 d   Z
 d   Z d   Z d   Z d   Z d   Z d	   Z d
   Z RS(   s   
    A geometry that is prepared for performing certain operations.
    At the moment this includes the contains covers, and intersects
    operations.
    c         C   sJ   | |  _  d d l m } t | |  s1 t  n  t j | j  |  _ d  S(   Ni   (   t   GEOSGeometry(   t
   _base_geomt   geometryR   t
   isinstancet	   TypeErrort   capit   geos_preparet   ptr(   t   selft   geomR   (    (    sB   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/geos/prepared.pyt   __init__   s
    		c         C   s   t  j |  j | j  S(   N(   R   t   prepared_containsR
   (   R   t   other(    (    sB   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/geos/prepared.pyt   contains   s    c         C   s   t  j |  j | j  S(   N(   R   t   prepared_contains_properlyR
   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/geos/prepared.pyt   contains_properly   s    c         C   s   t  j |  j | j  S(   N(   R   t   prepared_coversR
   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/geos/prepared.pyt   covers   s    c         C   s   t  j |  j | j  S(   N(   R   t   prepared_intersectsR
   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/geos/prepared.pyt
   intersects!   s    c         C   s   t  j |  j | j  S(   N(   R   t   prepared_crossesR
   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/geos/prepared.pyt   crosses$   s    c         C   s   t  j |  j | j  S(   N(   R   t   prepared_disjointR
   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/geos/prepared.pyt   disjoint'   s    c         C   s   t  j |  j | j  S(   N(   R   t   prepared_overlapsR
   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/geos/prepared.pyt   overlaps*   s    c         C   s   t  j |  j | j  S(   N(   R   t   prepared_touchesR
   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/geos/prepared.pyt   touches-   s    c         C   s   t  j |  j | j  S(   N(   R   t   prepared_withinR
   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/geos/prepared.pyt   within0   s    (   t   __name__t
   __module__t   __doc__R   t   PREPGEOM_PTRt   ptr_typet   prepared_destroyt
   destructorR   R   R   R   R   R   R   R   R   R    (    (    (    sB   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/geos/prepared.pyR      s   			
								N(   t   baseR    t
   prototypesR   R   R   (    (    (    sB   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/geos/prepared.pyt   <module>   s   