ó
Š*Pc           @   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   models(   t   SpatialRefSysMixin(   t   python_2_unicode_compatiblet   GeometryColumnsc           B   s¨   e  Z d  Z e j d d ƒ Z e j d d ƒ Z e j d d ƒ Z e j ƒ  Z	 e j d e
 ƒ Z e j ƒ  Z d d
 d „  ƒ  YZ e d „  ƒ Z e d „  ƒ Z d	 „  Z RS(   s7   
    The 'geometry_columns' table from SpatiaLite.
    t
   max_lengthi   i   t   primary_keyt   Metac           B   s   e  Z d  Z e Z RS(   t   geometry_columns(   t   __name__t
   __module__t   db_tablet   Falset   managed(    (    (    sI   ../Django//lib/python/django/contrib/gis/db/backends/spatialite/models.pyR      s   c         C   s   d S(   sk   
        Returns the name of the metadata column used to store the
        the feature table name.
        t   f_table_name(    (   t   cls(    (    sI   ../Django//lib/python/django/contrib/gis/db/backends/spatialite/models.pyt   table_name_col   s    c         C   s   d S(   sp   
        Returns the name of the metadata column used to store the
        the feature geometry column.
        t   f_geometry_column(    (   R   (    (    sI   ../Django//lib/python/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(    (    sI   ../Django//lib/python/django/contrib/gis/db/backends/spatialite/models.pyt   __str__(   s    (    (   R   R	   t   __doc__R    t	   CharFieldR   R   R   t   IntegerFieldR   t   TrueR   t   spatial_index_enabledR   t   classmethodR   R   R   (    (    (    sI   ../Django//lib/python/django/contrib/gis/db/backends/spatialite/models.pyR      s   t   SpatialRefSysc           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 d „  ƒ Z d d d „  ƒ  YZ RS(	   s6   
    The 'spatial_ref_sys' table from SpatiaLite.
    R   R   i   i   c         C   s    d d l  m } | |  j ƒ j S(   Niÿÿÿÿ(   t   SpatialReference(   t   django.contrib.gis.gdalR   t	   proj4textt   wkt(   R   R   (    (    sI   ../Django//lib/python/django/contrib/gis/db/backends/spatialite/models.pyR!   7   s    R   c           B   s   e  Z d  Z e Z RS(   t   spatial_ref_sys(   R   R	   R
   R   R   (    (    (    sI   ../Django//lib/python/django/contrib/gis/db/backends/spatialite/models.pyR   <   s   (    (   R   R	   R   R    R   R   R   R   t	   auth_namet	   auth_sridt   ref_sys_nameR    t   propertyR!   R   (    (    (    sI   ../Django//lib/python/django/contrib/gis/db/backends/spatialite/models.pyR   -   s   N(
   R   t	   django.dbR    t#   django.contrib.gis.db.backends.baseR   t   django.utils.encodingR   t   ModelR   R   (    (    (    sI   ../Django//lib/python/django/contrib/gis/db/backends/spatialite/models.pyt   <module>   s   $