ó
rąE^c           @   su   d  Z  d d l m Z d d l m Z d d l m Z e d e j f d     Y Z d e j e f d     YZ	 d	 S(
   sK   
 The GeometryColumns and SpatialRefSys models for the SpatiaLite backend.
iĸĸĸĸ(   t   SpatialRefSysMixin(   t   models(   t   python_2_unicode_compatiblet   SpatialiteGeometryColumnsc           B   sĻ   e  Z d  Z e j d d  Z e j d d  Z e j   Z e j d e	  Z
 e j   Z e j d d  Z d d d     YZ e d    Z e d	    Z d
   Z RS(   s7   
    The 'geometry_columns' table from SpatiaLite.
    t
   max_lengthi   t   primary_keyt	   db_columnt   geometry_typet   Metac           B   s   e  Z d  Z d Z e Z RS(   t   gist   geometry_columns(   t   __name__t
   __module__t	   app_labelt   db_tablet   Falset   managed(    (    (    sR   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/db/backends/spatialite/models.pyR      s   c         C   s   d S(   sg   
        Returns the name of the metadata column used to store the feature table
        name.
        t   f_table_name(    (   t   cls(    (    sR   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/db/backends/spatialite/models.pyt   table_name_col   s    c         C   s   d S(   sl   
        Returns the name of the metadata column used to store the feature
        geometry column.
        t   f_geometry_column(    (   R   (    (    sR   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/db/backends/spatialite/models.pyt   geom_col_name"   s    c         C   s&   d |  j  |  j |  j |  j |  j f S(   Ns   %s.%s - %dD %s field (SRID: %d)(   R   R   t   coord_dimensiont   typet   srid(   t   self(    (    sR   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/db/backends/spatialite/models.pyt   __str__*   s    (    (   R   R   t   __doc__R   t	   CharFieldR   R   t   IntegerFieldR   t   TrueR   t   spatial_index_enabledR   R   t   classmethodR   R   R   (    (    (    sR   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/db/backends/spatialite/models.pyR   	   s   t   SpatialiteSpatialRefSysc           B   s   e  Z d  Z e j d e  Z e j d d  Z e j   Z	 e j d d  Z
 e j d d  Z e j d d  Z e d    Z d d d     YZ RS(	   s6   
    The 'spatial_ref_sys' table from SpatiaLite.
    R   R   i   i   c         C   s   |  j  S(   N(   t   srtext(   R   (    (    sR   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/db/backends/spatialite/models.pyt   wkt;   s    R   c           B   s   e  Z d  Z d Z e Z RS(   R	   t   spatial_ref_sys(   R   R   R   R   R   R   (    (    (    sR   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/db/backends/spatialite/models.pyR   ?   s   (    (   R   R   R   R   R   R   R   R   t	   auth_namet	   auth_sridt   ref_sys_namet	   proj4textR"   t   propertyR#   R   (    (    (    sR   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/db/backends/spatialite/models.pyR!   0   s   N(
   R   t*   django.contrib.gis.db.backends.base.modelsR    t	   django.dbR   t   django.utils.encodingR   t   ModelR   R!   (    (    (    sR   /tmp/pip-unpacked-wheel-4tV8Ix/django/contrib/gis/db/backends/spatialite/models.pyt   <module>   s   &