
    !\i.              
          S r SSKrSSKrSSKrSSKrSSKrSSKrSSKJrJ	r	  \R                  " \5      rS rS rS rS rS rS	 rS
 rS rS rS r\R.                  " S\S9r\R.                  " S\R2                  " 5       S9r\R.                  " SS\R2                  " 5       SS\S9r\R.                  " SS\R2                  " 5       SS\S9r\R:                  " SS\SSS9r\R:                  " SS\SSS9r \R:                  " SSSSS9r!\R:                  " S S\S!S"9r"\R:                  " S#S$\SS%S&9r#\R:                  " S'S(\RH                  " / S)Q5      SS*S9r%\R:                  " S+\R2                  " SS,9S-S.9r&\R:                  " S/SS0S19r'\R:                  " S2S3S\R2                  " 5       S4S59r(\R:                  " S6S7S\)SS8S99r*\R:                  " S:S;S<S=S\S>S?9r+\R:                  " S@SASBSCSDSE9r,\R:                  " SFSGS\-SCSHSI9r.\R:                  " SJ\SSKSLSM9r/\R:                  " SJ\SSNSOSM9r0\R:                  " S+\R2                  " SS,9\SSPSQ9r1\R:                  " SRSSSTSUSSCSVSW9r2\R:                  " SXSSYS19r3\R:                  " SZS[S\S]S^S_9r4g)`a+	  
Registry of common rio CLI options.  See cligj for more options.

.. code-block:: none

    -a, --all: Use all pixels touched by features.  In rio-mask, rio-rasterize
    --as-mask/--not-as-mask: interpret band as mask or not.  In rio-shapes
    --band/--mask: use band or mask.  In rio-shapes
    --bbox:
    -b, --bidx: band index(es) (singular or multiple value versions).
        In rio-info, rio-sample, rio-shapes, rio-stack (different usages)
    --bounds: bounds in world coordinates.
        In rio-info, rio-rasterize (different usages)
    --count: count of bands.  In rio-info
    --crop: Crop raster to extent of features.  In rio-mask
    --crs: CRS of input raster.  In rio-info
    --default-value: default for rasterized pixels.  In rio-rasterize
    --dimensions: Output width, height.  In rio-rasterize
    --dst-crs: destination CRS.  In rio-transform
    --fill: fill value for pixels not covered by features.  In rio-rasterize
    --formats: list available formats.  In rio-info
    --height: height of raster.  In rio-info
    -i, --invert: Invert mask created from features: In rio-mask
    -j, --geojson-mask: GeoJSON for masking raster.  In rio-mask
    --lnglat: geographic coordinates of center of raster.  In rio-info
    --masked/--not-masked: read masked data from source file.
        In rio-calc, rio-info
    -m, --mode: output file mode (r, r+).  In rio-insp
    --name: input file name alias.  In rio-calc
    --nodata: nodata value.  In rio-info, rio-merge (different usages)
    --photometric: photometric interpretation.  In rio-stack
    --property: GeoJSON property to use as values for rasterize.  In rio-rasterize
    -r, --res: output resolution.
        In rio-info, rio-rasterize (different usages.  TODO: try to combine
        usages, prefer rio-rasterize version)
    --sampling: Inverse of sampling fraction.  In rio-shapes
    --shape: shape (width, height) of band.  In rio-info
    --src-crs: source CRS.
        In rio-insp, rio-rasterize (different usages.  TODO: consolidate usages)
    --stats: print raster stats.  In rio-inf
    -t, --dtype: data type.  In rio-calc, rio-info (different usages)
    --width: width of raster.  In rio-info
    --with-nodata/--without-nodata: include nodata regions or not.  In rio-shapes.
    -v, --tell-me-more, --verbose
    --vfs: virtual file system.
    N)_parse_path_UnparsedPathc                    U(       d  0 $ 0 nU Hp  nSU;  a  [         R                  " SU 35      eUR                  SS5      u  pVUR                  5       nUR                  5       nUR                  5       S;   a  SOUX5'   Mr     U$ )aV  
click callback to validate `--opt KEY1=VAL1 --opt KEY2=VAL2` and collect
in a dictionary like the one below, which is what the CLI function receives.
If no value or `None` is received then an empty dictionary is returned.

    {
        'KEY1': 'VAL1',
        'KEY2': 'VAL2'
    }

Note: `==VAL` breaks this as `str.split('=', 1)` is used.
=z Invalid syntax for KEY=VAL arg:    )nonenullnilnadaN)clickBadParametersplitlower)ctxparamvalueoutpairkvs          W/var/www/html/kml_chatgpt/mouzaenv/lib/python3.13/site-packages/rasterio/rio/options.py_cb_key_valr   >   s     	D$((+KD6)RSSzz#q)GGIGGI!".M!MST  
    c                     SR                  [        R                  R                  U 5      R	                  [        R                  R
                  5      5      $ )z1Return forward-slashed version of os.path.abspath/)joinospathabspathr   sep)r   s    r   abspath_forward_slashesr!   \   s1    88BGGOOD)//<==r   c                 2    [        U5      n[        U[        5      (       as  [        R                  R                  UR                  5      (       a9  [        R                  R                  U5      (       a  [        UR                  5      $ UR                  $ UR                  (       a  UR                  (       a  UR                  $ UR                  (       a  [        R                  R                  UR                  5      (       aW  [        R                  R                  U5      (       a3  [        UR                  5      nUR                   SU SUR                   3$ [        SUR                   S35      e[        R                  R                  UR                  5      (       a9  [        R                  R                  U5      (       a  [        UR                  5      $ [        SUR                   S35      e! [         a    [        R                   " U S35      ef = f)z+Normalize ordinary filesystem and VFS pathsz://!zInput archive z does not existzInput file z is not a valid input file)r   
