ó
i4Vdc           @   s   d  e  f d „  ƒ  YZ d S(   t   BaseSpatialOperationsc           B   sÊ  e  Z d  Z i  Z e Z e Z e Z e Z d( Z
 d( Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z  e Z! e Z" e Z# e Z$ d) Z% d Z& i  Z' d d d d d d d d	 d
 d d d d d d d d d d d d d d d d d h Z( e Z) e Z* e Z+ e Z, e Z- e Z. e Z/ d „  Z0 d „  Z1 d „  Z2 d „  Z3 d  „  Z4 d! „  Z5 d" „  Z6 d# „  Z7 d$ „  Z8 d% „  Z9 d& „  Z: d' „  Z; RS(*   sš   
    This module holds the base `BaseSpatialBackend` object, which is
    instantiated by each spatial database backend with the features
    it has.
    t    t   Areat	   AsGeoJSONt   AsGMLt   AsKMLt   AsSVGt   BoundingCirclet   Centroidt
   Differencet   Distancet   Envelopet   ForceRHRt   GeoHasht   Intersectiont   Lengtht   MemSizet   NumGeometriest	   NumPointst	   Perimetert   PointOnSurfacet   Reverset   Scalet
   SnapToGridt   SymDifferencet	   Transformt	   Translatet   Unionc         C   s   t  d ƒ ‚ d  S(   Ns:   Aggregate extent not implemented for this spatial backend.(   t   NotImplementedError(   t   selft   boxt   srid(    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyt   convert_extentP   s    c         C   s   t  d ƒ ‚ d  S(   Ns=   Aggregate 3D extent not implemented for this spatial backend.(   R   (   R   R   R   (    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyt   convert_extent3dS   s    c         C   s   t  d ƒ ‚ d  S(   Ns:   Aggregate method not implemented for this spatial backend.(   R   (   R   t   geom_valt
   geom_field(    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyt   convert_geomV   s    c         C   s   d | S(   Ns   '%s'(    (   R   t   name(    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyt   geo_quote_nameZ   s    c         C   s   t  d ƒ ‚ d S(   si   
        Returns the database column type for the geometry field on
        the spatial backend.
        sG   subclasses of BaseSpatialOperations must provide a geo_db_type() methodN(   R   (   R   t   f(    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyt   geo_db_type^   s    c         C   s   t  d ƒ ‚ d S(   sv   
        Returns the distance parameters for the given geometry field,
        lookup value, and lookup type.
        s:   Distance operations not available on this spatial backend.N(   R   (   R   R'   t   valuet   lookup_type(    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyt   get_distancee   s    c         C   s   t  d ƒ ‚ d S(   s  
        Returns the placeholder for the given geometry field with the given
        value.  Depending on the spatial backend, the placeholder may contain a
        stored procedure call to the transformation function of the spatial
        backend.
        sN   subclasses of BaseSpatialOperations must provide a geo_db_placeholder() methodN(   R   (   R   R'   R)   t   compiler(    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyt   get_geom_placeholderl   s    c         C   sB   t  | |  j ƒ r( t d | j ƒ ‚ n  t t |  ƒ j | ƒ d  S(   NsA   %s spatial aggregation is not supported by this database backend.(   t
   isinstancet   disallowed_aggregatesR   R%   t   superR    t   check_expression_support(   R   t
   expression(    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyR1   u   s    c         C   s   t  d ƒ ‚ d  S(   Ns;   Aggregate support not implemented for this spatial backend.(   R   (   R   t   agg_name(    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyt   spatial_aggregate_name|   s    c         C   s<   | |  j  k r" t d | ƒ ‚ n  |  j j | |  j | ƒ S(   Ns-   This backend doesn't support the %s function.(   t   unsupported_functionsR   t   function_namest   gett   geom_func_prefix(   R   t	   func_name(    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyt   spatial_function_name   s    c         C   s   t  d ƒ ‚ d  S(   NsM   Subclasses of BaseSpatialOperations must provide a geometry_columns() method.(   R   (   R   (    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyt   geometry_columns…   s    c         C   s   t  d ƒ ‚ d  S(   NsK   subclasses of BaseSpatialOperations must a provide spatial_ref_sys() method(   R   (   R   (    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyt   spatial_ref_sysˆ   s    N(    (<   t   __name__t
   __module__t   __doc__t   truncate_paramst   Falset   postgist
   spatialitet   mysqlt   oraclet   Nonet   spatial_versiont   selectt	   geographyt   geometryt   areat   bounding_circlet   centroidt
   differencet   distancet   distance_spheret   distance_spheroidt   envelopet	   force_rhrt   mem_sizet   num_geomt
   num_pointst	   perimetert   perimeter3dt   point_on_surfacet
   polygonizet   reverset   scalet   snap_to_gridt   sym_differencet	   transformt	   translatet   unionR/   R8   R6   R5   t   geohasht   geojsont   gmlt   kmlt   svgt	   from_textt   from_wkbR    R!   R$   R&   R(   R+   R-   R1   R4   R:   R;   R<   (    (    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyR       sz   													N(   t   objectR    (    (    (    s|   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/operations.pyt   <module>   R   