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 :  /lib64/python2.7/site-packages/django/contrib/gis/gdal/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/contrib/gis/gdal/srs.pyc
�
r�\c@s�dZddlmZmZmZddlmZddlmZddl	m
Zddlm
Z
ddlmZdefd	��YZd
efd��YZdS(
sk
  The Spatial Reference class, represensents OGR Spatial Reference objects.

  Example:
  >>> from django.contrib.gis.gdal import SpatialReference
  >>> srs = SpatialReference('WGS84')
  >>> print(srs)
  GEOGCS["WGS 84",
      DATUM["WGS_1984",
          SPHEROID["WGS 84",6378137,298.257223563,
              AUTHORITY["EPSG","7030"]],
          TOWGS84[0,0,0,0,0,0,0],
          AUTHORITY["EPSG","6326"]],
      PRIMEM["Greenwich",0,
          AUTHORITY["EPSG","8901"]],
      UNIT["degree",0.01745329251994328,
          AUTHORITY["EPSG","9122"]],
      AUTHORITY["EPSG","4326"]]
  >>> print(srs.proj)
  +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
  >>> print(srs.ellipsoid)
  (6378137.0, 6356752.3142451793, 298.25722356300003)
  >>> print(srs.projected, srs.geographic)
  False True
  >>> srs.import_epsg(32140)
  >>> print(srs.name)
  NAD83 / Texas South Central
i����(tbyreftc_char_ptc_int(tGDALBase(tSRSException(tsrs(tsix(tforce_bytestSpatialReferencecBs�eZdZdd�Zd�Zd�Zd�Zdd�Zd�Zd	�Z	d
�Z
d�Zd�Zd
�Z
d�Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zd�Zd�Zd�Z d �Z!d!�Z"ed"��Z#edd#��Z$ed$��Z%ed%��Z&edd&��Z'RS('s�
    A wrapper for the OGRSpatialReference object.  According to the GDAL Web site,
    the SpatialReference object "provide[s] services to represent coordinate
    systems (projections and datums) and to transform between them."
    tcCsGd}t|tj�rmt|tj�r<|jd�}nyt|�}d|}Wq�tk
riq�XnLt|tj�r�d}n1t||j�r�|}d}nt	d|��|dkr�|}nt
d�}tj|�}|st
d|��n	||_|dkr'|j|�n|dkrC|j|�nd	S(
s'
        Creates a GDAL OSR Spatial Reference object from the given input.
        The input may be string of OGC Well Known Text (WKT), an integer
        EPSG code, a PROJ.4 string, and/or a projection "well known" shorthand
        string (one of 'WGS84', 'WGS72', 'NAD27', 'NAD83').
        tusertasciisEPSG:%dtepsgtogrsInvalid SRS type "%s"R	s+Could not create spatial reference from: %sN(t
isinstanceRtstring_typest	text_typetencodetintt
ValueErrort
integer_typestptr_typet	TypeErrorRtcapitnew_srsRtptrtimport_user_inputtimport_epsg(tselft	srs_inputtsrs_typetsridRtbuf((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyt__init__1s4
				cCs |jrtj|j�ndS(s Destroys this spatial reference.N(t_ptrRtrelease_srs(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyt__del__bs	cCs-t|t�r|j|�S|j|�SdS(s�
        Returns the value of the given string attribute node, None if the node
        doesn't exist.  Can also take a tuple as a parameter, (target, child),
        where child is the index of the attribute in the WKT.  For example:

        >>> wkt = 'GEOGCS["WGS 84", DATUM["WGS_1984, ... AUTHORITY["EPSG","4326"]]')
        >>> srs = SpatialReference(wkt) # could also use 'WGS84', or 4326
        >>> print(srs['GEOGCS'])
        WGS 84
        >>> print(srs['DATUM'])
        WGS_1984
        >>> print(srs['AUTHORITY'])
        EPSG
        >>> print(srs['AUTHORITY', 1]) # The authority value
        4326
        >>> print(srs['TOWGS84', 4]) # the fourth value in this wkt
        0
        >>> print(srs['UNIT|AUTHORITY']) # For the units authority, have to use the pipe symbole.
        EPSG
        >>> print(srs['UNIT|AUTHORITY', 1]) # The authority value for the untis
        9122
        N(Rttuplet
attr_value(Rttarget((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyt__getitem__fs
cCs|jS(s,The string representation uses 'pretty' WKT.(t
pretty_wkt(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyt__str__�sicCsHt|tj�s#t|t�r,t�ntj|jt|�|�S(s�
        The attribute value for the given target node (e.g. 'PROJCS'). The index
        keyword specifies an index of the child node to return.
        (	RRRRRRtget_attr_valueRR(RR'tindex((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR&�s#	cCstj|jt|��S(s<Returns the authority name for the given string target node.(Rt
get_auth_nameRR(RR'((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyt	auth_name�scCstj|jt|��S(s<Returns the authority code for the given string target node.(Rt
get_auth_codeRR(RR'((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyt	auth_code�scCsttj|j��S(s0Returns a clone of this SpatialReference object.(RRt	clone_srsR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pytclone�scCstj|j�dS(s8Morphs this SpatialReference from ESRI's format to EPSG.N(Rtmorph_from_esriR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyt	from_esri�scCstj|j�dS(s�
        This method inspects the WKT of this SpatialReference, and will
        add EPSG authority nodes where an EPSG identifier is applicable.
        N(Rt
identify_epsgR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR5�scCstj|j�dS(s.Morphs this SpatialReference to ESRI's format.N(Rt
morph_to_esriR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pytto_esri�scCstj|j�dS(s6Checks to see if the given spatial reference is valid.N(Rtsrs_validateR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pytvalidate�scCsJ|jr|jd�S|jr,|jd�S|jrB|jd�SdSdS(s+Returns the name of this Spatial Reference.tPROJCStGEOGCStLOCAL_CSN(t	projectedR&t
geographictlocaltNone(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pytname�s	
	
	
cCs9yt|jdd��SWnttfk
r4dSXdS(s>Returns the SRID of top-level authority, or None if undefined.t	AUTHORITYiN(RR&RRR@(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR�scCs(tj|jtt���\}}|S(s%Returns the name of the linear units.(Rtlinear_unitsRRR(RtunitsRA((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pytlinear_name�s$cCs(tj|jtt���\}}|S(s&Returns the value of the linear units.(RRCRRR(RRDRA((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyRC�s$cCs(tj|jtt���\}}|S(s&Returns the name of the angular units.(Rt
angular_unitsRRR(RRDRA((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pytangular_name�s$cCs(tj|jtt���\}}|S(s'Returns the value of the angular units.(RRFRRR(RRDRA((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyRF�s$cCs�d\}}|js|jrEtj|jtt���\}}n0|jrutj	|jtt���\}}n|dk	r�|j
�n||fS(s�
        Returns a 2-tuple of the units value and the units name,
        and will automatically determines whether to return the linear
        or angular units.
        N(NN(R@R=R?RRCRRRR>RFtdecode(RRDRA((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyRD�s'	'
cCs|j|j|jfS(s�
        Returns a tuple of the ellipsoid parameters:
         (semimajor axis, semiminor axis, and inverse flattening)
        (t
semi_majort
semi_minortinverse_flattening(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyt	ellipsoid�scCstj|jtt���S(s7Returns the Semi Major Axis for this Spatial Reference.(RRIRRR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyRI�scCstj|jtt���S(s7Returns the Semi Minor Axis for this Spatial Reference.(RRJRRR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyRJ�scCstj|jtt���S(s:Returns the Inverse Flattening for this Spatial Reference.(Rt
invflatteningRRR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyRK�scCsttj|j��S(se
        Returns True if this SpatialReference is geographic
         (root node is GEOGCS).
        (tboolRtisgeographicR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR>scCsttj|j��S(sGReturns True if this SpatialReference is local (root node is LOCAL_CS).(RNRtislocalR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR?
scCsttj|j��S(sx
        Returns True if this SpatialReference is a projected coordinate system
         (root node is PROJCS).
        (RNRtisprojectedR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR=scCstj|j|�dS(s>Imports the Spatial Reference from the EPSG code (an integer).N(Rt	from_epsgR(RR((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyRscCstj|j|�dS(s3Imports the Spatial Reference from a PROJ.4 string.N(Rt	from_projR(Rtproj((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pytimport_projscCstj|jt|��dS(s?Imports the Spatial Reference from the given user input string.N(Rtfrom_user_inputRR(Rt
user_input((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR scCs#tj|jtt|���dS(s3Imports the Spatial Reference from OGC WKT (string)N(Rtfrom_wktRRR(Rtwkt((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyt
import_wkt$scCstj|j|�dS(s1Imports the Spatial Reference from an XML string.N(Rtfrom_xmlR(Rtxml((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyt
import_xml(scCstj|jtt���S(s9Returns the WKT representation of this Spatial Reference.(Rtto_wktRRR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyRY-scCstj|jtt��|�S(s/Returns the 'pretty' representation of the WKT.(Rt
to_pretty_wktRRR(Rtsimplify((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR)2scCstj|jtt���S(s=Returns the PROJ.4 representation for this Spatial Reference.(Rtto_projRRR(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyRT7scCs|jS(sAlias for proj().(RT(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pytproj4<scCstj|jtt��|�S(s9Returns the XML representation of this Spatial Reference.(Rtto_xmlRRR(Rtdialect((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR\As((t__name__t
__module__t__doc__R!R$R(R*R&R.R0R2R4R5R7R9tpropertyRARRERCRGRFRDRLRIRJRKR>R?R=RRURRZR]RYR)RTRbR\(((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR)sN1																		tCoordTransformcBs)eZdZd�Zd�Zd�ZRS(s,The coordinate system transformation object.cCsft|t�s t|t�r/td��ntj|j|j�|_|j|_|j|_	dS(s<Initializes on a source and target SpatialReference objects.s2source and target must be of type SpatialReferenceN(
RRRRtnew_ctR"RRAt
_srs1_namet
_srs2_name(RtsourceR'((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR!Is
 cCs |jrtj|j�ndS(s.Deletes this Coordinate Transformation object.N(R"Rt
destroy_ct(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR$Qs	cCsd|j|jfS(NsTransform from "%s" to "%s"(RkRl(R((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyR*Us(ReRfRgR!R$R*(((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyRiFs		N(RgtctypesRRRtdjango.contrib.gis.gdal.baseRtdjango.contrib.gis.gdal.errorRt"django.contrib.gis.gdal.prototypesRRtdjango.utilsRtdjango.utils.encodingRRRi(((s=/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/srs.pyt<module>s�

https://t.me/AnonymousX5 - 2025