o
    <g                     @   s(   d dl mZmZmZ dd Zdd ZdS )    )GEOSGeometry	hex_regex	wkt_regexc                 C   s   t | trt| d} |  }W d   n1 sw   Y  n|  }t |trGz| }W n	 ty7   Y nw t|sBt	|rFt
|S nt
|S t
t|S )zf
    Given a string file name, returns a GEOSGeometry. The file may contain WKB,
    WKT, or HEX.
    rbN)
isinstancestropenreadbytesdecodeUnicodeDecodeErrorr   matchr   r   
memoryview)file_hbufdecoded r   R/var/www/html/venv/lib/python3.10/site-packages/django/contrib/gis/geos/factory.pyfromfile   s"   


r   c                 K   s   t | fi |S )z3Given a string value, return a GEOSGeometry object.)r   )stringkwargsr   r   r   fromstr   s   r   N) django.contrib.gis.geos.geometryr   r   r   r   r   r   r   r   r   <module>   s    