+
    Tj                     t    R t ^ RIHtHtHtHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt  ! R R]
4      tR	# )
z
This module houses the GEOSCoordSeq object, which is used internally
by GEOSGeometry to house the actual coordinates of the Point,
LineString, and LinearRing geometries.
)byrefc_bytec_doublec_uint)
prototypes)GEOSBaseGEOSException)CS_PTR)numpyc                   >  a  ] tR t^t o Rt]tR&R ltR tR t	R t
R tR tR tR	 tR
 tR tR tR tR tR t]R 4       tR tR tR tR tR tR tR tR tR tR t R t!R t"]R 4       t#]R 4       t$]R 4       t%R  t&]R! 4       t']R" 4       t(]R# 4       t)R$t*V t+R%# )'GEOSCoordSeqzGThe internal representation of a list of coordinates inside a Geometry.c                `    \        V\        4      '       g   \        R4      hWn        W n        R# )zInitialize from a GEOS pointer.z4Coordinate sequence should initialize with a CS_PTR.N)
isinstancer
   	TypeError_ptr_z)selfptrzs   &&&U/var/www/idalgo/venv/lib/python3.14/site-packages/django/contrib/gis/geos/coordseq.py__init__GEOSCoordSeq.__init__   s%    #v&&RSS	    c              #  Z   "   \        V P                  4       F  pW,          x  K  	  R# 5i)z3Iterate over each point in the coordinate sequence.N)rangesize)r   is   & r   __iter__GEOSCoordSeq.__iter__   s     tyy!A'M "s   )+c                    V P                   # )z7Return the number of points in the coordinate sequence.)r   r   s   &r   __len__GEOSCoordSeq.__len__!   s    yyr   c                ,    \        V P                  4      # )z<Return the string representation of the coordinate sequence.)strtupler!   s   &r   __str__GEOSCoordSeq.__str__%   s    4::r   c                F    V P                  V4       V P                  V4      # )z8Return the coordinate sequence value at the given index.)_checkindex_point_getterr   indexs   &&r   __getitem__GEOSCoordSeq.__getitem__)   s!    !!%((r   c                   \        V\        \        34      '       d   M8\        '       d"   \        V\        P                  4      '       d   M\        R4      hV P                  ^8X  d"   V P                  '       d   ^pV P                  pM^pV P                  p\        V4      V8w  d   \        R4      hV P                  V4       V! W4       R# )z5Set the coordinate sequence value at the given index.zBMust set coordinate with a sequence (list, tuple, or numpy array).z"Dimension of value does not match.N)r   listr&   r   ndarrayr   dimsr   _set_point_3d_set_point_2dlenr*   )r   r-   valuen_argspoint_setters   &&&  r   __setitem__GEOSCoordSeq.__setitem__.   s     edE]++Uz%77T  99>dgggF--LF--Lu:@AAU"r   c                X    ^ Tu;8:  d   V P                   8  g   M \        RV 24      hR# )zCheck the given index.zInvalid GEOS Geometry index: N)r   
