Ë
    z<]if  ã                   ó*   — d Z ddlmZ  G d„ de«      Zy)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                   ó2   ‡ — e Zd Zdˆ fd„	Zdˆ fd„	Zd„ Zˆ xZS )ÚSpatialProxyc                 óH   •— || _         |xs || _        t        ‰|   |«       y)zy
        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       €ú`/var/www/auto_recruiter/arenv/lib/python3.12/site-packages/django/contrib/gis/db/models/proxy.pyr
   zSpatialProxy.__init__   s%   ø€ ð
 ˆŒØ#Ò, uˆŒÜ‰Ñ˜Õó    c                 óD  •— |€| S 	 |j                   | j                  j                     }t        || j                  «      r|}|S ||dk(  rd}|S | j                  |«      }t        || j                  j                  |«       |S # t        $ r t        ‰|   ||«      }Y Œtw xY w)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   zSpatialProxy.__get__   s±   ø€ ð ÐàˆKð	7Ø ×)Ñ)¨$¯*©*×*<Ñ*<Ñ=ˆIô i §¡Ô-ØˆGð ˆð Ð Y°"¢_ØˆGð ˆð —o‘o iÓ0ˆGÜH˜dŸj™j×0Ñ0°'Ô:Øˆøô ò 	7Ü™™¨°#Ó6ŠIð	7ús   ‡#B ÂBÂBc           
      óÚ  — | j                   j                  }|dk(  r$|!t        |t        t        | j
                  f«      rnˆt        || j
                  «      r(|j                  €f| j                   j                  |_        nJ|t        |t        t        f«      rn1t        d|j                  j                  ›d|›dt        |«      ›«      ‚||j                  | j                   j                  <   |S )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__zSpatialProxy.__set__2   sÃ   € ð —
‘
×$Ñ$ˆàHÒØˆMœZ¨´´T¸4¿;¹;Ð/GÔHð Ü˜˜tŸ{™{Ô+ð z‰zÐ!à!ŸZ™ZŸ_™_•
Øˆ]œj¨´´jÐ0AÔBàåà×%Ñ%×.Ó.²´t¸E´{ðDóð ð 16ˆ×Ñ˜$Ÿ*™*×,Ñ,Ñ-Øˆr   )N)r&   Ú
__module__Ú__qualname__r
   r   r*   Ú__classcell__)r   s   @r   r   r      s   ø„ õ õö8"r   r   N)Ú__doc__Údjango.db.models.query_utilsr   r   © r   r   ú<module>r1      s   ðñõ ;ôHÐ$õ Hr   