isinstancer   r   r   existsrasterioshutilr!   namescheme	is_remotearchiveOSError	Exceptionr   r   )r   r   r   r   r+   s        r   file_in_handlerr.   a   so   G5!dM**ww~~dii((X__-C-CE-J-J.tyy99yy [[T^^99\\ww~~dll++0F0Fu0M0M1$,,?++c'!DII;??t||nOLMM ww~~dii((X__-C-CE-J-J.tyy99DII;oFGG G  E7*D!EFFGs,   BG2 	G2 -G2 BG2 A?G2 G2 2$Hc                 2   ^ ^ [        U U4S jU 5       5      $ )%Process and validate input file namesc              3   >   >#    U  H  n[        TTU5      v   M     g 7fNr.   .0itemr   r   s     r   	<genexpr>#files_in_handler.<locals>.<genexpr>   s     EuteT22u   tupler   r   r   s   `` r   files_in_handlerr=      s    EuEEEr   c                 V   ^ ^ [        U U4S jUSS  5       5      [        USS 5      -   $ )r0   c              3   >   >#    U  H  n[        TTU5      v   M     g 7fr2   r3   r4   s     r   r7   &files_inout_handler.<locals>.<genexpr>   s     JzteT22zr9   Nr:   r<   s   `` r   files_inout_handlerrB      s.    JuSbzJJUSXY[Y\S]M^^^r   c                     U R                   (       ab  U R                   R                  S5      (       aB  US:X  d   U R                   R                  S5      (       a  U R                   S   UR                     $ g)zdReturn the value for an option from the context if the option
or `--all` is given, else return None.likeall_likeN)objgetr(   r<   s      r   from_like_contextrH      sP     ww377;;v&&VOsww{{:66wwvuzz**r   c                 r   U R                   c  0 U l         U(       a  [        R                  " U5       nUR                  nX@R                   S'   US   U R                   S   S'   UR	                  5       U R                   S   S'   UR
                  U R                   S   S'   SSS5        gg! , (       d  f       g= f)zVCopy a dataset's meta property to the command context for access
from other callbacks.NrD   	transformtagscolorinterpTF)rF   r&   openmetarK   rL   )r   r   r   srcmetadatas        r   like_handlerrQ      s     ww]]5!SxxH&GGFO+3K+@CGGFOK(&)hhjCGGFOF#-0__CGGFOM* "  "! s   A,B((
B6c                     Ub  UR                  5       S;   a  g [        U5      $ ! [        [        4 a    [        R
                  " U< S3USS9ef = f)zReturn a float or NoneN)r	   r
   r   r   z is not a numbernodata)r   
param_hint)r   float	TypeError
ValueErrorr   r   r<   s      r   nodata_handlerrX      s]    })HH	<:& 	$$)+,Eh 	s	   
% +Ac                 N    US:X  d  Uc  [        XU5      nUb  U$ [        XU5      $ )zGet nodata value from a template file or command line.

Expected values are 'like', 'null', a numeric value, 'nan', or None.

Returns
-------
float or None

Raises
------
click.BadParameter

rD   )rH   rX   r   r   r   retvals       r   edit_nodata_handlerr\      s3     %-"3u5M#e,,r   c                 (   [        XU5      nUcO  UbL   UR                  S5      n[        S [        R                  " SU5       5       5      n[        U5      S:X  d   eU$ U$ ! [         a&    [        R                  " SR                  U5      5      ef = f)z!Handle different forms of bounds.z, []c              3   8   #    U  H  n[        U5      v   M     g 7fr2   )rU   )r5   xs     r   r7   !bounds_handler.<locals>.<genexpr>   s     H-G588-Gs   z[,\s]+   z/{!r} is not a valid bounding box representation)
rH   stripr;   rer   lenr-   r   r   formatrZ   s       r   bounds_handlerrf      s    s51F~%+	KK'EHRXXi-GHHFv;!###M   	$$AHHO 	s   A
A! !0BINPUT)callbackOUTPUT)typefilesrA   Tz	INPUTS...)nargsrj   requiredmetavarrh   zINPUTS... OUTPUTz-bz--bidxr   z#Input file band index (default: 1).)rj   defaulthelpzIndexes of input file bands.)rj   multiplerp   )rq   rp   z--boundsz@Bounds: 'left bottom right top' or '[left, bottom, right, top]'.)ro   rh   rp   z--dimensions   z1Output dataset width, height in number of pixels.)rl   rj   ro   rp   z-tz--dtype)ubyteuint8uint16int16uint32int32float32float64zOutput data type.z--like)r%   zRaster dataset to use as a template for obtaining affine transform (bounds and resolution), crs, data type, and driver used to create the output.)rj   rp   z--masked/--not-maskedzPEvaluate expressions using masked arrays (the default) or ordinary numpy arrays.)ro   rp   z-oz--outputz?Path to output file (optional alternative to a positional arg).)ro   rj   rp   z-rz--reszOutput dataset resolution in units of coordinate reference system. Pixels assumed to be square if this option is used once, otherwise use: --res pixel_width --res pixel_height.)rq   rj   ro   rp   z--coz	--profilecreation_optionsz
NAME=VALUEzlDriver specific creation options. See the documentation for the selected output driver for more information.)rn   rq   rh   rp   z--rgbphotometricrgbFz#Set RGB photometric interpretation.)
flag_valuero   rp   z--overwrite	overwritez)Always overwrite an existing output file.)is_flagrj   ro   rp   z--nodataz
NUMBER|nanzSet a Nodata value.)rh   ro   rn   rp   zNUMBER|nan|nullzModify the Nodata value.zsRaster dataset to use as a template for obtaining affine transform (bounds and resolution), crs, and nodata values.)rj   rh   is_eagerrp   z-az--allz--all_touchedall_touchedzUse all pixels touched by features, otherwise (default) use only pixels whose center is within the polygon or that are selected by Bresenhams line algorithm)r   ro   rp   z--sequence/--collectionzWrite a LF-delimited sequence of texts containing individual objects (the default) or write a single JSON text containing a feature collection object.z-fz--formatz--driverdriverzOutput format driver.)rp   )5__doc__loggingr   rc   r   r&   rasterio.shutilrasterio._pathr   r   	getLogger__name__loggerr   r!   r.   r=   rB   rH   rQ   rX   r\   rf   argumentfile_in_argPathfile_out_argfiles_in_argfiles_inout_argoptionintbidx_optbidx_mult_optbidx_magic_opt
bounds_optdimensions_optChoice	dtype_optlike_file_opt
masked_opt
output_optrU   resolution_optr{   rgb_optbooloverwrite_opt
nodata_optedit_nodata_optlike_optall_touched_optsequence_opt
format_opt r   r   <module>r      sP  -^  	 	    5 
		8	$<>
G@F
_
"
-,$ nnW? ~~hUZZ\: ~~
	 ..
	 " <<(		.	0 (		'	) (	') \\	K	
 
#t	<>
 LL)	  
 		 	4	 
&' \\

 \\*		J	L
 't
12 <<
K+
  ,,]	.	0 ;tU	46
 \\	
 ,, 	# <<	4	 
FG ,,'?M
%	& ||
&' \\*j(1H
r   