|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /usr/lib64/python2.7/site-packages/django/contrib/gis/db/backends/postgis/ |
Upload File : |
�
r�\c @ sP d d l m Z d d l m Z d e f d � � YZ d e f d � � YZ d S( i����( t DatabaseIntrospection( t OGRGeomTypet GeoIntrospectionErrorc B s e Z RS( ( t __name__t
__module__( ( ( sV /tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/postgis/introspection.pyR s t PostGISIntrospectionc B sE e Z i Z e j d d d d d g Z d � Z d � Z d � Z RS( t geography_columnst geometry_columnst raster_columnst spatial_ref_syst raster_overviewsc C s� | j j � } d } zz | j | d � | j � d } i d | 6} | j j j r� | j | d � | j � d } d i t d 6f | | <n Wd | j � X| S( s�
Returns a dictionary with keys that are the PostgreSQL object
identification integers for the PostGIS geometry and/or
geography types (if supported).
s0 SELECT "oid" FROM "pg_type" WHERE "typname" = %st geometryi t
GeometryFieldt geographyN( R ( s geography( t
connectiont cursort executet fetchonet opsR
t Truet close( t selfR t oid_sqlt GEOM_TYPEt
postgis_typest GEOG_TYPE( ( sV /tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/postgis/introspection.pyt get_postgis_types s
c C sG | j s. | j � | _ | j j | j � n t t | � j | | � S( N( t postgis_types_reverseR t data_types_reverset updatet superR t get_field_type( R t data_typet description( ( sV /tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/postgis/introspection.pyR 0 s c C s& | j j � } z� y5 | j d | | f � | j � } | sF t � n WnE t k
r� | j j j r� | j d | | f � | j � } q� n X| s� t d | | f � � n t | d � j } | d } | d } i } | d k r� | | d <n | d k r
| | d <n Wd
| j
� X| | f S( s%
The geometry type OID used by PostGIS does not indicate the particular
type of field that a geometry column is (e.g., whether it's a
PointField or a PolygonField). Thus, this routine queries the PostGIS
metadata tables to determine the geometry type,
ss SELECT "coord_dimension", "srid", "type" FROM "geometry_columns" WHERE "f_table_name"=%s AND "f_geometry_column"=%ssu SELECT "coord_dimension", "srid", "type" FROM "geography_columns" WHERE "f_table_name"=%s AND "f_geography_column"=%ss; Could not find a geometry or geography column for "%s"."%s"i i i i� t sridt dimN( R R R R R R R
t ExceptionR t djangoR ( R t
table_namet geo_colR t rowt
field_typeR# R"