
    cd                     8   d dl Z ddlmZ ddlmZ d Zd Zd Zd Zd	 Z	d
 Z
d Z ej                    Zg ej        _         e j        e j                  ej        _        e
ej        _        g ej        _        e j        ej        _        g ej        _         e j        e j                  ej        _        eej        _        g ej        _         e j        e j                  ej        _        e
ej        _        g ej        _        e j        ej        _        g ej        _        dej        _        e j        gej        _        e j        ej        _        eej        _        dZ	 d e                                                    d                              d          D             \  ZZ Z!ee e!fdk     rdZn# e"e#f$ r Y nw xY w e j$        e j         e j        e j%                   e j         e j        e j&                             e j         e j        e j&                             e j        e j'                   e j         e j        e j(                             e j        ere j)        ne j'                            Z*e j        e*gej+        _        e j        ej+        _        eej+        _        e j        gej,        _        dej,        _        eej,        _        e j        gej-        _        e j        ej-        _        eej-        _        e j        e j%         e j        e j&                   e j        e j&                  e j'        gej.        _        e j        ej.        _        eej.        _        e j        e j%         e j        e j&                   e j        e j&                  e j'         e j        e j(                  e j'        gej/        _        e j        ej/        _        eej/        _        e j         e j         e j        e j&                             e j         e j        e j&                             e j        e j'                  gej0        _        e j        ej0        _        eej0        _        e j        gej1        _        e j        ej1        _        eej1        _        e j         e j        e j&                   e j        e j&                  e j'         e j         e j        e j                             e j        e j2                  gej3        _        e j        ej3        _        eej3        _        e j         e j        e j&                   e j        e j&                  e j'         e j         e j        e j%                             e j        e j2                  gej4        _        e j        ej4        _        eej4        _        e j         e j        e j&                   e j        e j&                  e j'         e j        e j2                  gej5        _        e j         e j        e j&                   e j        e j&                  e j'         e j         e j        e j                             e j        e j2                  gej6        _        e j        ej6        _        eej6        _        e j         e j        e j&                   e j        e j&                  e j'         e j         e j        e j%                             e j        e j2                  gej7        _        e j        ej7        _        eej7        _        e j         e j        e j'                   e j         e j        e j'                             e j         e j        e j%                             e j         e j         e j        e j%                                       e j         e j         e j        e j&                                       e j         e j         e j        e j&                                       e j        e j'                  gej8        _        e j        ej8        _        eej8        _         e j         e j        e j                            e j'        gej9        _        dej9        _        eej9        _        e j        gej:        _        dej:        _        eej:        _         e j        e j                  gej;        _        dej;        _        e j        gej<        _        dej<        _        eej<        _        e j         e j         e j        e j(                             e j        e j2                  gej=        _        e j        ej=        _        eej=        _        e j         e j         e j        e j&                             e j         e j        e j&                             e j        e j'                  gej>        _        e j        ej>        _        eej>        _        e j        gej?        _        e j%        ej?        _        eej?        _        	 e j        gej@        _        e j%        ej@        _        eej@        _        e j        e j%        gejA        _        e j        ejA        _        eejA        _        e j        gejB        _        e j%        ejB        _        eejB        _        e j        e j%        gejC        _        e j        ejC        _        eejC        _        e j        gejD        _        dejD        _        eejD        _        e j         e j        e j&                   e j        e j&                  e j'         e j         e j        e j                             e j        e j2                  gejE        _        e j        ejE        _        eejE        _        e j         e j        e j&                   e j        e j&                  e j'         e j         e j        e j%                             e j        e j2                  gejF        _        e j        ejF        _        eejF        _        n# eG$ r Y nw xY wg ejH        _        e j        ejH        _        eejH        _        e j        gejI        _        dejI        _        eejI        _        e j        e j        gejJ        _        e j        ejJ        _        eejJ        _        e j        gejK        _        e j        ejK        _        eejK        _        e j        e j'        gejL        _        e j        ejL        _        eejL        _        e j        gejM        _        e j'        ejM        _        eejM        _        e j        e j        gejN        _        e j        ejN        _        eejN        _        e j        gejO        _        e j        ejO        _        eejO        _        e j        e j        gejP        _        e j        ejP        _        eejP        _        e j        gejQ        _        e j        ejQ        _        eejQ        _        e j        e j'        gejR        _        e j        ejR        _        eejR        _        e j        gejS        _        e j'        ejS        _        eejS        _        e j        e j'        gejT        _        e j        ejT        _        eejT        _        e j        gejU        _        e j'        ejU        _        eejU        _        e j        e j'        gejV        _        e j        ejV        _        eejV        _        e j        gejW        _        e j'        ejW        _        eejW        _        e j        e j'        gejX        _        e j        ejX        _        eejX        _        e j        gejY        _        e j'        ejY        _        eejY        _        e j        e j'        gejZ        _        e j        ejZ        _        eejZ        _        e j        gej[        _        e j'        ej[        _        eej[        _        e j        e j'        gej\        _        e j        ej\        _        eej\        _        e j        gej]        _        e j'        ej]        _        eej]        _        e j        e j'        gej^        _        e j        ej^        _        eej^        _        e j        gej_        _        e j'        ej_        _        eej_        _        e j        e j'        gej`        _        e j        ej`        _        eej`        _        e j        geja        _        e j'        eja        _        eeja        _        e j        e j'        gejb        _        e j        ejb        _        eejb        _        e j        gejc        _        e j'        ejc        _        eejc        _        e j        e j'        gejd        _        e j        ejd        _        eejd        _        e j        geje        _        e j'        eje        _        eeje        _        e j        e j'        gejf        _        e j        ejf        _        eejf        _        e j        gejg        _        e j'        ejg        _        eejg        _        e j        e j'        gejh        _        e j        ejh        _        eejh        _        e j        geji        _        e j'        eji        _        eeji        _        e j        e j&        gejj        _        e j        ejj        _        eejj        _        e j        gejk        _        e j&        ejk        _        eejk        _        e j        e j&        gejl        _        e j        ejl        _        eejl        _        e j        gejm        _        e j&        ejm        _        eejm        _        e j        e j&        gejn        _        e j        ejn        _        eejn        _        e j        gejo        _        e j&        ejo        _        eejo        _        e j        e j&        gejp        _        e j        ejp        _        eejp        _        e j        gejq        _        e j&        ejq        _        eejq        _        e j        e jr        gejs        _        e j        ejs        _        eejs        _        e j        gejt        _        e
ejt        _         e j        e j                  ejt        _        e j        e jr        geju        _        e j        eju        _        eeju        _        e j        gejv        _        e
ejv        _         e j        e j                  ejv        _        e j        e jr        gejw        _        e j        ejw        _        eejw        _        e j        gejx        _        e
ejx        _         e j        e j                  ejx        _        e j        e j'        gejy        _        e j        ejy        _        eejy        _        e j        gejz        _        e j'        ejz        _        eejz        _        e j        e j        gej{        _        e j        ej{        _        eej{        _        e j        gej|        _        e j        ej|        _        eej|        _        e j        e j%        gej}        _        e j        ej}        _        eej}        _        e j        gej~        _        e j%        ej~        _        eej~        _        e j)        gej        _        e j        ej        _        eej        _        e j        gej        _        dej        _        	 e j        e j%         e j        e j&                   e j        e j&                   e j        e j&                   e j        e j&                  e j&        e j&        e j'         e j        e j(                  e j)        gej        _        e j        ej        _        eej        _        e j        e j%         e j        e j&                   e j        e j&                   e j        e j&                   e j        e j&                  e j&        e j&        e j'        g	ej        _        e j        ej        _        eej        _        e j         e j        e j&                   e j        e j&                   e j        e j&                   e j        e j&                  e j&        e j&        e j'         e j         e j        e j%                             e j        e j2                  g
ej        _        e j        ej        _        eej        _        e j         e j        e j&                   e j        e j&                   e j        e j&                   e j        e j&                  e j&        e j&        e j'         e j         e j        e j                             e j        e j2                  g
ej        _        e j        ej        _        eej        _        e j         e j        e j&                   e j        e j&                   e j        e j&                   e j        e j&                  e j&        e j&        e j'         e j        e j2                  g	ej        _        e j        ej        _        eej        _        e j         e j        e j&                   e j        e j&                   e j        e j&                   e j        e j&                  e j&        e j&        e j'         e j         e j        e j%                             e j        e j2                  g
ej        _        e j        ej        _        eej        _        e j         e j        e j&                   e j        e j&                   e j        e j&                   e j        e j&                  e j&        e j&        e j'         e j         e j        e j                             e j        e j2                  g
ej        _        e j        ej        _        eej        _        dS # eG$ r Y dS w xY w)    N   )finder)
RTreeErrorc                     | dk    r`t                                                                           }d|j         d| }t                                            t          |          dS )zError checking for Error callsr   
Error in "": T)rtError_GetLastErrorMsgdecode__name__Error_Resetr   resultfunccargssmsgs        *lib/python3.11/site-packages/rtree/core.pycheck_returnr      sc    { $$&&--//04=00Q00
oo4    c                     t          |           s`t                                                                          }d|j         d| }t                                           t          |          | S )z Error checking for void* returnsr   r   )boolr	   r
   r   r   r   r   r   s        r   
