o
    ˜¨ÊhŠ  ã                   @   sF   d Z ddlmZ ddlmZ G dd„ dejƒZG dd„ dejeƒZdS )	zK
 The GeometryColumns and SpatialRefSys models for the SpatiaLite backend.
é    )ÚSpatialRefSysMixin)Úmodelsc                   @   s~   e Zd ZdZejdd�Zejdd�Ze ¡ Z	ejdd�Z
e ¡ Zejdd�ZG dd	„ d	ƒZd
d„ Zedd„ ƒZedd„ ƒZdS )ÚSpatialiteGeometryColumnsz7
    The 'geometry_columns' table from SpatiaLite.
    é   ©Ú
max_lengthT©Úprimary_keyÚgeometry_type)Ú	db_columnc                   @   ó   e Zd ZdZdZdZdS )zSpatialiteGeometryColumns.MetaÚgisÚgeometry_columnsFN©Ú__name__Ú
__module__Ú__qualname__Ú	app_labelÚdb_tableÚmanaged© r   r   úb/var/www/html/env/lib/python3.10/site-packages/django/contrib/gis/db/backends/spatialite/models.pyÚMeta   ó    r   c                 C   s   d| j | j| j| j| jf S )Nz%s.%s - %dD %s field (SRID: %d))Úf_table_nameÚf_geometry_columnÚcoord_dimensionÚtypeÚsrid©Úselfr   r   r   Ú__str__   s   ûz!SpatialiteGeometryColumns.__str__c                 C   ó   dS )zf
        Return the name of the metadata column used to store the feature table
        name.
        r   r   ©Úclsr   r   r   Útable_name_col"   ó   z(SpatialiteGeometryColumns.table_name_colc                 C   r"   )zk
        Return the name of the metadata column used to store the feature
        geometry column.
        r   r   r#   r   r   r   Úgeom_col_name*   r&   z'SpatialiteGeometryColumns.geom_col_nameN)r   r   r   Ú__doc__r   Ú	CharFieldr   r   ÚIntegerFieldr   r   Úspatial_index_enabledr   r   r!   Úclassmethodr%   r'   r   r   r   r   r      s    	
r   c                   @   sn   e Zd ZdZejdd�Zejdd�Ze ¡ Z	ejdd�Z
ejdd�Zejdd�ZG dd„ dƒZed	d
„ ƒZdS )ÚSpatialiteSpatialRefSysz6
    The 'spatial_ref_sys' table from SpatiaLite.
    Tr   r   r   i   c                   @   r   )zSpatialiteSpatialRefSys.Metar   Úspatial_ref_sysFNr   r   r   r   r   r   ?   r   r   c                 C   s   | j S )N)Úsrtextr   r   r   r   ÚwktD   s   zSpatialiteSpatialRefSys.wktN)r   r   r   r(   r   r*   r   r)   Ú	auth_nameÚ	auth_sridÚref_sys_nameÚ	proj4textr/   r   Úpropertyr0   r   r   r   r   r-   3   s    r-   N)r(   Ú*django.contrib.gis.db.backends.base.modelsr   Ú	django.dbr   ÚModelr   r-   r   r   r   r   Ú<module>   s
    +