IndexErrorr,   s   &&r   r*   GEOSCoordSeq._checkindexF   s+    U&TYY&<UGDEE 'r   c                B    V^ 8  g   V^8  d   \        RVR R24      hR# )zCheck the given dimension.zInvalid ordinate dimension: "d"Nr   )r   dims   &&r   	_checkdimGEOSCoordSeq._checkdimK   s+    7cAg"?Awa HII r   c                h    \         P                  ! V P                  V\        \	        4       4      4      # N)capics_getxr   r   r   r,   s   &&r   _get_xGEOSCoordSeq._get_xP        ||DHHeU8:->??r   c                h    \         P                  ! V P                  V\        \	        4       4      4      # rF   )rG   cs_getyr   r   r   r,   s   &&r   _get_yGEOSCoordSeq._get_yS   rK   r   c                h    \         P                  ! V P                  V\        \	        4       4      4      # rF   )rG   cs_getzr   r   r   r,   s   &&r   _get_zGEOSCoordSeq._get_zV   rK   r   c                H    \         P                  ! V P                  W4       R # rF   )rG   cs_setxr   r   r-   r7   s   &&&r   _set_xGEOSCoordSeq._set_xY       TXXu,r   c                H    \         P                  ! V P                  W4       R # rF   )rG   cs_setyr   rV   s   &&&r   _set_yGEOSCoordSeq._set_y\   rY   r   c                H    \         P                  ! V P                  W4       R # rF   )rG   cs_setzr   rV   s   &&&r   _set_zGEOSCoordSeq._set_z_   rY   r   c                x    V P                   ^8X  d   V P                  '       d   V P                  # V P                  # )   )r3   r   _get_point_3d_get_point_2dr!   s   &r   r+   GEOSCoordSeq._point_getterb   s+    %)YY!^t!!WTEWEWWr   c                F    V P                  V4      V P                  V4      3# rF   )rI   rN   r,   s   &&r   re   GEOSCoordSeq._get_point_2df   s    E"DKK$677r   c                f    V P                  V4      V P                  V4      V P                  V4      3# rF   )rI   rN   rR   r,   s   &&r   rd   GEOSCoordSeq._get_point_3di   s*    E"DKK$6E8JKKr   c                R    Vw  r4V P                  W4       V P                  W4       R # rF   )rW   r\   )r   r-   r7   xys   &&&  r   r5   GEOSCoordSeq._set_point_2dl   s!    EEr   c                v    Vw  r4pV P                  W4       V P                  W4       V P                  W4       R # rF   )rW   r\   r`   )r   r-   r7   rl   rm   r   s   &&&   r   r4   GEOSCoordSeq._set_point_3dq   s/    aEEEr   c           	         V P                  V4       V P                  V4       \        P                  ! V P                  W!\        \        4       4      4      # )z3Return the value for the given dimension and index.)r*   rC   rG   cs_getordinater   r   r   )r   	dimensionr-   s   &&&r   getOrdinateGEOSCoordSeq.getOrdinatex   s<    y!""488UuXZ?PQQr   c                    V P                  V4       V P                  V4       \        P                  ! V P                  W!V4       R# )z0Set the value for the given dimension and index.N)r*   rC   rG   cs_setordinater   )r   rs   r-   r7   s   &&&&r   setOrdinateGEOSCoordSeq.setOrdinate~   s2    y!DHHe>r   c                &    V P                  ^ V4      # )zGet the X value at the index.rt   r,   s   &&r   getXGEOSCoordSeq.getX       5))r   c                *    V P                  ^ W4       R# )z(Set X with the value at the given index.Nrx   rV   s   &&&r   setXGEOSCoordSeq.setX       E)r   c                &    V P                  ^V4      # )z#Get the Y value at the given index.r{   r,   s   &&r   getYGEOSCoordSeq.getY   r~   r   c                *    V P                  ^W4       R# )z(Set Y with the value at the given index.Nr   rV   s   &&&r   setYGEOSCoordSeq.setY   r   r   c                &    V P                  ^V4      # )z(Get Z with the value at the given index.r{   r,   s   &&r   getZGEOSCoordSeq.getZ   r~   r   c                *    V P                  ^W4       R# )z(Set Z with the value at the given index.Nr   rV   s   &&&r   setZGEOSCoordSeq.setZ   r   r   c                f    \         P                  ! V P                  \        \	        4       4      4      # )z,Return the size of this coordinate sequence.)rG   
cs_getsizer   r   r   r!   s   &r   r   GEOSCoordSeq.size        txxvx99r   c                f    \         P                  ! V P                  \        \	        4       4      4      # )z2Return the dimensions of this coordinate sequence.)rG   
cs_getdimsr   r   r   r!   s   &r   r3   GEOSCoordSeq.dims   r   r   c                    V P                   # )zk
Return whether this coordinate sequence is 3D. This property value is
inherited from the parent Geometry.
)r   r!   s   &r   haszGEOSCoordSeq.hasz   s     wwr   c                j    \        \        P                  ! V P                  4      V P                  4      # )zClone this coordinate sequence.)r   rG   cs_cloner   r   r!   s   &r   cloneGEOSCoordSeq.clone   s     DMM$((3TYY??r   c           	        a a S P                   '       d   RoMRoRRP                  V V3R l\        \        S 4      4       4       4      P	                  4       ,          # )z2Return the KML representation for the coordinates.z	%s,%s,%s z%s,%s,0 z<coordinates>%s</coordinates> c              3   D   <"   T F  pSSV,          ,          x  K  	  R # 5irF    ).0r   r   substrs   & r   	<genexpr>#GEOSCoordSeq.kml.<locals>.<genexpr>   s     A0@1ftAw&&0@s    )r   joinr   r6   strip)r   r   s   f@r   kmlGEOSCoordSeq.kml   sJ    
 999 FF+ggAc$i0@AAGGIJ	
r   c                   a V P                   pV P                  oV^8X  d	   S! ^ 4      # \        ;QJ d     . V3R l\        V4       4       F  NK  	  5# ! V3R l\        V4       4       4      # )z3Return a tuple version of this coordinate sequence.c              3   4   <"   T F  pS! V4      x  K  	  R # 5irF   r   )r   r   	get_points   & r   r   %GEOSCoordSeq.tuple.<locals>.<genexpr>   s     48aYq\\8s   )r   r+   r&   r   )r   nr   s   & @r   r&   GEOSCoordSeq.tuple   sT     II&&	6Q<u4584u4u458444r   c                    \        4       p\        P                  ! V P                  \	        V4      4      '       g+   \        R\        P                  P                  ,          4      hVP                  ^8H  # )z<Return whether this coordinate sequence is counterclockwise.z*Error encountered in GEOS C function "%s".)r   rG   	cs_is_ccwr   r   r	   	func_namer7   )r   rets   & r   is_counterclockwise GEOSCoordSeq.is_counterclockwise   sS     h~~dhhc
33<t~~?W?WW  yyA~r   )r   r   N)F),__name__
__module____qualname____firstlineno____doc__r
   ptr_typer   r   r"   r'   r.   r:   r*   rC   rI   rN   rR   rW   r\   r`   propertyr+   re   rd   r5   r4   rt   rx   r|   r   r   r   r   r   r   r3   r   r   r   r&   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s*    MH
)
#0F
J
@@@--- X X8L
R?******
 : : : :  @ 
 
 5 5  r   r   N)r   ctypesr   r   r   r   django.contrib.gis.geosr   rG   django.contrib.gis.geos.baser   django.contrib.gis.geos.errorr	   django.contrib.gis.geos.libgeosr
   django.contrib.gis.shortcutsr   r   r   r   r   <module>r      s/    3 2 6 1 7 2 .C8 Cr   