check_voidr      se    << $$&&--//04=00Q00
ooMr   c                     t                                           r`t                                                                           }d|j         d| }t                                            t          |          | S )zBError checking for void* returns that might be empty with no errorr   r   r	   Error_GetErrorCountr
   r   r   r   r   r   s        r   check_void_doner      sk    	 $$&&--//04=00Q00
ooMr   c                    t                                           }|dk    r`t                                                                           }d|j         d| }t                                            t          |          | S z#Error checking proper value returnsr   r   r   r   r   r   r   countr   r   s         r   check_valuer"   %   t    ""$$Ez $$&&--//04=00Q00
ooMr   c                    t                                           }|dk    r`t                                                                           }d|j         d| }t                                            t          |          | S r   r   r    s         r   check_value_freer%   0   r#   r   c                     t          j        |           }t          j        | t          j        t           j                            }t
                              |           |S Nctypes	string_atcastPOINTERc_void_pr	   
Index_Freer   r   r   retvalueps        r   free_returned_char_pr2   ;   F    ''HFFN6?;;<<AMM!Or   c                     t          j        |           }t          j        | t          j        t           j                            }t
                              |           |S r'   r(   r/   s        r   free_error_msg_ptrr5   B   r3   r   Tc              #   4   K   | ]}t          |          V  d S r'   )int).0parts     r   	<genexpr>r:   g   s9        D		     r   ascii.)r   	   r   F)r)    r   
exceptionsr   r   r   r   r"   r%   r2   r5   loadr	   SIDX_Versionargtypesr,   c_charrestypeerrcheckError_GetLastErrorNumc_intr
   Error_GetLastErrorMethodr   r   r-   Index_Create_nDataLength_size_tr   split_major_minor_patch
ValueErrorUnicodeDecodeError	CFUNCTYPEc_int64c_doublec_uint32c_ubytec_size_tNEXTFUNCIndex_CreateWithStreamIndex_DestroyIndex_GetPropertiesIndex_DeleteDataIndex_InsertDataIndex_GetBoundsIndex_IsValidc_uint64Index_Intersects_objIndex_Intersects_idIndex_Intersects_countIndex_NearestNeighbors_objIndex_NearestNeighbors_idIndex_GetLeavesIndex_DestroyObjResultsIndex_ClearBufferr.   IndexItem_DestroyIndexItem_GetDataIndexItem_GetBoundsIndexItem_GetIDIndex_GetResultSetOffsetIndex_SetResultSetOffsetIndex_GetResultSetLimitIndex_SetResultSetLimitIndex_FlushIndex_Contains_objIndex_Contains_idAttributeErrorIndexProperty_CreateIndexProperty_DestroyIndexProperty_SetIndexTypeIndexProperty_GetIndexTypeIndexProperty_SetDimensionIndexProperty_GetDimensionIndexProperty_SetIndexVariantIndexProperty_GetIndexVariantIndexProperty_SetIndexStorageIndexProperty_GetIndexStorageIndexProperty_SetIndexCapacityIndexProperty_GetIndexCapacityIndexProperty_SetLeafCapacityIndexProperty_GetLeafCapacityIndexProperty_SetPagesizeIndexProperty_GetPagesize!IndexProperty_SetLeafPoolCapacity!IndexProperty_GetLeafPoolCapacity"IndexProperty_SetIndexPoolCapacity"IndexProperty_GetIndexPoolCapacity#IndexProperty_SetRegionPoolCapacity#IndexProperty_GetRegionPoolCapacity"IndexProperty_SetPointPoolCapacity"IndexProperty_GetPointPoolCapacity"IndexProperty_SetBufferingCapacity"IndexProperty_GetBufferingCapacity IndexProperty_SetEnsureTightMBRs IndexProperty_GetEnsureTightMBRsIndexProperty_SetOverwriteIndexProperty_GetOverwrite)IndexProperty_SetNearMinimumOverlapFactor)IndexProperty_GetNearMinimumOverlapFactorIndexProperty_SetWriteThroughIndexProperty_GetWriteThroughIndexProperty_SetFillFactorIndexProperty_GetFillFactor(IndexProperty_SetSplitDistributionFactor(IndexProperty_GetSplitDistributionFactorIndexProperty_SetTPRHorizonIndexProperty_GetTPRHorizonIndexProperty_SetReinsertFactorIndexProperty_GetReinsertFactorc_char_pIndexProperty_SetFileNameIndexProperty_GetFileName%IndexProperty_SetFileNameExtensionDat%IndexProperty_GetFileNameExtensionDat%IndexProperty_SetFileNameExtensionIdx%IndexProperty_GetFileNameExtensionIdx+IndexProperty_SetCustomStorageCallbacksSize+IndexProperty_GetCustomStorageCallbacksSize'IndexProperty_SetCustomStorageCallbacks'IndexProperty_GetCustomStorageCallbacksIndexProperty_SetIndexIDIndexProperty_GetIndexIDSIDX_NewBufferSIDX_DeleteBufferIndex_InsertTPDataIndex_DeleteTPDataIndex_TPIntersects_idIndex_TPIntersects_objIndex_TPIntersects_countIndex_TPNearestNeighbors_idIndex_TPNearestNeighbors_obj r   r   <module>r      s          " " " " " "               V[]] (&.77 / $&  !#)<   $&  !#16>&-#@#@   $6  !')  $&4fnV]&C&C  #';  $"$  !'    "O,  / %  	$  oo//66w??EEcJJ  FFF 	)+ $# 	&' 	 	 	D	 6
LFN6>""FN>6>&/2233FN>6>&/2233FN6?##FN>6>&.1122FN&9N6??vOO  '-ox%@  "$*O  !%/  "#_-    +  #)?"3  !'  ",   O
NFN6?##FN6?##
O    %l  +   O
NFN6?##FN6?##
OFN6>""
O    %l  +   OFN>6>&/2233FN>6>&/2233FN6?##	   $\  )  #_-  !<  '   OFN6?##FN6?##
OFN>6>&/2233FN6?##$    #),  #/    OFN6?##FN6?##
OFN>6>&.1122FN6?###   "(  ".   OFN6?##FN6?##
OFN6?##&  " OFN6?##FN6?##
OFN>6>&/2233FN6?##*  & )/  %)5  & OFN6?##FN6?##
OFN>6>&.1122FN6?##)  % (.|  $(4  % OFN6?##FN>6>&/2233FN>6>&.1122FN>6>.&."@"@AABBFN>6>.&."A"ABBCCFN>6>.&."A"ABBCCFN6?##	   $\  *   FN>6>&/2233
O'  # &*  "&5  #!' 1  #   /  (&.99:  !' 1  #   /   OFN>6>&.1122FN6?##!  
  &|   +   OFN>6>&/2233FN>6>&/2233FN6?##	#   "(  "-  %/  #^  )  ,	,2O+<B(*0.B'+6B(,2OV^+LB(*0,B'+7B(+1?*;B')/B&*5B'+1?FN*KB')/B&*6B'%/BN!BN-BN 	v''v''~v~fo6677v''&B" %+LB!%1B" 	v''v''~v~fn5566v''%B! $*<B $0B!! 	 	 	D	 $&   "(/  #-   %+_$5  !#'   $3  !*0/6<)H  &(.  %)5  &*0/):  &(.  %)4  &*0/6?)K  &(.  %)5  &*0/):  &(.  %)4  &-3_fl,K   )+1<   (,8   )-3_,=   )+1<   (,7   )-3_fl,K   )+1<   (,8   )-3_,=   )+1<   (,7   ).4ov-O ! *,2L ! )-9 ! *.4o-> ! *,2O ! )-8 ! *-3_fo,N   )+1<   (,8   )-3_,=   )+1?   (,7   ))/&/(J  %'-|  $(4  %)/(9  %'-  $(3  %17&/0R $ -/5| $ ,0< $ -170A $ -/5 $ ,0; $ -28/6?1S % .06 % -1= % .28/1B % .06 % -1< % .39?FO2T & /17 & .2> & /39?2C & /17 & .2= & /28/6?1S % .06 % -1= % .28/1B % .06 % -1< % .28/6?1S % .06 % -1= % .28/1B % .06 % -1< % .06/Q # ,.4l # +/; # ,06/@ # ,.4o # +/: # ,*0/6?)K  &(.  %)5  &*0/):  &(.  %)4  & O
O9 , 5 8>| , 48D , 59?8I , 57= , 48C , 5-3_fo,N   )+1<   (,8   )-3_,=   )+1?   (,7   )+1?FO*L  ')/  &*6  '+1?*;  ')/  &*5  ' O
O8 + 4 7=l + 37C + 48>7H + 46<o + 37B + 4+1?FO*L  ')/  &*6  '+1?*;  ')/  &*5  '/5.P " +-3\ " *.: " +/5.? " +-3_ " *.9 " +)/&/(J  %'-|  $(4  %)/(9  %(<  %'5v~fm'D'D  $5;_fo4V ( 139< ( 04@ ( 15;_4E ( 14H ( 13A6>&-3P3P ( 05;_fo4V ( 139< ( 04@ ( 15;_4E ( 14H ( 13A6>&-3P3P ( 0 O
O; . 7 :@ . 6:F . 7;A?:K . 79? . 6:E . 77=6X * 35;\ * 26B * 37=6G * 35;_ * 26A * 3(.'H  $&,l  #'3  $(.'8  $&,n  #'2  $$o.  "O  '  !' 1  #  i	v''v''v''v''v~&&&B" %+LB!%1B" 	v''v''v''v''
&B" %+LB!%1B" 	v''v''v''v''~v~fn5566v'')B% (.|B$(4B% 	v''v''v''v''~v~fo6677v''*B& )/B%)5B& 	v''v''v''v''v''
,B( +1,B'+7B( 	v''v''v''v''~v~fn5566v''/B"+ .4\B"*.:B"+ 	v''v''v''v''~v~fo6677v''0B#, /5lB#+/;B#,,, 	 	 	DD	s?   AF2 2F<;F<Hq* *q21q2](T	Aq3 q3Aq<q;Aq<