Ë
    ~ìqj{  ã                   ó~   — d Z ddlZddlZddlmZ ddlmZ dgZ G d„ de«      Z	e	ej                  j                  d<   y)zPoints and related utilities.é    N)ÚDimensionError)ÚBaseGeometryÚPointc                   ó‚   — e Zd ZdZg Zd„ Zed„ «       Zed„ «       Zed„ «       Z	ed„ «       Z
ed„ «       Zdd	„Zed
„ «       Zy)r   a­  A geometry type that represents a single coordinate.

    Each coordinate has x, y and possibly z and/or m values.

    A point is a zero-dimensional feature and has zero length and zero area.

    Parameters
    ----------
    args : float, or sequence of floats
        The coordinates can either be passed as a single parameter, or as
        individual float values using multiple parameters:

        1) 1 parameter: a sequence or array-like of with 2 or 3 values.
        2) 2 or 3 parameters (float): x, y, and possibly z.

    Attributes
    ----------
    x, y, z, m : float
        Coordinate values

    Examples
    --------
    Constructing the Point using separate parameters for x and y:

    >>> from shapely import Point
    >>> p = Point(1.0, -1.0)

    Constructing the Point using a list of x, y coordinates:

    >>> p = Point([1.0, -1.0])
    >>> print(p)
    POINT (1 -1)
    >>> p.y
    -1.0
    >>> p.x
    1.0

    c                 óÎ  — t        |«      dk(  rt        j                  d«      S t        |«      dkD  rt        dt        |«      › d�«      ‚t        |«      dk(  rR|d   }t	        |t
        «      r|S t        |d«      st        |«      }t        j                  |«      j                  «       }n#t        j                  |«      j                  «       }|j                  dkD  rt        d|› �«      ‚t        j                  |j                  t        j                   «      s|D �cg c]  }t#        |«      ‘Œ }}t        j$                  |«      }t	        |t
        «      st        d	«      ‚|S c c}w )
zCreate a new Point geometry.r   zPOINT EMPTYé   z#Point() takes at most 3 arguments (z given)é   Ú__getitem__z:Point() takes only scalar or 1-size vector arguments, got z*Invalid values passed to Point constructor)ÚlenÚshapelyÚfrom_wktÚ	TypeErrorÚ
isinstancer   ÚhasattrÚlistÚnpÚasarrayÚsqueezeÚarrayÚndimÚ
ValueErrorÚ
issubdtypeÚdtypeÚnumberÚfloatÚpoints)ÚselfÚargsÚcoordsÚcÚgeoms        úR/var/www/html/truck-me/venv/lib/python3.12/site-packages/shapely/geometry/point.pyÚ__new__zPoint.__new__6   s*  € äˆt‹9˜Š>ô ×#Ñ# MÓ2Ð2Ü�‹Y˜Š]ÜÐAÄ#ÀdÃ)ÀÈGÐTÓUÐUÜ�‹Y˜!Š^Ø˜!‘WˆFÜ˜&¤%Ô(Ø�ô ˜6 =Ô1Ü˜f›�Ü—Z‘Z Ó'×/Ñ/Ó1‰Fô —X‘X˜d“^×+Ñ+Ó-ˆFà�;‰;˜Š?ÜØLÈTÈFÐSóð ô �}‰}˜VŸ\™\¬2¯9©9Ô5Ø(.Ö/ 1”e˜A•hÐ/ˆFÐ/Ü�~‰~˜fÓ%ˆÜ˜$¤Ô&ÜÐIÓJÐJØˆùò	 0s   ÄE"c                 ó>   — t        t        j                  | «      «      S )zReturn x coordinate.)r   r   Úget_x©r   s    r"   ÚxzPoint.xX   ó   € ô ”W—]‘] 4Ó(Ó)Ð)ó    c                 ó>   — t        t        j                  | «      «      S )zReturn y coordinate.)r   r   Úget_yr&   s    r"   ÚyzPoint.y]   r(   r)   c                 ó¬   — t        j                  | «      }t        j                  |«      r t        j                  | «      st        d«      ‚t        |«      S )zReturn z coordinate.zThis point has no z coordinate.)r   Úget_zr   ÚisnanÚhas_zr   r   )r   Úzs     r"   r1   zPoint.zb   s=   € ô �M‰M˜$ÓˆÜ�8‰8�AŒ;œwŸ}™}¨TÔ2Ü Ð!BÓCÐCÜ�Q‹xˆr)   c                 ó~   — t        j                  | «      st        d«      ‚t        t        j                  | «      «      S )zmReturn m coordinate.

        .. versionadded:: 2.1.0
           Also requires GEOS 3.12.0 or later.
        zThis point has no m coordinate.)r   Úhas_mr   r   Úget_mr&   s    r"   ÚmzPoint.mj   s0   € ô �}‰}˜TÔ"Ü Ð!BÓCÐCÜ”W—]‘] 4Ó(Ó)Ð)r)   c                 óN   — | j                   }dt        |«      dkD  r|d   dœS ddœS )z4Return a GeoJSON-like mapping of the Point geometry.r   r   © )ÚtypeÚcoordinates)r   r   )r   r   s     r"   Ú__geo_interface__zPoint.__geo_interface__u   s/   € ð —‘ˆØ¼SÀ»[È1º_°°q±	ÑUÐUÐRTÑUÐUr)   Nc                 ó¦   — | j                   ry|€| j                  rdnd}|€d}d| j                  › d| j                  › dd|z  › d	d
|z  › d|› d|› d�S )aØ  Return SVG circle element for the Point geometry.

        Parameters
        ----------
        scale_factor : float
            Multiplication factor for the SVG circle diameter.  Default is 1.
        fill_color : str, optional
            Hex string for fill color. Default is to use "#66cc99" if
            geometry is valid, and "#ff3333" if invalid.
        opacity : float
            Float number between 0 and 1 for color opacity. Default value is 0.6

        z<g />z#66cc99z#ff3333g333333ã?z<circle cx="z" cy="z" r="g      @z!" stroke="#555555" stroke-width="ç      ð?z" fill="z" opacity="z" />)Úis_emptyÚis_validr'   r,   )r   Úscale_factorÚ
fill_colorÚopacitys       r"   Úsvgz	Point.svg{   sz   € ð �=Š=ØØÐØ&*§m¢m™¸ˆJØˆ?ØˆGà˜4Ÿ6™6˜( &¨¯©¨°°c¸LÑ6HÐ5Ið J.Ø.1°LÑ.@Ð-AÀÈ*Èð VØ�y ð&ð	
r)   c                 ó.   — | j                   j                  S )zæSeparate arrays of X and Y coordinate values.

        Examples
        --------
        >>> from shapely import Point
        >>> x, y = Point(0, 0).xy
        >>> list(x)
        [0.0]
        >>> list(y)
        [0.0]

        )r   Úxyr&   s    r"   rD   zPoint.xy•   s   € ð �{‰{�~‰~Ðr)   )r<   NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r#   Úpropertyr'   r,   r1   r5   r:   rB   rD   r7   r)   r"   r   r      s”   „ ñ%ðN €IòðD ñ*ó ð*ð ñ*ó ð*ð ñó ðð ñ*ó ð*ð ñVó ðVó

ð4 ñó ñr)   )rH   Únumpyr   r   Úshapely.errorsr   Úshapely.geometry.baser   Ú__all__r   ÚlibÚregistryr7   r)   r"   ú<module>rQ      s@   ðÙ #ã ã Ý )Ý .àˆ)€ôWˆLô Wðt  €‡�× Ñ �QÒ r)   