
    Dvg                     &    d dl mZmZmZ d Zd ZdS )    )GEOSGeometry	hex_regex	wkt_regexc                    t          | t                    r=t          | d          5 } |                                 }ddd           n# 1 swxY w Y   n|                                 }t          |t                    r]	 |                                }t          j        |          st          j        |          rt          |          S n# t          $ r Y nw xY w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decoder   matchr   r   UnicodeDecodeError
memoryview)file_hbufdecodeds      \/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/django/contrib/gis/geos/factory.pyfromfiler      s9    &# &$ 	 6++--C	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  kkmm #u 	!	-jjllG w'' -9?7+C+C -#G,,,- " 	 	 	D	 C   
3(((s#   AAA=C	 	
CCc                     t          | fi |S )z3Given a string value, return a GEOSGeometry object.)r   )stringkwargss     r   fromstrr      s    ))&)))    N) django.contrib.gis.geos.geometryr   r   r   r   r    r   r   <module>r      sK    O O O O O O O O O O) ) )6* * * * *r   