ó
*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(
   sH   
 The GeometryColumns and SpatialRefSys models for the PostGIS 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 d d  Z e j	   Z
 e j	 d e  Z e j d d  Z d d
 d     YZ e d    Z e d    Z d	   Z RS(   sh   
    The 'geometry_columns' table from the PostGIS. See the PostGIS
    documentation at Ch. 4.2.2.
    t
   max_lengthi   t   primary_keyi   t   Metac           B   s   e  Z d  Z e Z RS(   t   geometry_columns(   t   __name__t
   __module__t   db_tablet   Falset   managed(    (    (    sF   ../Django//lib/python/django/contrib/gis/db/backends/postgis/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(    (    sF   ../Django//lib/python/django/contrib/gis/db/backends/postgis/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   (    (    sF   ../Django//lib/python/django/contrib/gis/db/backends/postgis/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(    (    sF   ../Django//lib/python/django/contrib/gis/db/backends/postgis/models.pyt   __str__*   s    (    (   R   R	   t   __doc__R    t	   CharFieldt   f_table_catalogt   f_table_schemaR   R   t   IntegerFieldR   t   TrueR   R   R   t   classmethodR   R   R   (    (    (    sF   ../Django//lib/python/django/contrib/gis/db/backends/postgis/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 d d	 d     YZ e d    Z e d    Z RS(
   sc   
    The 'spatial_ref_sys' table from PostGIS. See the PostGIS
    documentaiton at Ch. 4.2.1.
    R   R   i   i   R   c           B   s   e  Z d  Z e Z RS(   t   spatial_ref_sys(   R   R	   R
   R   R   (    (    (    sF   ../Django//lib/python/django/contrib/gis/db/backends/postgis/models.pyR   :   s   c         C   s   |  j  S(   N(   t   srtext(   R   (    (    sF   ../Django//lib/python/django/contrib/gis/db/backends/postgis/models.pyt   wkt>   s    c         C   s   d S(   NR    (    (   R   (    (    sF   ../Django//lib/python/django/contrib/gis/db/backends/postgis/models.pyt   wkt_colB   s    (    (   R   R	   R   R    R   R   R   R   t	   auth_namet	   auth_sridR    t	   proj4textR   t   propertyR!   R   R"   (    (    (    sF   ../Django//lib/python/django/contrib/gis/db/backends/postgis/models.pyR   /   s   N(
   R   t	   django.dbR    t#   django.contrib.gis.db.backends.baseR   t   django.utils.encodingR   t   ModelR   R   (    (    (    sF   ../Django//lib/python/django/contrib/gis/db/backends/postgis/models.pyt   <module>   s   &