
    rbi                        d Z ddlZddlZddlmZmZmZ ddlmZ ddl	m
Z
mZ ddlmZmZmZ  ej        de de d	
          Ze                    dddd           e                    d          Ze                    dd          Ze                    dd           e                    ddddgd           e                    dd           e                    dd            e                    d!d"           e                    d#d$d           e                    d%d&d           e                    d'd(d           e                    d)d*d           e                    d+d,d           e                    d-d.           e                    ddd/d           d0 Zd1 Zed2k    r e             dS dS )3zE
This is the main entry point for pyproj CLI

e.g. python -m pyproj

    N)__proj_version____version___show_versions)BBox)get_data_dirget_user_data_dir)_download_resource_fileget_proj_endpointget_transform_grid_listzpyproj version: z [PROJ version: ])descriptionz-vz	--verbosez+Show verbose debugging version information.
store_true)helpactioncommands)titlesynczBTool for synchronizing PROJ datum and transformation support data.)namer   z--bboxa  Specify an area of interest to restrict the resources to download. The area of interest is specified as a bounding box with geographic coordinates, expressed in degrees in an unspecified geographic CRS. `west_long` and `east_long` should be in the [-180,180] range, and `south_lat` and `north_lat` in the [-90,90]. `west_long` is generally lower than `east_long`, except in the case where the area of interest crosses the antimeridian.)r   z--spatial-testa`  Specify how the extent of the resource files are compared to the area of use specified explicitly with `--bbox`. By default, any resource files whose extent intersects the value specified by `--bbox` will be selected. If using the ``contains`` strategy, only resource files whose extent is contained in the value specified by `--bbox` will be selected.
intersectscontains)r   choicesdefaultz--source-idzRestrict resource files to be downloaded to those whose source_id property contains the ID value. Default is all possible values.z--area-of-usezRestrict resource files to be downloaded to those whose area_of_use property contains the AREA_OF_USE value. Default is all possible values.z--filezRestrict resource files to be downloaded to those whose name property  (file name) contains the FILE value. Default is all possible values.z--exclude-world-coveragez(Exclude files which have world coverage.z--include-already-downloadedz*Include grids that are already downloaded.z--list-filesz#List the files without downloading.z--allz%Download all missing transform grids.z--system-directoryzfIf enabled, it will sync grids to the main PROJ data directory instead of the user writable directory.z--target-directoryzFThe directory to sync grids to instead of the user writable directory.zPrint download information.c           
         t          | j        | j        | j        | j        | j        | j        f          st                                           dS | j        r<t          | j        | j        | j        | j        | j        f          rt          d          d}| j        f| j        
                    d          \  }}}}t          t          |          t          |          t          |          t          |                    }| j        r| j        rt          d          | j        }| j        r7t                      
                    t           j        j                  d         }n|st'          d          }t)          | j        | j        | j        || j        | j         | j        |          }| j        rt1          d	           t1          d
           nt3                      }|D ]}	| j        rEt1          |	d         d         |	d         d         |	d                             d          d           N|	d         d         }
t7          | d|
 |
|| j        |	d         d                    dS )z'
    Handle sync command arguments
    Nz]Cannot use '--all' with '--list-files', '--source-id','--area-of-use', '--bbox', or '--file'.,)westsoutheastnorthz:Cannot set both --target-directory and --system-directory.r   T)	source_idarea_of_usefilenamebboxspatial_testinclude_world_coverageinclude_already_downloadedtarget_directoryz"filename | source_id | area_of_usez"----------------------------------
propertiesr   r   r    z | )sep/	sha256sum)file_url
short_name	directoryverbosesha256)anyr"   
list_filesallr   r    filesync_parser
print_helpRuntimeErrorsplitr   floatr&   system_directoryr   ospathr(   r   r   r#   exclude_world_coverager%   printr
   getr	   r.   )argsr"   r   r   r   r   r&   gridsendpointgridr!   s              _/var/www/html/mdtn/previsions/meteo_cartes/venv/lib/python3.11/site-packages/pyproj/__main__.py_parse_sync_commandrD   r   s    IOHNI	
	 	  	   x 
CIONI	
  
 6
 
 	

 Dy#'9??3#7#7 eT5t,,t,,	
 
 
  Y!6 YWXXX, 3'>>//<<Q? 3,T22#.$&#'#>>#'#B)	 	 	E  '233323333$&&  ? 	\"6*\";/\"&&}55	     L)&1H#$11x11#*L)+6         c                      t                                           } t          | d          rt          |            dS | j        rt          j                     dS t                                            dS )z:
    Main entrypoint into the command line interface.
    r"   N)parser
parse_argshasattrrD   r.   r   show_versionsr5   )r?   s    rC   mainrK      sr     DtV D!!!!!	 $&&&&&rE   __main__)__doc__argparser:   pyprojr   r   r   
pyproj.aoir   pyproj.datadirr   r   pyproj.syncr	   r
   r   ArgumentParserrG   add_argumentadd_subparsers
subparsers
add_parserr4   rD   rK   __name__ rE   rC   <module>rZ      sc     				 @ @ @ @ @ @ @ @ @ @       : : : : : : : :          
!	 S;SS@PSSS
 
 
   	6	     """44
##	T $     	$       	% :&       	A       	J       	P       	3    
   "	5    
   >|       9,       	2        	Q       +9,    
N N Nb
 
 
 zDFFFFF rE   