+
    Tj                         ^ RI Ht ^ RIHt ^ RIHt ^ RIHtH	t	 ^ RI
Ht ^ RIHt  ! R R]	]4      t ! R	 R
]4      tR# )    )
prototypes)GEOSCoordSeq)GEOSException)GEOSGeometryLinearGeometryMixin)Point)numpyc                      a a ] tR t^	t o]P
                  t^tRtV 3R lt	R t
R tR t]tR tR tR t]R	 4       t]tR
 t]R 4       t]R 4       t]R 4       t]R 4       tRtVtV ;t# )
LineStringTc                l  < \        V4      ^8X  d   V^ ,          pMTp\        V\        \        34      '       g8   \        '       d!   \        V\        P
                  4      '       g   \        R4      hVP                  R4      p\        V4      pV'       g#   \        SV `%  V P                  R4      VR7       R# WPP                  8  d4   \        RV P                  P                  V P                  V3,          4      h\        V\        \        34      '       * pV'       dJ   VP                  p\        V4      ^8w  d   \        R4      hV P!                  V^,          4       V^,          pMtRpV Fl  p	\        V	\        \        \"        34      '       g   \        R4      hVf   \        V	4      pV P!                  V4       KQ  \        V	4      V8w  g   Kc  \        R4      h	  \%        \&        P(                  ! WX4      \+        V^8H  4      R	7      p
V^8X  d   V
P,                  MV
P.                  p\1        V4       FU  pV'       d   W<R
3,          pM7\        W<,          \"        4      '       d   W<,          P                  pMW<,          pV! W4       KW  	  \        SV `%  V P                  V
P2                  4      VR7       R# )a`  
Initialize on the given sequence: may take lists, tuples, NumPy arrays
of X,Y pairs, or Point objects. If Point objects are used, ownership is
_not_ transferred to the LineString object.

Examples:
 ls = LineString((1, 1), (2, 2))
 ls = LineString([(1, 1), (2, 2)])
 ls = LineString(array([(1, 1), (2, 2)]))
 ls = LineString(Point(1, 1), Point(2, 2))
z-Invalid initialization input for LineStrings.sridN)r   z'%s requires at least %d points, got %s.zToo many dimensions.z4Each coordinate should be a sequence (list or tuple)Dimension mismatch.z:NNN)len
isinstancetuplelistr	   ndarray	TypeErrorgetsuper__init__
_init_func
_minlength
ValueError	__class____name__shape	_checkdimr   r   capi	create_csbool_set_point_3d_set_point_2drangeptr)selfargskwargscoordsr   ncoordsnumpy_coordsr   ndimcoordcspoint_setteripoint_coordsr   s   &*,           W/var/www/idalgo/venv/lib/python3.14/site-packages/django/contrib/gis/geos/linestring.pyr   LineString.__init__   s     t9>!WFF vt}--u65==11KLL zz&!f+GT__T2>__$9NN++OO  &fudm<<LLE5zQ 677NN58$8D D!%%u)=>>#N  <u:DNN4(Z4'#$9::   $..74	?K+/19r''":J:JwA%d|FIu--%y%y)   	0t<    c              #  X   "   \        \        V 4      4       F  pW,          x  K  	  R# 5i)z%Allow iteration over this LineString.N)r&   r   )r(   r2   s   & r4   __iter__LineString.__iter__c   s     s4y!A'M "s   (*c                ,    \        V P                  4      # )z/Return the number of points in this LineString.)r   _csr(   s   &r4   __len__LineString.__len__h   s    488}r6   c                (    V P                   V,          # Nr;   )r(   indexs   &&r4   _get_single_externalLineString._get_single_externall   s    xxr6   c                   V P                   P                  pV P                   P                  pV P                  p\	        \
        P                  ! W4      VR 7      p\        V4       F	  w  rxWV&   K  	  V P                  VP                  4      p	V	'       dC   \
        P                  ! V P                  4       Wn	        Ve   WPn        V P                  4        R# \        R4      h)r   Nz3Geometry resulting from slice deletion was invalid.)r;   dimshaszr   r   r!   r"   	enumerater   r'   destroy_geom
_post_initr   )
r(   lengthitemsr.   rG   r   r0   r2   cr'   s
   &&&       r4   	_set_listLineString._set_listq   s    xx}}xx}}yy $..6$?e$DAqE % oobff%dhh'H 	OO   UVVr6   c                "    W P                   V&   R # r@   rA   )r(   rB   values   &&&r4   _set_singleLineString._set_single   s    r6   c                *    VR9  d   \        R4      hR# )   r   N)rU      )r   )r(   dims   &&r4   r    LineString._checkdim   s    f122 r6   c                .    V P                   P                  # )zDReturn a tuple version of the geometry from the coordinate sequence.)r;   r   r<   s   &r4   r   LineString.tuple   s     xx~~r6   c                    \        \        V 4      4       Uu. uF
  q!! V4      NK  	  pp\        '       d   \        P                  ! V4      # V# u upi )zc
Return a sequence (list) corresponding with the given function.
Return a numpy array if possible.
)r&   r   r	   array)r(   funcr2   lsts   &&  r4   _listarrLineString._listarr   sE    
 !&c$i 01 01tAw 015;;s##J	 2s   Ac                L    V P                  V P                  P                  4      # )z(Return a numpy array for the LineString.)r_   r;   __getitem__r<   s   &r4   r\   LineString.array   s     }}TXX1122r6   c                L    V P                  V P                  P                  4      # )z/Return a list or numpy array of the X variable.)r_   r;   getXr<   s   &r4   xLineString.x        }}TXX]]++r6   c                L    V P                  V P                  P                  4      # )z/Return a list or numpy array of the Y variable.)r_   r;   getYr<   s   &r4   yLineString.y   rh   r6   c                t    V P                   '       g   R# V P                  V P                  P                  4      # )z/Return a list or numpy array of the Z variable.N)rG   r_   r;   getZr<   s   &r4   r   LineString.z   s'     yyy==//r6   )r'   r   )r   
__module____qualname____firstlineno__r!   create_linestringr   r   has_csr   r8   r=   rC   _get_single_internalrN   rR   r    propertyr   r+   r_   r\   rf   rk   r   __static_attributes____classdictcell____classcell__)r   __classdict__s   @@r4   r   r   	   s     ''JJFS=j
 0W* 3
   F	 3 3 , , , , 0 0 0r6   r   c                   L   a  ] tR t^t o ^t]P                  t]R 4       t	Rt
V tR# )
LinearRingc                h    V P                   '       d   \        R 4      hV P                  P                  # )z8Orientation of an empty LinearRing cannot be determined.)emptyr   r;   is_counterclockwiser<   s   &r4   r   LinearRing.is_counterclockwise   s'    :::WXXxx+++r6    N)r   rp   rq   rr   r   r!   create_linearringr   rv   r   rw   rx   )rz   s   @r4   r|   r|      s'     J''J, ,r6   r|   N)django.contrib.gis.geosr   r!    django.contrib.gis.geos.coordseqr   django.contrib.gis.geos.errorr    django.contrib.gis.geos.geometryr   r   django.contrib.gis.geos.pointr   django.contrib.gis.shortcutsr	   r   r|   r   r6   r4   <module>r      s5    6 9 7 N / .l0$l l0`, ,r6   