
     h                        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j%                  dddd       ej'                  d      Zej+                  dd      Zej%                  dd       ej%                  ddddgd       ej%                  dd       ej%                  dd        ej%                  d!d"       ej%                  d#d$d       ej%                  d%d&d       ej%                  d'd(d       ej%                  d)d*d       ej%                  d+d,d       ej%                  d-d.       ej%                  ddd/d       d0 Zd1 Zed2k(  r e        yy)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        j                          y| j                  rMt        | j                  | j                  | j                  | j
                  | j                  f      rt        d      d}| j                  S| j                  j                  d      \  }}}}t        t        |      t        |      t        |      t        |            }| j                  r| j                  rt        d      | j                  }| j                  r5t               j                  t         j"                  j$                        d   }n|st'        d      }t)        | j                  | j
                  | j                  || j*                  | j,                   | j.                  |      }| j                  rt1        d	       t1        d
       n
t3               }|D ]i  }	| j                  r.t1        |	d   d   |	d   d   |	d   j5                  d      d       =|	d   d   }
t7         d|
 |
|| j8                  |	d   d          k y)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              k/home/developers/rajanand/mypropertyqr-fmb-refixing-v2/venv/lib/python3.12/site-packages/pyproj/__main__.py_parse_sync_commandrD   r   sE    IIOOHHNNII	
	 	 xxCIIOONNII	
 6
 	

 Dyy#'99??3#7 eT5t,t,	
 !6!6WXX,,'>//<Q?,T2#..$$&&#'#>#>>#'#B#B)	E 2323$& ??\"6*\";/\"&&}5	 L)&1H#$:Qxj1#*L)+6    c                      t         j                         } t        | d      rt        |        y| j                  rt        j                          yt         j                          y)z:
    Main entrypoint into the command line interface.
    r"   N)parser
parse_argshasattrrD   r.   r   show_versionsr5   )r?   s    rC   mainrK      sC     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      s6    	 @ @  :  
!	 	 ";-/?@P?QQRS
   	6	   """4
##	T $    	$     	% :&     	A     	J     	P     	3  
   "	5  
   >|     9,     	2      	Q     +9,  
Nb
 zF rE   