
    `j                        S SK r S SKrS SKrS SKJrJrJrJrJrJ	r	J
r
  SSKJrJr  S SKJr  S SKJr  \ R$                  " \5      r\R*                  " SS9\R,                  " S	S
\R.                  " 5       SS9\\\\\	\\R0                  " SSS\SS9\R2                  \
\R4                  " SSS9\R6                  S 5       5       5       5       5       5       5       5       5       5       5       5       5       rg)    N)precision_opt
indent_optcompact_optprojection_geographic_optprojection_mercator_optprojection_projected_opt
use_rs_opt   )write_featuresto_lower)options)transform_boundsz*Write bounding boxes to stdout as GeoJSON.)
short_helpINPUTT)nargstyperequiredz	--dst-crs z	EPSG:NNNNz Output in specified coordinates.)defaultmetavarcallbackhelp)featurebboxr   )allowedr   c
                   ^^^^^ SSK mSS0n
U(       a  X:S'   U(       a  SU
S'   [        R                  " S5      n " UUUUU4S	 jS
5      nU R                  S    n[	        UU" U5      4UU	US.U
D6  SSS5        g! , (       d  f       g= f)zWrite bounding boxes to stdout as GeoJSON for use with, e.g.,
geojsonio::

  $ rio bounds *.tif | geojsonio

If a destination crs is passed via dst_crs, it takes precedence over
the projection parameter.
r   N	sort_keysTindent),:
separatorsstdoutc                   @   > \ rS rSrS r\S 5       rU UUUU4S jrSrg)bounds.<locals>.CollectionB   c                 ,    / U l         / U l        Xl        g N_xs_ysenv)selfr,   s     V/var/www/html/Sattelite-Image/venv/lib/python3.13/site-packages/rasterio/rio/bounds.py__init__#bounds.<locals>.Collection.__init__D   s    DHDHH    c                     [        U R                  5      [        U R                  5      [        U R                  5      [        U R                  5      4$ r(   )minr*   r+   max)r-   s    r.   r   bounds.<locals>.Collection.bboxI   s1    txx=#dhh-TXXDHHMMr1   c              3     >#    [        T5       GHU  u  pTR                  U5       nUR                  nT(       a  [        UR                  T/UQ76 nOBT
S:X  a  [        UR                  SS0/UQ76 nO"T
S:X  a  [        UR                  SS0/UQ76 nOUnS S S 5        T	S:  a  W Vs/ s H  n[        UT	5      PM     nnSWSUS   US	   /US
   US	   /US
   US   /US   US   /US   US	   ///S.[        U5      U[        R                  R                  U5      S.S.v   U R                  R                  US S S
2   5        U R                  R                  US	S S
2   5        GMX     g ! , (       d  f       N= fs  snf 7f)Nmercatorinitz	epsg:3857
geographicz	epsg:4326r   FeaturePolygonr
         )r   coordinates)idtitlefilename)r   r   geometry
properties)	enumerateopenboundsr   crsroundstrospathbasenamer*   extendr+   )r-   irK   srcrF   r   bdst_crsinput	precision
projectionrasterios          r.   __call__#bounds.<locals>.Collection.__call__M   s    $U+]]4(C ZZF/07 B:@ B#z1/170E PHN P#|3/170E PHN P  & ) >9=>AE!Y/D> &  )!!Wd1g.!!Wd1g.!!Wd1g.!!Wd1g.!!Wd1g.)0 (1!2 "!f!%$&GG$4$4T$:#<= =  SqS	*QTT
+G ,(( ?s*   #F A.E*F &E;<B.F *
E8	4F r)   N)	__name__
__module____qualname____firstlineno__r/   propertyr   rV   __static_attributes__)rQ   rR   rS   rT   rU   s   r.   
Collectionr%   B   s(    	
 
	N 
	N$	, $	,r1   r^   r,   )sequencegeojson_typeuse_rs)rasterio.warpclickget_text_streamobjr   )ctxrR   rS   r   compactrT   rQ   r_   ra   r`   	dump_kwdsr#   r^   r,   rU   s    ``  ``       @r.   rF   rF      s    J d#I$(",	,""8,F/, /, /,b 
3sO	
 %	
 	
 
s   A<<
B
)loggingrJ   rc   cligjr   r   r   r   r   r   r	   helpersr   r   rasterio.rior   rb   r   	getLoggerrX   loggercommandargumentPathoptionsequence_optgeojson_type_optpass_contextrF    r1   r.   <module>rw      s    	    .   * 
		8	$ FG r

tD[8	+- 	"5yIV
  J  -       E H"V
r1   