
    !\i/                        S r SSKrSSKrSSKrSSKJr  SSKJr  SSK	J
r
  SSKJrJr  \R                  " SS9\R                  \R                   \R"                  \R$                  \R&                  " S	\SS
S9\R&                  " S\SSS9\R*                  \R,                  \R.                  \R0                  S 5       5       5       5       5       5       5       5       5       5       5       rg)zFile translation command    N)	MaskFlags)options)resolve_inout)	subdivideWindowz Copy and convert raster dataset.)
short_helpz--scale-ratioz$Source to destination scaling ratio.)typedefaulthelpz--scale-offsetz%Source to destination scaling offset.c
                 v   U R                   S      [        XUSS9u  pUS   n[        R                  " U5       nUR                  nUR                  SS5        U(       a  X=S'   U(       a  XMS'   US   nU(       a  XyS'   UR                  " S0 U	D6  S	=nnUR                  S
S5      (       a$  UR                  SU5      nUR                  SU5      n[        SSUR                  UR                  5      n[        R                  " U
S40 UD6 n[        UUU5       H  nUR                  US9nU(       a(  UR                  SSSS9n[        R                  " UUUSS9  U(       a(  UR                  SSSS9n[        R                   " UUUSS9  UR                  USSS9nUR#                  UUS9  [$        R&                  UR(                  S   ;   d  M  UR+                  UR-                  US9S   US9  M     SSS5        SSS5        SSS5        g! , (       d  f       N= f! , (       d  f       N(= f! , (       d  f       g= f)a  Copy and convert raster datasets to other data types and formats.

Data values may be linearly scaled when copying by using the
--scale-ratio and --scale-offset options. Destination raster values
are calculated as

  dst = scale_ratio * src + scale_offset

For example, to scale uint16 data with an actual range of 0-4095 to
0-255 as uint8:

  $ rio convert in16.tif out8.tif --dtype uint8 --scale-ratio 0.0625

Format specific creation options may also be passed using --co. To
tile a new GeoTIFF output file, do the following.

  --co tiled=true --co blockxsize=256 --co blockysize=256

To compress it using the LZW method, add

  --co compress=LZW

env   )filesoutput	overwrite
num_inputsr   driverNdtypephotometrici   tiledF
blockxsize
blockysizew)windowfloat64unsafe)castingcopy)outr    )objr   rasterioopenprofilepopupdategetr   widthheightr   readastypenpmultiplyaddwriter   per_datasetmask_flag_enums
write_mask
read_masks)ctxr   r   r   r   scale_ratioscale_offsetr   r   creation_options
outputfile	inputfilesrcr$   	dst_dtypebxsizebysizesrcdsdstchunkdataresults                         W/var/www/html/kml_chatgpt/mouzaenv/lib/python3.13/site-packages/rasterio/rio/convert.pyconvertrD      s   N 
))

 !H	]]9% kkGKK$'$*!#( (I2=/NN.-.""FV{{7E** \6: \6:1aCJJ7Ez3:':c&uff=E88581D"#{{9hU{S +4K $  ${{9hU{S ,D(L "[[H5[QFIIfUI3 ,,0C0CA0FFs~~U~'CA'FuU+ > ;1 & 
> ;:1 &% 
sB   )H*CH	B>H$H/H7H*
HH
H'	#H**
H8)__doc__clicknumpyr,   r"   rasterio.enumsr   rasterio.rior   rasterio.rio.helpersr   rasterio.windowsr   r   commandfiles_inout_arg
output_opt
format_opt	dtype_optoptionfloatrgb_optoverwrite_optr7   pass_contextrD   r        rC   <module>rW      s        $   . . <=oE49;UD:<PV    <;     >PVrV   