
    \i+                         S 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
  SSKJr  SSKJr  SS	KJrJr  SS
KJrJr  \" 5       r " S S\5      rg)a|  
Performs cartographic transformations (converts from
longitude,latitude to native map projection x,y coordinates and
vice versa) using PROJ (https://proj.org).

A Proj class instance is initialized with proj map projection
control parameter key/value pairs. The key/value pairs can
either be passed in a dictionary, or as keyword arguments,
or as a PROJ string (compatible with the proj command). See
:ref:`projections` for examples of
key/value pairs defining different map projections.

Calling a Proj class instance with the arguments lon, lat will
convert lon/lat (in degrees) to x/y native map projection
coordinates (in meters).
    N)Any)
cstrencode)Factors)CRS)TransformDirection)get_proj_operations_map)TransformerTransformerFromPipeline)_convertback_copytobufferc                      ^  \ rS rSrSr SS\S-  S\SS4U 4S jjjr   SS\S	\S
\S\S\S\\\4   4S jjr	  SS\S	\S\S\S\
4
S jjrS\4S jrS\S-  4S jrSS jrS\\S    \\   4   4S jrSrU =r$ )Proj!   aB  
Performs cartographic transformations. Converts from
longitude, latitude to native map projection x,y coordinates and
vice versa using PROJ (https://proj.org).

Attributes
----------
srs: str
    The string form of the user input used to create the Proj.
crs: pyproj.crs.CRS
    The CRS object associated with the Proj.

N
projparamspreserve_unitsreturnc                 r  > [         R                  " U40 UD6U l        U(       d  SU R                  R                  S   R                  ;   a  [
        R                  " 5          [
        R                  " SS[        5        U R                  R                  S5      nSSS5        [        R                  " SSW5      nUS	-  n[        U5      U l        [
        R                  " 5          [
        R                  " SS[        5        U R                  R                  5       =(       d    U R                  R                  nSSS5        [        R                  " S
SW5      R                  5       U l        [        TU ]=  [!        [#        U R                  5      5      5        g! , (       d  f       GN= f! , (       d  f       Nw= f)a  
A Proj class instance is initialized with proj map projection
control parameter key/value pairs. The key/value pairs can
either be passed in a dictionary, or as keyword arguments,
or as a PROJ string (compatible with the proj command). See
:ref:`projections` for examples of
key/value pairs defining different map projections.

Parameters
----------
projparams: int, str, dict, pyproj.CRS
    A PROJ or WKT string, PROJ dict, EPSG integer, or a pyproj.CRS instance.
preserve_units: bool
    If false, will ensure +units=m.
**kwargs:
    PROJ projection parameters.


Example usage:

>>> from pyproj import Proj
>>> p = Proj(proj='utm',zone=10,ellps='WGS84', preserve_units=False)
>>> x,y = p(-120.108, 34.36116666)
>>> 'x=%9.3f y=%11.3f' % (x,y)
'x=765975.641 y=3805993.134'
>>> 'lon=%8.3f lat=%5.3f' % p(x,y,inverse=True)
'lon=-120.108 lat=34.361'
>>> # do 3 cities at a time in a tuple (Fresno, LA, SF)
>>> lons = (-119.72,-118.40,-122.38)
>>> lats = (36.77, 33.93, 37.62 )
>>> x,y = p(lons, lats)
>>> 'x: %9.3f %9.3f %9.3f' % x
'x: 792763.863 925321.537 554714.301'
>>> 'y: %9.3f %9.3f %9.3f' % y
'y: 4074377.617 3763936.941 4163835.303'
>>> lons, lats = p(x, y, inverse=True) # inverse transform
>>> 'lons: %8.3f %8.3f %8.3f' % lons
'lons: -119.720 -118.400 -122.380'
>>> 'lats: %8.3f %8.3f %8.3f' % lats
'lats:   36.770   33.930   37.620'
>>> p2 = Proj('+proj=utm +zone=10 +ellps=WGS84', preserve_units=False)
>>> x,y = p2(-120.108, 34.36116666)
>>> 'x=%9.3f y=%11.3f' % (x,y)
'x=765975.641 y=3805993.134'
>>> p = Proj("EPSG:32667", preserve_units=False)
>>> 'x=%12.3f y=%12.3f (meters)' % p(-114.057222, 51.045)
'x=-1783506.250 y= 6193827.033 (meters)'
>>> p = Proj("EPSG:32667")
>>> 'x=%12.3f y=%12.3f (feet)' % p(-114.057222, 51.045)
'x=-5851386.754 y=20320914.191 (feet)'
>>> # test data with radian inputs
>>> p1 = Proj("EPSG:4214")
>>> x1, y1 = p1(116.366, 39.867)
>>> f'{x1:.3f} {y1:.3f}'
'116.366 39.867'
>>> x2, y2 = p1(x1, y1, inverse=True)
>>> f'{x2:.3f} {y2:.3f}'
'116.366 39.867'
footr   ignorez5You will likely lose important projection information   Nz\s\+units=[\w-]+ z	 +units=mz\s\+?type=crs)r   from_user_inputcrs	axis_info	unit_namewarningscatch_warningsfilterwarningsUserWarningto_proj4resubsrsstripsuper__init__r
   r   )selfr   r   kwargs
projstring	__class__s        N/var/www/html/kml_chatgpt/mouzaenv/lib/python3.13/site-packages/pyproj/proj.pyr&   Proj.__init__0   s=   | &&z<V<&DHH,>,>q,A,K,K"K((*''K
 "XX..q1
 +  3RDJ+%J:DH $$&##G
 **,<J ' 66*B
;AAC0DHH1EFG+ +* '&s   !8F#AF(
F%(
F6	longitudelatitudeinverseerrcheckradiansc                 x    U(       a  [         R                  nO[         R                  nU R                  UUUUUS9$ )a[  
Calling a Proj class instance with the arguments lon, lat will
convert lon/lat (in degrees) to x/y native map projection
coordinates (in meters).

Inputs should be doubles (they will be cast to doubles if they
are not, causing a slight performance hit).

Works with numpy and regular python array objects, python
sequences and scalars, but is fastest for array objects.

Accepted numeric scalar or array:

- :class:`int`
- :class:`float`
- :class:`numpy.floating`
- :class:`numpy.integer`
- :class:`list`
- :class:`tuple`
- :class:`array.array`
- :class:`numpy.ndarray`
- :class:`xarray.DataArray`
- :class:`pandas.Series`

Parameters
----------
longitude: scalar or array
    Input longitude coordinate(s).
latitude: scalar or array
    Input latitude coordinate(s).
inverse: bool, default=False
    If inverse is True the inverse transformation from x/y to
    lon/lat is performed.
radians: bool, default=False
    If True, will expect input data to be in radians and will return radians
    if the projection is geographic. Otherwise, it uses degrees.
    This does not work with pyproj 2 and is ignored. It will be enabled again
    in pyproj 3.
errcheck: bool, default=False
    If True, an exception is raised if the errors are found in the process.
    If False, ``inf`` is returned for errors.

Returns
-------
tuple[Any, Any]:
    The transformed coordinates.
)xxyy	directionr0   r1   )r   INVERSEFORWARD	transform)r'   r-   r.   r/   r0   r1   r5   s          r+   __call__Proj.__call__   sC    n *22I*22I~~  
 	
    c                 \   [        U5      u  pV[        U5      S   nU R                  R                  XWX4S9n[        [	        XhR
                  5      [	        XhR                  5      [	        XhR                  5      [	        XhR                  5      [	        XhR                  5      [	        XhR                  5      [	        XhR                  5      [	        XhR                  5      [	        XhR                  5      [	        XhR                  5      [	        XhR                  5      [	        XhR                   5      S9$ )a/  
.. versionadded:: 2.6.0

Calculate various cartographic properties, such as scale factors, angular
distortion and meridian convergence. Depending on the underlying projection
values will be calculated either numerically (default) or analytically.

The function also calculates the partial derivatives of the given
coordinate.

Accepted numeric scalar or array:

- :class:`int`
- :class:`float`
- :class:`numpy.floating`
- :class:`numpy.integer`
- :class:`list`
- :class:`tuple`
- :class:`array.array`
- :class:`numpy.ndarray`
- :class:`xarray.DataArray`
- :class:`pandas.Series`

Parameters
----------
longitude: scalar or array
    Input longitude coordinate(s).
latitude: scalar or array
    Input latitude coordinate(s).
radians: bool, default=False
    If True, will expect input data to be in radians and will return radians
    if the projection is geographic. Otherwise, it uses degrees.
errcheck: bool, default=False
    If True, an exception is raised if the errors are found in the process.
    If False, ``inf`` is returned on error.

Returns
-------
Factors
r   )r1   r0   )meridional_scaleparallel_scaleareal_scaleangular_distortionmeridian_parallel_anglemeridian_convergencetissot_semimajortissot_semiminordx_dlamdx_dphidy_dlamdy_dphi)r   _transformer_get_factorsr   r   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   )	r'   r-   r.   r1   r0   inxx_data_typeinyfactorss	            r+   get_factorsProj.get_factors   s    ` )3H%a( ##00g 1 

 )+7O7OP'5K5KL$[2E2EF+K9S9ST$0<<% ".99" *+7O7OP)+7O7OP oo> oo> oo> oo>!
 	
r;   c                     U R                   $ )zReturns formal definition string for projection

>>> Proj("EPSG:4326").definition_string()
'proj=longlat datum=WGS84 no_defs ellps=WGS84 towgs84=0,0,0'
)
definitionr'   s    r+   definition_stringProj.definition_string  s     r;   c                     U R                   R                  (       a%  U R                   R                  R                  S5      $ S$ )zereturn the definition string of the geographic (lat/lon)
coordinate version of the current projectionr   N)r   geodetic_crsr    rS   s    r+   to_latlong_defProj.to_latlong_def   s0     59HH4I4Itxx$$--a0StSr;   c                 @    [        U R                  R                  5      $ )zireturn a new Proj instance which is the geographic (lat/lon)
coordinate version of the current projection)r   r   rW   rS   s    r+   
to_latlongProj.to_latlong%  s     DHH))**r;   c                 H    U R                   U R                  R                  44$ )z=special method that allows pyproj.Proj instance to be pickled)r*   r   r#   rS   s    r+   
__reduce__Proj.__reduce__*  s    ~~..r;   )r   r#   )NT)FFF)FF)r   r   )__name__
__module____qualname____firstlineno____doc__r   boolr&   tupler9   r   rO   strrT   rX   r[   typer^   __static_attributes____classcell__)r*   s   @r+   r   r   !   s$    EIWH*WH=AWH	WH WHz A
A
 A
 	A

 A
 A
 
sCxA
N J
J
 J
 	J

 J
 
J
X3 Td
 T
+
/E$v,c
":; / /r;   r   )rd   r!   r   typingr   pyproj._compatr   pyproj._transformerr   
pyproj.crsr   pyproj.enumsr   pyproj.listr   pyproj.transformerr	   r
   pyproj.utilsr   r   pj_listr    r;   r+   <module>ru      s@   " 
   % '  + / C 4
!
#K/; K/r;   