
    Og                     *    d Z ddlZd Zd ZddZd Zy)znLoad/dump geometries using the well-known text (WKT) format

Also provides pickle-like convenience functions.
    Nc                 ,    t        j                  |       S )z
    Load a geometry from a WKT string.

    Parameters
    ----------
    data : str
        A WKT string

    Returns
    -------
    Shapely geometry object
    )shapelyfrom_wkt)datas    P/var/www/html/public_html/myphp/venv/lib/python3.12/site-packages/shapely/wkt.pyloadsr   	   s     D!!    c                 8    | j                         }t        |      S )z
    Load a geometry from an open file.

    Parameters
    ----------
    fp :
        A file-like object which implements a `read` method.

    Returns
    -------
    Shapely geometry object
    )readr   )fpr   s     r   loadr      s     779D;r	   c                 4    t        j                  | f||d|S )a  
    Dump a WKT representation of a geometry to a string.

    Parameters
    ----------
    ob :
        A geometry object of any type to be dumped to WKT.
    trim : bool, default False
        Remove excess decimals from the WKT.
    rounding_precision : int
        Round output to the specified number of digits.
        Default behavior returns full precision.
    output_dimension : int, default 3
        Force removal of dimensions above the one specified.

    Returns
    -------
    input geometry as WKT string
    )trimrounding_precision)r   to_wkt)obr   r   kws       r   dumpsr   *   s!    ( >>"U4<NURTUUr	   c                 :    |j                  t        | fi |       y)a+  
    Dump a geometry to an open file.

    Parameters
    ----------
    ob :
        A geometry object of any type to be dumped to WKT.
    fp :
        A file-like object which implements a `write` method.
    trim : bool, default False
        Remove excess decimals from the WKT.
    rounding_precision : int
        Round output to the specified number of digits.
        Default behavior returns full precision.
    output_dimension : int, default 3
        Force removal of dimensions above the one specified.

    Returns
    -------
    None
    N)writer   )r   r   settingss      r   dumpr   A   s    , HHU2""#r	   )F)__doc__r   r   r   r   r    r	   r   <module>r      s$   
 " "V.$r	   