
    !\i                     f   S r SSKrSSKrSSKrSSKrSSKJr  SSKJrJ	r	J
r
  SSKJr  SSKJrJr  S rS r\R$                  " S	S
9\R&                  \R(                  \R*                  \R,                  " SS\SS9\R,                  " SS\SS9\R,                  " SS\SS9\R0                  \R,                  " S\SSS9\R,                  " S\SS9\R2                  \R4                  \R6                  \R8                  S 5       5       5       5       5       5       5       5       5       5       5       5       5       5       rg)zThe rio create command.    N)CRS)CRSErrorFileOverwriteErrorRasterioIOError)options)Affineguard_transformc                     SnUb   [         R                  " U5      nU$ U$ ! [         a    [        R                  " U S3USS9ef = f)z$Get crs value from the command line.Nz is not a recognized CRS.crsparam
param_hint)r   from_stringr   clickBadParameterctxr   valueretvals       V/var/www/html/kml_chatgpt/mouzaenv/lib/python3.13/site-packages/rasterio/rio/create.pycrs_handlerr      s^    F	__U+F
 M6M	  	$$'235U 	s	   ! $Ac                     SnUb$   [         R                  " U5      n[        U5      nU$ U$ ! [         a    [        R
                  " U S3USS9ef = f)z*Get transform value from the command line.Nz' is not recognized as a transformarray.	transformr   )jsonloadsr	   	Exceptionr   r   r   s       r   transform_handlerr      sj    F	JJu%E$U+F M6M  	$$'@A& 	s	   !, $Az"Create an empty or filled dataset.)
short_helpz--countz-nzNumber of raster bands.)typehelpz--heightz-hz!Raster height, or number of rows.z--widthz-wz#Raster width, or number of columns.z--crszCoordinate reference system.)callbackdefaultr    z--transformz;Affine transform matrix. Overrides any given bounds option.)r!   r    c                 6   [         R                  R                  U5      (       a  U(       d  [        S5      eO3 [        R
                  " U5       nU(       d  [        S5      e SSS5        SnU
(       aF  U
u  nnnnUU-
  U-  nUU-
  U-  n[        R                  " UU5      [        R                  " UU5      -  nU	(       a  Ub  [        R                  " SSS9  U	n[        SUUUUUUUUS	.UD6nU R                  S
      [        R
                  " US40 UD6 n SSS5        SSS5        g! , (       d  f       N= f! [         a1  nS[        U5      ;   a   SnANU(       d  [        S5      e SnAGNSnAff = f! , (       d  f       Nf= f! , (       d  f       g= f)a  Create an empty dataset.

The fundamental, required parameters are: format driver name, data
type, count of bands, height and width in pixels. Long and short
options are provided for each of these. Coordinate reference system
and affine transformation matrix are not strictly required and have
long options only. All other format specific creation outputs must
be specified using the --co option.

Simple north-up, non-rotated georeferencing can be set by using the
--bounds option. The --transform option will assign an arbitrarily
rotated affine transformation matrix to the dataset. Ground control
points, rational polynomial coefficients, and geolocation matrices
are not supported.

The pixel values of an empty dataset are format specific. "Smart"
formats like GTiff use 0 or the nodata value if provided.

Example:


     $ rio create new.tif -f GTiff -t uint8 -n 3 -h 512 -w 512 \
     > --co tiled=true --co blockxsize=256 --co blockysize=256

The command above produces a 3-band GeoTIFF with 256 x 256 internal
tiling.
zMFile exists and won't be overwritten without use of the '--overwrite' option.zPDataset exists and won't be overwritten without use of the '--overwrite' option.NzNo such file or directoryzOObject exists and won't be overwritten without use of the '--overwrite' option.zd--transform value is overriding --bounds value. Use only one of these options to avoid this warning.T)err)driverdtypecountheightwidthnodatar   r   envw )ospathexistsr   rasterioopenr   strr   translationscaler   echodictobj)r   outputr%   r&   r'   r(   r)   r*   r   r   bounds	overwritecreation_optionsdatasetexcgeo_transformleftbottomrighttopsxsyprofiles                          r   createrG   /   s   @ 
ww~~f$_  
	v&' ,j  ! '& M#) feSdle#slf$**45R8LL$JJG
 " 

 
G 
vs>g>' ?_ '&  
	 +c#h6 !,i  !
	R ?>s_   D; D*#D; >F
E9F
*
D84D; 8D; ;
E6E1E11E69
F	F


F)__doc__r   r   r.   r1   rasterio.crsr   rasterio.errorsr   r   r   rasterio.rior   rasterio.transformr   r	   r   r   commandfile_out_arg
format_opt	dtype_optoptionint
nodata_opt
bounds_optoverwrite_optr<   pass_contextrG   r-       r   <module>rX      sH      	   
 ! 6
  >?iC.GHj$S/RSiC.STk46T 	F
 	c      U T I    @(crW   