ó
    µRj³  ã                   ó`   • S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	  S SK
Jr   " S S5      rg)	é    )ÚGeometryField)ÚDistance)ÚArea)ÚNotSupportedError)Úcached_propertyc                   óÖ   ^ • \ rS rSrSrSrSrSrSrSr	Sr
\S 5       rSrSr0 r1 SkrSrS	 rS
 rS rS rS rS rU 4S jrS rS rS rS r\" \5      rU 4S jr S r!S r"S r#Sr$U =r%$ )ÚBaseSpatialOperationsé	   FNú%sc                 ó   • U R                   $ ©N)Úselect©Úselfs    ÚZD:\diplom_project\venv\Lib\site-packages\django/contrib/gis/db/backends/base/operations.pyÚselect_extentÚ#BaseSpatialOperations.select_extent   s   € à�{‰{Ðó    © Ú >!   r   ÚAsGMLÚAsKMLÚAsSVGÚScaleÚUnionÚLengthÚAzimuthÚFromWKBÚFromWKTÚGeoHashÚIsEmptyÚIsValidÚMemSizeÚReverseÚCentroidr   ÚEnvelopeÚ	AsGeoJSONÚ	MakeValidÚ	NumPointsÚ	PerimeterÚ	TransformÚ	TranslateÚ
DifferenceÚ
SnapToGridÚIntersectionÚNumGeometriesÚSymDifferenceÚBoundingCircleÚPointOnSurfaceÚLineLocatePointÚGeometryDistancec                 ó   • [        S5      e)Nz:Aggregate extent not implemented for this spatial backend.©ÚNotImplementedError©r   ÚboxÚsrids      r   Úconvert_extentÚ$BaseSpatialOperations.convert_extentM   s   € Ü!ØHó
ð 	
r   c                 ó   • [        S5      e)Nz=Aggregate 3D extent not implemented for this spatial backend.r7   r9   s      r   Úconvert_extent3dÚ&BaseSpatialOperations.convert_extent3dR   s   € Ü!ØKó
ð 	
r   c                 ó   • SU-  $ )Nz'%s'r   )r   Únames     r   Úgeo_quote_nameÚ$BaseSpatialOperations.geo_quote_nameX   s   € Ø˜‰}Ðr   c                 ó   • [        S5      e)zP
Return the database column type for the geometry field on
the spatial backend.
zGsubclasses of BaseSpatialOperations must provide a geo_db_type() methodr7   )r   Úfs     r   Úgeo_db_typeÚ!BaseSpatialOperations.geo_db_type\   s   € ô
 "ØUó
ð 	
r   c                 ó   • [        S5      e)z]
Return the distance parameters for the given geometry field,
lookup value, and lookup type.
z:Distance operations not available on this spatial backend.r7   )r   rF   ÚvalueÚlookup_types       r   Úget_distanceÚ"BaseSpatialOperations.get_distancee   s   € ô
 "ØHó
ð 	
r   c                 óà  • S n[        US5      (       a=  U" UR                  U5      (       a#  U R                  S5      < SUR                  < S3$ S$ U" X!5      (       a?  U R                  S5      < SU R                  < SUR                  < S	UR                  < S3$ U R
                  R                  R                  (       a  U R                  < SUR                  < S3$ S
U R                  -  $ )zÙ
Return the placeholder for the given geometry field with the given
value.  Depending on the spatial backend, the placeholder may contain a
stored procedure call to the transformation function of the spatial
backend.
c                 óJ   • U S L=(       a    U R                   UR                   :g  $ r   )r;   )rJ   Úfields     r   Útransform_valueÚCBaseSpatialOperations.get_geom_placeholder.<locals>.transform_valuev   s   € Ø Ð$×A¨¯©°u·z±zÑ)AÐAr   Úas_sqlr+   z(%s, Ú)r   Ú(z(%s,z), z%s(%%s))ÚhasattrÚoutput_fieldÚspatial_function_namer;   Ú	from_textÚ
connectionÚfeaturesÚhas_spatialrefsys_table)r   rF   rJ   ÚcompilerrQ   s        r   Úget_geom_placeholderÚ*BaseSpatialOperations.get_geom_placeholdern   sÉ   € ò	Bô �5˜(×#Ñ#ñ # 5×#5Ñ#5°q×9Ñ9ð "&×!;Ñ!;¸KÖ!HÈ!Ï&Ì&ÐQðð ðñ
 ˜5×$Ñ$ð ×*Ñ*¨;Ö7Ø—”Ø—
”
Ø—”ð	ð ð �_‰_×%Ñ%×=×=Ø#'§>¤>°1·6´6Ð:Ð:ð ˜tŸ~™~Ñ-Ð-r   c                 óˆ   >• [        XR                  5      (       a  [        SUR                  -  5      e[        TU ]  U5        g )NzA%s spatial aggregation is not supported by this database backend.)Ú
isinstanceÚdisallowed_aggregatesr   rB   ÚsuperÚcheck_expression_support)r   Ú
expressionÚ	__class__s     €r   rd   Ú.BaseSpatialOperations.check_expression_support�   s?   ø€ Ü�j×"<Ñ"<×=Ñ=Ü#ØSØ—/‘/ñ"óð ô 	‰Ñ(¨Õ4r   c                 ó   • [        S5      e)Nz;Aggregate support not implemented for this spatial backend.r7   )r   Úagg_names     r   Úspatial_aggregate_nameÚ,BaseSpatialOperations.spatial_aggregate_name•   s   € Ü!ØIó
ð 	
r   c                 óŒ   • XR                   ;   a  [        SU-  5      eU R                  R                  XR                  U-   5      $ )Nz-This backend doesn't support the %s function.)Úunsupported_functionsr   Úfunction_namesÚgetÚgeom_func_prefix)r   Ú	func_names     r   rX   Ú+BaseSpatialOperations.spatial_function_nameš   sG   € Ø×2Ñ2Ó2Ü#Ø?À)ÑKóð ð ×"Ñ"×&Ñ& y×2GÑ2GÈ)Ñ2SÓTÐTr   c                 ó   • [        S5      e)NzMSubclasses of BaseSpatialOperations must provide a geometry_columns() method.r7   r   s    r   Úgeometry_columnsÚ&BaseSpatialOperations.geometry_columns¢   s   € Ü!ðó
ð 	
r   c                 ó   • [        S5      e)NzKsubclasses of BaseSpatialOperations must a provide spatial_ref_sys() methodr7   r   s    r   Úspatial_ref_sysÚ%BaseSpatialOperations.spatial_ref_sys¨   s   € Ü!ðó
ð 	
r   c                 ó¤   >• [         TU ]  U5      n[        UR                  [        5      (       a   UR                  U R                  U5      5        U$ r   )rc   Úget_db_convertersra   rW   r   ÚappendÚget_geometry_converter)r   re   Ú
convertersrf   s      €r   rz   Ú'BaseSpatialOperations.get_db_converters°   sD   ø€ Ü‘WÑ.¨zÓ:ˆ
Ü�j×-Ñ-¬}×=Ñ=Ø×Ñ˜d×9Ñ9¸*ÓEÔFØÐr   c                 ó   • [        S5      e)NzSSubclasses of BaseSpatialOperations must provide a get_geometry_converter() method.r7   )r   re   s     r   r|   Ú,BaseSpatialOperations.get_geometry_converter¶   s   € Ü!ð/ó
ð 	
r   c                 ó  • UR                  U R                  5      (       a1  U R                  R                  R                  (       a  g[	        S5      eUR                  U R                  5      nU(       a  [        R                  " U5      $ g )NÚsq_mz2Area on geodetic coordinate systems not supported.)ÚgeodeticrZ   r[   Úsupports_area_geodeticr8   Ú
units_nameÚAreaMeasureÚunit_attname)r   rP   r…   s      r   Úget_area_att_for_fieldÚ,BaseSpatialOperations.get_area_att_for_field¼   sj   € Ø�>‰>˜$Ÿ/™/×*Ñ*Ø�‰×'Ñ'×>×>ØÜ%ØDóð ð ×)Ñ)¨$¯/©/Ó:ˆJÞÜ"×/Ò/°
Ó;Ð;ð r   c                 ó  • S nUR                  U R                  5      (       a)  U R                  R                  R                  (       a  SnU$ UR	                  U R                  5      nU(       a  [
        R                  " U5      nU$ )NÚm)rƒ   rZ   r[   Úsupports_distance_geodeticr…   ÚDistanceMeasurer‡   )r   rP   Údist_attÚunitss       r   Úget_distance_att_for_fieldÚ0BaseSpatialOperations.get_distance_att_for_fieldÈ   sg   € ØˆØ�>‰>˜$Ÿ/™/×*Ñ*Ø�‰×'Ñ'×B×BØ�ð
 ˆð ×$Ñ$ T§_¡_Ó5ˆEÞÜ*×7Ò7¸Ó>�Øˆr   )&Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__ÚpostgisÚ
spatialiteÚmariadbÚmysqlÚoracleÚspatial_versionr   r   r   rb   rp   rn   rm   rY   r<   r?   rC   rG   rL   r^   rd   rj   rX   rt   rw   Ústaticmethodr   Údistance_expr_for_lookuprz   r|   rˆ   r�   Ú__static_attributes__Ú__classcell__)rf   s   @r   r	   r	   	   s¿   ø† ð €GØ€JØ€GØ€EØ€FØ€Oð €Fàñó ðð ÐàÐð €Nò"ÐðJ €Iò
ò

òò
ò
ò.õ>5ò
ò
Uò
ò
ñ  ,¨HÓ5Ðõò
ò
<÷	ð 	r   r	   N)Údjango.contrib.gis.db.modelsr   Ú&django.contrib.gis.db.models.functionsr   Údjango.contrib.gis.measurer   r†   r�   Ú	django.dbr   Údjango.utils.functionalr   r	   r   r   r   Ú<module>r¥      s#   ðÝ 6Ý ;Ý :Ý BÝ 'Ý 3÷Hò Hr   