https://t.me/AnonymousX5
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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/django/contrib/gis/db/backends/base.pyc
�
r�\c@sxdZddlZddlmZddlmZddlmZdefd��YZ	edefd	��Y�Z
dS(
sk
Base/mixin classes for the spatial backend database operations and the
`SpatialRefSys` model the backend.
i����N(tgdal(tsix(tpython_2_unicode_compatibletBaseSpatialOperationscBs�eZdZiZiZiZiZiZe�Z	iZ
eZeZ
eZeZd
Zd
ZeZeZeZeZeZeZeZeZeZeZeZeZeZeZ eZ!eZ"eZ#eZ$eZ%eZ&eZ'eZ(eZ)eZ*eZ+eZ,eZ-eZ.eZ/eZ0eZ1eZ2eZ3eZ4eZ5eZ6eZ7d�Z8d�Z9d�Z:d�Z;d�Z<d�Z=d�Z>d�Z?d	�Z@d
�ZAd�ZBd�ZCRS(s�
    This module holds the base `BaseSpatialBackend` object, which is
    instantiated by each spatial database backend with the features
    it has.
    cCstd��dS(Ns:Aggregate extent not implemented for this spatial backend.(tNotImplementedError(tselftbox((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytconvert_extentUscCstd��dS(Ns=Aggregate 3D extent not implemented for this spatial backend.(R(RR((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytconvert_extent3dXscCstd��dS(Ns:Aggregate method not implemented for this spatial backend.(R(Rtgeom_valt
geom_field((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytconvert_geom[scCsd|S(Ns'%s'((Rtname((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytgeo_quote_name_scCs
t�dS(si
        Returns the database column type for the geometry field on
        the spatial backend.
        N(R(Rtf((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytgeo_db_typecscCstd��dS(sv
        Returns the distance parameters for the given geometry field,
        lookup value, and lookup type.
        s:Distance operations not available on this spatial backend.N(R(RRtvaluetlookup_type((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytget_distancejscCs
t�dS(s
        Returns the placeholder for the given geometry field with the given
        value.  Depending on the spatial backend, the placeholder may contain a
        stored procedure call to the transformation function of the spatial
        backend.
        N(R(RRR((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytget_geom_placeholderqscCsSx@|jD]5\}}||jkr
dtt|j|��Sq
Wtd��dS(sq
        Helper method to return the quoted column string from the evaluator
        for its expression.
        s%s.%ss-Could not find the column for the expression.N(tcolst
expressionttupletmapt
quote_namet	Exception(Rt	evaluatortexprtcol_tup((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytget_expression_columnzscCstd��dS(Ns;Aggregate support not implemented for this spatial backend.(R(Rtagg((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytspatial_aggregate_sql�scCs
t�dS(N(R(RtlvalueRRtfield((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytspatial_lookup_sql�scCs
t�dS(N(R(R((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytgeometry_columns�scCs
t�dS(N(R(R((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytspatial_ref_sys�sN(Dt__name__t
__module__t__doc__tdistance_functionstgeometry_functionstgeometry_operatorstgeography_operatorstgeography_functionstsett	gis_termsttruncate_paramstFalsetpostgist
spatialitetmysqltoracletNonetspatial_versiontselectt	geographytgeometrytareatcentroidt
differencetdistancetdistance_spheretdistance_spheroidtenvelopet	force_rhrtmem_sizetbounding_circletnum_geomt
num_pointst	perimetertperimeter3dtpoint_on_surfacet
polygonizetreversetscaletsnap_to_gridtsym_differencet	transformt	translatetuniontcollecttextenttextent3dt	make_linetunionaggtgeohashtgeojsontgmltkmltsvgt	from_texttfrom_wkbRRRR
RRRRRR"R#R$(((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyRs~													tSpatialRefSysMixincBseZdZejd�Zejd�Zed��Zed��Z	ed��Z
ed��Zed��Zed��Z
ed	��Zed
��Zed��Zed��Zed
��Zed��Zed��Zed��Zeed��Zd�ZRS(s
    The SpatialRefSysMixin is a class used by the database-dependent
    SpatialRefSys objects to reduce redundnant code.
    sO.+SPHEROID\[\"(?P<name>.+)\",(?P<major>\d+(\.\d+)?),(?P<flattening>\d{3}\.\d+),s�.+UNIT ?\["(?P<unit_name>[\w \'\(\)]+)", ?(?P<unit>[\d\.]+)(,AUTHORITY\["(?P<unit_auth_name>[\w \'\(\)]+)","(?P<unit_auth_val>\d+)"\])?\]([\w ]+)?(,AUTHORITY\["(?P<auth_name>[\w \'\(\)]+)","(?P<auth_val>\d+)"\])?\]$cCs�tjr�t|d�r%|jj�Sy tj|j�|_|jSWntk
rZ}nXy tj|j	�|_|jSWntk
r�}nXtd|j|f��ntd��dS(sO
        Returns a GDAL SpatialReference object, if GDAL is installed.
        t_srss9Could not get OSR SpatialReference from WKT: %s
Error:
%ssGDAL is not installed.N(
RtHAS_GDALthasattrR^tclonetSpatialReferencetwkttsrsRt	proj4text(Rtmsg((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyRd�s	
cCs^tjr|jjS|jj|j�}|rVt|jd��t|jd��fSdSdS(s�
        Returns a tuple of the ellipsoid parameters:
        (semimajor axis, semiminor axis, and inverse flattening).
        tmajort
flatteningN(
RR_Rdt	ellipsoidtspheroid_regextmatchRctfloattgroupR5(Rtm((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyRi�s	
(cCs
|jjS(sReturns the projection name.(RdR(R((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyR�scCs|jdS(s5Returns the spheroid name for this spatial reference.tspheroid(Rd(R((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyRo�scCs|jdS(s-Returns the datum for this spatial reference.tdatum(Rd(R((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyRp�scCs'tjr|jjS|jjd�SdS(s$Is this Spatial Reference projected?tPROJCSN(RR_Rdt	projectedRct
startswith(R((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyRr�s	
cCs'tjr|jjS|jjd�SdS(s Is this Spatial Reference local?tLOCAL_CSN(RR_RdtlocalRcRs(R((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyRu�s	
cCs'tjr|jjS|jjd�SdS(s%Is this Spatial Reference geographic?tGEOGCSN(RR_Rdt
geographicRcRs(R((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyRw�s	
cCsFtjr|jjS|jr dS|jj|j�}|j	d�SdS(sReturns the linear units name.t	unit_nameN(
RR_Rdtlinear_nameRwR5tunits_regexRkRcRm(RRn((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyRy�s	
	cCsFtjr|jjS|jr dS|jj|j�}|j	d�SdS(sReturns the linear units.tunitN(
RR_Rdtlinear_unitsRwR5RzRkRcRm(RRn((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyR|s	
	cCsFtjr|jjS|jr dS|jj|j�}|j	d�SdS(s&Returns the name of the angular units.RxN(
RR_Rdtangular_nameRrR5RzRkRcRm(RRn((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyR}s	
	cCsFtjr|jjS|jr dS|jj|j�}|j	d�SdS(sReturns the angular units.R{N(
RR_Rdt
angular_unitsRrR5RzRkRcRm(RRn((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyR~s	
	cCsC|js|jr"|j|jfS|jr;|j|jfSdSdS(s*Returns a tuple of the units and the name.N(NN(RrRuR|RyRwR~R}R5(R((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytunits"s
	cCsKtjrtj|�jS|jj|�}|jd�|jd�fSdS(s�
        Class method used by GeometryField on initialization to
        retrive the units on the given WKT, without having to use
        any of the database fields.
        R{RxN(RR_RbRRzRkRm(tclsRcRn((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyt	get_units,s	c	Cs�tjr.tj|�}|j}|d}nX|jj|�}|r�t|jd��t|jd��f}|jd�}nd	S|s�||fSt	|�dkr�|d|d}}n|\}}d|||fSd	S(
s�
        Class method used by GeometryField on initialization to
        retrieve the `SPHEROID[..]` parameters from the given WKT.
        RoRgRhRiiisSPHEROID["%s",%s,%s]N(
RR_RbRiRjRkRlRmR5tlen(	R�RctstringRdt
sphere_paramstsphere_nameRntradiusRh((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pytget_spheroid9s		
*
cCs/ytj|j�SWntj|j�SXdS(sp
        Returns the string representation.  If GDAL is installed,
        it will be 'pretty' OGC WKT.
        N(Rt	text_typeRdRc(R((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyt__str__Us(R%R&R'tretcompileRjRztpropertyRdRiRRoRpRrRuRwRyR|R}R~RtclassmethodR�tTrueR�R�(((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyR]�s(


(R'R�tdjango.contrib.gisRtdjango.utilsRtdjango.utils.encodingRtobjectRR](((sE/tmp/pip-install-XxeQeY/django/django/contrib/gis/db/backends/base.pyt<module>s�

https://t.me/AnonymousX5 - 2025