ó
    îhf  ã                   ó*   • S r SSKJr   " S S\5      rg)a  
The SpatialProxy object allows for lazy-geometries and lazy-rasters. The proxy
uses Python descriptors for instantiating and setting Geometry or Raster
objects corresponding to geographic model fields.

Thanks to Robert Coup for providing this functionality (see #4322).
é    )ÚDeferredAttributec                   óB   ^ • \ rS rSrSU 4S jjrSU 4S jjrS rSrU =r$ )ÚSpatialProxyé   c                 óP   >• Xl         U=(       d    UU l        [        TU ]  U5        g)za
Initialize on the given Geometry or Raster class (not an instance)
and the corresponding field.
N)Ú_klassÚ
_load_funcÚsuperÚ__init__)ÚselfÚklassÚfieldÚ	load_funcÚ	__class__s       €ÚT/var/www/html/env/lib/python3.13/site-packages/django/contrib/gis/db/models/proxy.pyr   ÚSpatialProxy.__init__   s#   ø€ ð
 ŒØ#×, uˆŒÜ‰Ñ˜Õó    c                 óP  >• Uc  U $  UR                   U R                  R                     n[        X0R                  5      (       a  UnU$ Ub  US:X  a  SnU$ U R                  U5      n[        XR                  R                  U5        U$ ! [         a    [        TU ]  X5      n Nyf = f)zÔ
Retrieve the geometry or raster, initializing it using the
corresponding class specified during initialization and the value of
the field. Currently, GEOS or OGR geometries as well as GDALRasters are
supported.
NÚ )
Ú__dict__r   ÚattnameÚKeyErrorr
   Ú__get__Ú
isinstancer   r	   Úsetattr)r   ÚinstanceÚclsÚ	geo_valueÚgeo_objr   s        €r   r   ÚSpatialProxy.__get__   s®   ø€ ð ÑàˆKð	7Ø ×)Ñ)¨$¯*©*×*<Ñ*<Ñ=ˆIô i§¡×-Ñ-ØˆGð ˆð Ñ Y°"£_ØˆGð ˆð —o‘o iÓ0ˆGÜHŸj™j×0Ñ0°'Ô:Øˆøô ó 	7Ü™™¨Ó6ŠIð	7ús   ˆ#B	 Â	B%Â$B%c           
      ó  • U R                   R                  nUS:X  a*  Ub&  [        U[        [        U R
                  45      (       a  O–[        X R
                  5      (       a)  UR                  c  U R                   R                  Ul        OSUb  [        U[        [        45      (       a  O4[        SUR                  R                  < SU< S[        U5      < 35      eX!R                  U R                   R                  '   U$ )zÉ
Retrieve the proxied geometry or raster with the corresponding class
specified during initialization.

To set geometries, use values of None, HEXEWKB, or WKT.
To set rasters, use JSON or dict values.
ÚRASTERzCannot set z SpatialProxy (z) with value of type: )r   Ú	geom_typer   ÚstrÚdictr   ÚsridÚ
memoryviewÚ	TypeErrorr   Ú__name__Útyper   r   )r   r   ÚvalueÚgtypes       r   Ú__set__ÚSpatialProxy.__set__2   sÉ   € ð —
‘
×$Ñ$ˆàHÓØ‰MœZ¨´´T¸4¿;¹;Ð/G×HÑHð Ü˜Ÿ{™{×+Ñ+ð z‰zÑ!à!ŸZ™ZŸ_™_”
øØ‰]œj¨´´jÐ0A×BÑBàåà×%Ñ%×.Ô.³´t¸Eµ{ðDóð ð 16×Ñ˜$Ÿ*™*×,Ñ,Ñ-Øˆr   )r   r	   )N)	r)   Ú
__module__Ú__qualname__Ú__firstlineno__r   r   r-   Ú__static_attributes__Ú__classcell__)r   s   @r   r   r      s   ø† ÷ ÷÷8"ð "r   r   N)Ú__doc__Údjango.db.models.query_utilsr   r   © r   r   Ú<module>r7      s   ðñõ ;ôHÐ$õ Hr   