a
    5Xh                     @   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   qF1 s20    Y  n|  }t |trz| }W n tyn   Y q0 t|st	|rt
|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)Zfile_hbufdecoded r   d/var/www/viveiro_mudafortebrasil/venv/lib/python3.9/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)Z django.contrib.gis.geos.geometryr   r   r   r   r   r   r   r   r   <module>   s   