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/geometries.pyc
�
r�\c@s�dZddlZddlmZmZddlmZmZmZm	Z	m
Z
mZddlm
Z
ddlmZddlmZmZddlmZmZmZdd	lmZdd
lmZddlmZmZddlmZ m!Z"dd
l#m$Z$m%Z%m&Z&ddl'm(Z(ddl)m*Z*defd��YZ+de+fd��YZ,de+fd��YZ-de-fd��YZ.de+fd��YZ/de+fd��YZ0de0fd��YZ1de0fd��YZ2d e0fd!��YZ3ie,d"6e-d#6e/d$6e1d%6e2d&6e3d'6e0d(6e.d)6e,d"ej46e-d#ej46e/d$ej46e1d%ej46e2d&ej46e3d'ej46e0d(ej46Z5dS(*s�
 The OGRGeometry is a wrapper for using the OGR Geometry class
 (see http://www.gdal.org/ogr/classOGRGeometry.html).  OGRGeometry
 may be instantiated when reading geometries from OGR Data Sources
 (e.g. SHP files), or when given OGC WKT (a string).

 While the 'full' API is not present yet, the API is "pythonic" unlike
 the traditional and "next-generation" OGR Python bindings.  One major
 advantage OGR Geometries have over their GEOS counterparts is support
 for spatial reference systems and their transformation.

 Example:
  >>> from django.contrib.gis.gdal import OGRGeometry, OGRGeomType, SpatialReference
  >>> wkt1, wkt2 = 'POINT(-90 30)', 'POLYGON((0 0, 5 0, 5 5, 0 5)'
  >>> pnt = OGRGeometry(wkt1)
  >>> print(pnt)
  POINT (-90 30)
  >>> mpnt = OGRGeometry(OGRGeomType('MultiPoint'), SpatialReference('WGS84'))
  >>> mpnt.add(wkt1)
  >>> mpnt.add(wkt1)
  >>> print(mpnt)
  MULTIPOINT (-90 30,-90 30)
  >>> print(mpnt.srs.name)
  WGS 84
  >>> print(mpnt.srs.proj)
  +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
  >>> mpnt.transform_to(SpatialReference('NAD27'))
  >>> print(mpnt.proj)
  +proj=longlat +ellps=clrk66 +datum=NAD27 +no_defs
  >>> print(mpnt)
  MULTIPOINT (-89.999930378602485 29.999797886557641,-89.999930378602485 29.999797886557641)

  The OGRGeomType class is to make it easy to specify an OGR geometry type:
  >>> from django.contrib.gis.gdal import OGRGeomType
  >>> gt1 = OGRGeomType(3) # Using an integer for the type
  >>> gt2 = OGRGeomType('Polygon') # Using a string
  >>> gt3 = OGRGeomType('POLYGON') # It's case-insensitive
  >>> print(gt1 == 3, gt1 == 'Polygon') # Equivalence works w/non-OGRGeomType objects
  True True
i����N(ta2b_hextb2a_hex(tbyreft	string_attc_char_ptc_doubletc_ubytetc_void_p(t
memoryview(tGDALBase(tEnvelopetOGREnvelope(tOGRExceptiont
OGRIndexErrortSRSException(tOGRGeomType(tGDAL_VERSION(tSpatialReferencetCoordTransform(tgeomtsrs(t	hex_regext	wkt_regext
json_regex(tsix(txrangetOGRGeometrycBs�eZdZd:d�Zd�Zd�Zd�Zed��Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zed
��Zd�Zd�Zeee�Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zd�Zd�Z eee �Z!d�Z"d�Z#ee"e#�Z$ed��Z%ed��Z&ed��Z'ed ��Z(e(Z)ed!��Z*ed"��Z+ed#��Z,ed$��Z-ed%��Z.d&�Z/d'�Z0e1d(�Z2d)�Z3d*�Z4d+�Z5d,�Z6d-�Z7d.�Z8d/�Z9d0�Z:d1�Z;d2�Z<d:d3�Z=ed4��Z>ed5��Z?d6�Z@d7�ZAd8�ZBd9�ZCRS(;s'Generally encapsulates an OGR geometry.cCsut|tj�}|rNtj|�rNtt|j�j���}t	}n|r�t
j|�}tj|�}|rE|jd�r�t
|jd��}n|jd�j�dkr	tjt|jd��j�}tj|tt|jd�j����q�tjtt|jd�j���dtt���}q|rctj|j��}qt|�}tjt|�j�}n�t|t�r�tjt|�dtt��t|��}nUt|t�r�tj|j�}n1t||j�r|}ntdt|���|s=tdt|���n||_ t!|�r^||_"nt#|j$j|_%dS(s>Initializes Geometry on either WKT or an OGR pointer as input.tsridttypet
LINEARRINGtwkts4Invalid input type for OGR Geometry construction: %ss)Cannot create OGR Geometry from input: %sN(&t
isinstanceRtstring_typesRtmatchRRtuppertencodetFalseRRtgrouptinttcapitcreate_geomRtnumt
import_wktRRtfrom_wkttNoneRt	from_jsontfrom_wkbtbytestlentptr_typeRRtstrtptrtboolRtGEO_CLASSESt	geom_typet	__class__(tselft
geom_inputRtstr_instancetwkt_mtjson_mtgtogr_t((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__init__Js>	!.<0		cCs |jrtj|j�ndS(sDeletes this Geometry.N(t_ptrR'tdestroy_geom(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__del__�s	cCs4|j}|r|j}nd}t|j�|fS(N(RRR,R/twkb(R8R((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__getstate__�s
	cCs^|\}}tj|dtt��t|��}|sHtd��n||_||_dS(Ns.Invalid OGRGeometry loaded from pickled state.(	R'R.R,RRR0RR3R(R8tstateRCRR3((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__setstate__�s'	cCs>|\}}}}td||||||||||f
�S(s3Constructs a Polygon from a bounding box (4-tuple).s,POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))(R(tclstbboxtx0ty0tx1ty1((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt	from_bbox�scCs
|j|�S(s(Returns the union of the two geometries.(tunion(R8tother((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__or__�scCs
|j|�S(s8Returns the intersection of this Geometry and the other.(tintersection(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__and__�scCs
|j|�S(s2Return the difference this Geometry and the other.(t
difference(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__sub__�scCs
|j|�S(s?Return the symmetric difference of this Geometry and the other.(tsym_difference(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__xor__�scCs$t|t�r|j|�StSdS(s$Is this Geometry equal to the other?N(RRtequalsR$(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__eq__�s
cCs||kS(sTests for inequality.((R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__ne__�scCs|jS(s*WKT is used for the string representation.(R(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__str__�scCstj|j�S(s6Returns 0 for points, 1 for lines, and 2 for surfaces.(R'tget_dimsR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt	dimension�scCsVt|t�rFtdkrFt|�rFtjtj|jd��Sntj|j�S(s1Returns the coordinate dimension of the Geometry.iiii(iii(RtGeometryCollectionRR0R't
get_coord_dimtget_geom_refR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt_get_coord_dim�scCs2|dkrtd��ntj|j|�dS(s/Sets the coordinate dimension of this Geometry.iis(Geometry dimension must be either 2 or 3N(ii(t
ValueErrorR't
set_coord_dimR3(R8tdim((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt_set_coord_dim�scCstj|j�S(s(The number of elements in this Geometry.(R'tget_geom_countR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt
geom_count�scCstj|j�S(s.Returns the number of Points in this Geometry.(R'tget_point_countR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytpoint_count�scCs|jS(s7Alias for `point_count` (same name method in GEOS API.)(Rh(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt
num_points�scCs|jS(sAlais for `point_count`.(Rh(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt
num_coords�scCsttj|j��S(s#Returns the Type for this Geometry.(RR't
get_geom_typeR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR6�scCstj|j�S(s"Returns the Name of this Geometry.(R't
get_geom_nameR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt	geom_name�scCstj|j�S(sIReturns the area for a LinearRing, Polygon, or MultiPolygon; 0 otherwise.(R'tget_areaR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytarea�scCs"ttj|jtt����S(s'Returns the envelope for this Geometry.(R
R'tget_envelopeR3RR(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytenvelope�scCs
|jjS(sDReturns the envelope as a 4-tuple, instead of as an Envelope object.(Rqttuple(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytextentscCsBy)tj|j�}ttj|��SWntk
r=dSXdS(s0Returns the Spatial Reference for this Geometry.N(R'tget_geom_srsR3Rtsrs_apit	clone_srsRR,(R8tsrs_ptr((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt_get_srss

cCsyt|t�r|j}nGt|tjtj�rLt|�}|j}ntdt|���tj	|j|�dS(s,Sets the SpatialReference for this geometry.s7Cannot assign spatial reference with object of type: %sN(
RRR3Rt
integer_typesR t	TypeErrorRR't
assign_srs(R8RRwtsr((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt_set_srsscCs|j}|r|jSdS(N(RRR,(R8R((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt	_get_srid&s	cCs.t|tj�r||_ntd��dS(Ns!SRID must be set with an integer.(RRRyRRz(R8R((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt	_set_srid+scCs#ddlm}||j|j�S(s4Returns a GEOSGeometry object from this OGRGeometry.i����(tGEOSGeometry(tdjango.contrib.gis.geosR�RCR(R8R�((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytgeos4scCstj|j�S(s/Returns the GML representation of the Geometry.(R'tto_gmlR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytgml:scCst|j�j�S(s=Returns the hexadecimal representation of the WKB (a string).(RRCR"(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pythex?scCstj|j�S(sF
        Returns the GeoJSON representation of this Geometry.
        (R'tto_jsonR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytjsonDscCstj|jd�S(s/Returns the KML representation of the Geometry.N(R'tto_kmlR3R,(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytkmlLscCstj|j�S(s#Returns the size of the WKB buffer.(R'tget_wkbsizeR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytwkb_sizeQscCsetjdkrd}nd}|j}t|�}tj|j|t|��}tt	||��S(s/Returns the WKB representation of the Geometry.tlittleii(
tsyst	byteorderR�RR'tto_wkbR3RRR(R8R�tsztbufRC((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRCVs		
cCstj|jtt���S(s/Returns the WKT representation of the Geometry.(R'tto_wktR3RR(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRdscCs7|j}|r,|jr,d|j|jfS|jSdS(s0Returns the EWKT representation of the Geometry.s
SRID=%s;%sN(RRR(R8R((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytewktis	cCsttj|j�|j�S(sClones this OGR Geometry.(RR't
clone_geomR3R(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytclonesscCstj|j�dS(s�
        If there are any rings within this geometry that have not been
        closed, this routine will do so by adding the starting point at the
        end.
        N(R'tgeom_close_ringsR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytclose_ringswscCso|r#|j�}|j|�|Stdkr;|j}nt|t�rctj|j|j�nrt|t	�r�tj
|j|j�nJt|tjtj
�r�t	|�}tj
|j|j�ntd��tdkrkt|t�rMxutt|��D]C}tj|j|�}|tj|�krtj||�qqWqk|j|krk||_qkndS(s�
        Transforms this geometry to a different spatial reference system.
        May take a CoordTransform object, a SpatialReference object, string
        WKT or PROJ.4, and/or an integer SRID.  By default nothing is returned
        and the geometry is transformed in-place.  However, if the `clone`
        keyword is set, then a transformed clone of this geometry will be
        returned.
        iisUTransform only accepts CoordTransform, SpatialReference, string, and integer objects.N(ii(ii(R�t	transformRt	coord_dimRRR'tgeom_transformR3Rtgeom_transform_toRRyR RzR]RR0R_R^Rb(R8tcoord_transR�tklonetorig_dimR|titinternal_ptr((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR��s,	
cCs|j|�dS(sFor backwards-compatibility.N(R�(R8R((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyttransform_to�scCs1t|t�std��n||j|j�S(s�A generalized function for topology operations, takes a GDAL function and
        the other geometry to perform the operation on.s<Must use another OGRGeometry object for topology operations!(RRRzR3(R8tfuncRO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt	_topology�scCs|jtj|�S(s8Returns True if this geometry intersects with the other.(R�R'togr_intersects(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt
intersects�scCs|jtj|�S(s9Returns True if this geometry is equivalent to the other.(R�R't
ogr_equals(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRW�scCs|jtj|�S(sCReturns True if this geometry and the other are spatially disjoint.(R�R'togr_disjoint(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytdisjoint�scCs|jtj|�S(s0Returns True if this geometry touches the other.(R�R'togr_touches(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyttouches�scCs|jtj|�S(s0Returns True if this geometry crosses the other.(R�R'togr_crosses(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytcrosses�scCs|jtj|�S(s2Returns True if this geometry is within the other.(R�R't
ogr_within(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytwithin�scCs|jtj|�S(s1Returns True if this geometry contains the other.(R�R'togr_contains(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytcontains�scCs|jtj|�S(s1Returns True if this geometry overlaps the other.(R�R'togr_overlaps(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytoverlaps�scCsKt|t�r.t||j|j�|j�St||j�|j�SdS(s?A helper routine for the OGR routines that generate geometries.N(RRR3R(R8tgen_funcRO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt_geomgen�scCs|jtj�S(s&Returns the boundary of this geometry.(R�R'tget_boundary(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytboundary�scCs|jtj�S(sl
        Returns the smallest convex Polygon that contains all the points in
        this Geometry.
        (R�R'tgeom_convex_hull(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytconvex_hull�scCs|jtj|�S(s�
        Returns a new geometry consisting of the region which is the difference
        of this geometry and the other.
        (R�R't	geom_diff(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRS�scCs|jtj|�S(sy
        Returns a new geometry consisting of the region of intersection of this
        geometry and the other.
        (R�R'tgeom_intersection(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRQ�scCs|jtj|�S(sr
        Returns a new geometry which is the symmetric difference of this
        geometry and the other.
        (R�R't
geom_sym_diff(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRUscCs|jtj|�S(s|
        Returns a new geometry consisting of the region which is the union of
        this geometry and the other.
        (R�R't
geom_union(R8RO((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRN
sN(Dt__name__t
__module__t__doc__R,R?RBRDRFtclassmethodRMRPRRRTRVRXRYRZtpropertyR\R`RdR�RfRhRiRjR6RmRoRqRsRxR}RR~RRR�R�R�R�tgeojsonR�R�RCRR�R�R�R$R�R�R�R�RWR�R�R�R�R�R�R�R�R�RSRQRURN(((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRGs|8																	
			1		
											tPointcBsJeZed��Zed��Zed��Zed��ZeZRS(cCstj|jd�S(s(Returns the X coordinate for this Point.i(R'tgetxR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytxscCstj|jd�S(s(Returns the Y coordinate for this Point.i(R'tgetyR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytyscCs&|jdkr"tj|jd�SdS(s(Returns the Z coordinate for this Point.iiN(R�R'tgetzR3(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytzscCsH|jdkr|j|jfS|jdkrD|j|j|jfSdS(s Returns the tuple of this point.iiN(R�R�R�R�(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRr$s(R�R�R�R�R�R�Rrtcoords(((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR�s
t
LineStringcBsneZd�Zd�Zd�Zed��ZeZd�Zed��Z	ed��Z
ed��ZRS(cCs�|dkr�||jkr�t�t�t�}}}tj|j|t|�t|�t|��|j}|dkr�|jfS|dkr�|j|jfS|dkr�|j|j|jfSntdt	|���dS(s%Returns the Point at the given index.iiiisindex out of range: %sN(
RhRR't	get_pointR3RR�tvalueR
R2(R8tindexR�R�R�Rc((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__getitem__/s.	
ccs'x t|j�D]}||VqWdS(s+Iterates over each point in the LineString.N(RRh(R8R�((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__iter__>scCs|jS(s:The length returns the number of points in the LineString.(Rh(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt__len__CscCs-tgtt|��D]}||^q�S(s4Returns the tuple representation of this LineString.(RrRR0(R8R�((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRrGscCs/gtt|��D]}||j|�^qS(sp
        Internal routine that returns a sequence (list) corresponding with
        the given function.
        (RR0R3(R8R�R�((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt_listarrMscCs|jtj�S(s$Returns the X coordinates in a list.(R�R'R�(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR�TscCs|jtj�S(s$Returns the Y coordinates in a list.(R�R'R�(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR�YscCs#|jdkr|jtj�SdS(s$Returns the Z coordinates in a list.iN(R�R�R'R�(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR�^s(R�R�R�R�R�R�RrR�R�R�R�R�(((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR�-s				t
LinearRingcBseZRS((R�R�(((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR�estPolygoncBskeZd�Zd�Zd�Zed��ZeZed��ZeZ	ed��Z
ed��ZRS(cCs|jS(s-The number of interior rings in this Polygon.(Rf(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR�isccs'x t|j�D]}||VqWdS(s*Iterates through each ring in the Polygon.N(RRf(R8R�((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR�mscCsZ|dks||jkr.td|��n(ttjtj|j|��|j�SdS(s%Gets the ring at the specified index.isindex out of range: %sN(RfR
RR'R�R_R3R(R8R�((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR�rscCs|dS(s"Returns the shell of this Polygon.i((R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytshellzscCs-tgt|j�D]}||j^q�S(s0Returns a tuple of LinearRing coordinate tuples.(RrRRf(R8R�((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRr�scCs-tgt|j�D]}||j^q�S(s%The number of Points in this Polygon.(tsumRRfRh(R8R�((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRh�scCs,ttd��}tj|j|j�|S(s/Returns the centroid (a Point) of this Polygon.R�(RRR'tget_centroidR3(R8tp((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytcentroid�s(R�R�R�R�R�R�R�t
exterior_ringRrR�RhR�(((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR�gs			R]cBsVeZdZd�Zd�Zd�Zd�Zed��Zed��Z	e	Z
RS(sThe Geometry Collection class.cCsZ|dks||jkr.td|��n(ttjtj|j|��|j�SdS(s)Gets the Geometry at the specified index.isindex out of range: %sN(RfR
RR'R�R_R3R(R8R�((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR��sccs'x t|j�D]}||VqWdS(sIterates over each Geometry.N(RRf(R8R�((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR��scCs|jS(s5The number of geometries in this Geometry Collection.(Rf(R8((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR��scCs�t|t�rdt||j�rKx=|D]}tj|j|j�q(Wq�tj|j|j�nCt|tj�r�t|�}tj|j|j�ntd��dS(s-Add the geometry to this Geometry Collection.sMust add an OGRGeometry.N(	RRR7R'tadd_geomR3RR R(R8RR=ttmp((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pytadd�s
cCs-tgt|j�D]}||j^q�S(s1The number of Points in this Geometry Collection.(R�RRfRh(R8R�((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRh�scCs-tgt|j�D]}||j^q�S(s;Returns a tuple representation of this Geometry Collection.(RrRRf(R8R�((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyRr�s(R�R�R�R�R�R�R�R�RhRrR�(((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR]�s				
t
MultiPointcBseZRS((R�R�(((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR��stMultiLineStringcBseZRS((R�R�(((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR��stMultiPolygoncBseZRS((R�R�(((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyR��siiiiiiiie(6R�R�tbinasciiRRtctypesRRRRRRtdjango.contrib.gisRtdjango.contrib.gis.gdal.baseR	t django.contrib.gis.gdal.envelopeR
Rtdjango.contrib.gis.gdal.errorRR
Rt django.contrib.gis.gdal.geomtypeRtdjango.contrib.gis.gdal.libgdalRtdjango.contrib.gis.gdal.srsRRt"django.contrib.gis.gdal.prototypesRR'RRut!django.contrib.gis.geometry.regexRRRtdjango.utilsRtdjango.utils.six.movesRRR�R�R�R�R]R�R�R�twkb25bitR5(((sD/tmp/pip-install-XxeQeY/django/django/contrib/gis/gdal/geometries.pyt<module>(sN.��8.-


https://t.me/AnonymousX5 - 2025