o
    i%                     @   sZ   d Z ddlZddlZddlmZ ddlmZ ddlmZ G dd dZ	e	ej
eje	_dS )aO  Define the :class:`~geographiclib.geodesic.Geodesic` class

The ellipsoid parameters are defined by the constructor.  The direct and
inverse geodesic problems are solved by

  * :meth:`~geographiclib.geodesic.Geodesic.Inverse` Solve the inverse
    geodesic problem
  * :meth:`~geographiclib.geodesic.Geodesic.Direct` Solve the direct
    geodesic problem
  * :meth:`~geographiclib.geodesic.Geodesic.ArcDirect` Solve the direct
    geodesic problem in terms of spherical arc length

:class:`~geographiclib.geodesicline.GeodesicLine` objects can be created
with

  * :meth:`~geographiclib.geodesic.Geodesic.Line`
  * :meth:`~geographiclib.geodesic.Geodesic.DirectLine`
  * :meth:`~geographiclib.geodesic.Geodesic.ArcDirectLine`
  * :meth:`~geographiclib.geodesic.Geodesic.InverseLine`

:class:`~geographiclib.polygonarea.PolygonArea` objects can be created
with

  * :meth:`~geographiclib.geodesic.Geodesic.Polygon`

The public attributes for this class are

  * :attr:`~geographiclib.geodesic.Geodesic.a`
    :attr:`~geographiclib.geodesic.Geodesic.f`

*outmask* and *caps* bit masks are

  * :const:`~geographiclib.geodesic.Geodesic.EMPTY`
  * :const:`~geographiclib.geodesic.Geodesic.LATITUDE`
  * :const:`~geographiclib.geodesic.Geodesic.LONGITUDE`
  * :const:`~geographiclib.geodesic.Geodesic.AZIMUTH`
  * :const:`~geographiclib.geodesic.Geodesic.DISTANCE`
  * :const:`~geographiclib.geodesic.Geodesic.STANDARD`
  * :const:`~geographiclib.geodesic.Geodesic.DISTANCE_IN`
  * :const:`~geographiclib.geodesic.Geodesic.REDUCEDLENGTH`
  * :const:`~geographiclib.geodesic.Geodesic.GEODESICSCALE`
  * :const:`~geographiclib.geodesic.Geodesic.AREA`
  * :const:`~geographiclib.geodesic.Geodesic.ALL`
  * :const:`~geographiclib.geodesic.Geodesic.LONG_UNROLL`

:Example:

    >>> from geographiclib.geodesic import Geodesic
    >>> # The geodesic inverse problem
    ... Geodesic.WGS84.Inverse(-41.32, 174.81, 40.96, -5.50)
    {'lat1': -41.32,
     'a12': 179.6197069334283,
     's12': 19959679.26735382,
     'lat2': 40.96,
     'azi2': 18.825195123248392,
     'azi1': 161.06766998615882,
     'lon1': 174.81,
     'lon2': -5.5}

    N)Math)	Constants)GeodesicCapabilityc                   @   s  e Zd ZU dZd ed< dZeZeZeZeZ	eZ
eZeZeZeed  d ZeZeed  d ZdZeejj d ZeejjZejjZde ZeeZeZd	e Ze j!Z!e j"Z"e j#Z#e j$Z$e j%Z%e j&Z&e j'Z'e j(Z(e j)Z)e j*Z*e+d
d Z,e+dd Z-e+dd Z.e+dd Z/e+dd Z0e+dd Z1e+dd Z2dd Z3dd Z4dd Z5dd Z6d d! Z7d"d# Z8d$d% Z9d&d' Z:d(d) Z;d*d+ Z<d,d- Z=e j>fd.d/Z?d0d1 Z@e j>fd2d3ZAe j>fd4d5ZBe j>e jCB fd6d7ZDe j>e jCB fd8d9ZEe j>e jCB fd:d;ZFe j>e jCB fd<d=ZGe j>e jCB fd>d?ZHdDdAdBZIe jJZJ	 e jKZK	 e jLZL	 e jMZM	 e jNZN	 e j>Z>	 e jCZC	 e jOZO	 e jPZP	 e jQZQ	 e jRZR	 e jSZSdCS )EGeodesiczSolve geodesic problemsWGS84            
      i  c           	      C   s   t |}||  }d||  ||  }d}|d@ r!|d8 }|| }nd}|d }|rK|d8 }|d8 }|| | ||  }|d8 }|| | ||  }|s)| rUd| | | S |||  S )z9Private: Evaluate a trig series using Clenshaw summation.r	   r   r   )len)	sinpsinxcosxcknary1y0 r   V/var/www/html/formularioweb/env/lib/python3.10/site-packages/geographiclib/geodesic.py_SinCosSeries{   s    
zGeodesic._SinCosSeriesc                 C   s\  t | }t |}|| d d }|dkr|dks|| d }t |}|| }||d|   }|}	|dkr`|| }
|
|
dk rFt| nt|7 }
t |
}|	||dkr[|| nd 7 }	ntt| ||  }|	d| t|d  7 }	tt |	| }|	dk r|||	  n|	| }|| d|  }|t|t | |  }|S d}|S )z Private: solve astroid equation.r   r   r      r	      )r   sqmathsqrtcbrtatan2cos)xypqrSr2r3discuT3Tangvuvwr   r   r   r   _Astroid   s.   


"
zGeodesic._Astroidc                 C   sD   g d}t jd }t||dt| ||d   }||  d|   S )zPrivate: return A1-1.)r   r   @   r      r	   r   r   )r   nA1_r   polyvalr   epscoeffmtr   r   r   _A1m1f      
"zGeodesic._A1m1fc                 C   ~   g d}t | }| }d}tdtjd D ]'}tj| d }|t |||| ||| d   ||< ||d 7 }|| 9 }qdS )zPrivate: return C1.)r       r3      	   r@      r         rI   rD   r   r   r	   N)r   r   ranger   nC1_r6   r8   r   r9   eps2dolr:   r   r   r   _C1f      
(
zGeodesic._C1fc                 C   r>   )zPrivate: return C1')   iPrF   i   i  ii   i 0  it     ii
     i  rW   i  i   r   r   r	   N)r   r   rK   r   nC1p_r6   rM   r   r   r   _C1pf   rS   zGeodesic._C1pfc                 C   sD   g d}t jd }t||dt| ||d   }||  d|   S )zPrivate: return A2-1)iii@r   r4   r	   r   r   )r   nA2_r   r6   r   r7   r   r   r   _A2m1f   r=   zGeodesic._A2m1fc                 C   r>   )zPrivate: return C2)r   r	      rA   #   r3   rV   rD      P   rF      r]   rH   ?   rJ   M   rD   r   r   r	   N)r   r   rK   r   nC2_r6   rM   r   r   r   _C2f   rS   zGeodesic._C2fc              	   C   s  t || _	 t || _	 d| j | _| jd| j  | _| jt| j | _| jd| j  | _| j| j | _	t| jt| j	| jdkrFdn| jdkrTt
t
| jn	t
t
| j t
t| j   d | _dtj t
tdt| jtdd| jd   d  | _t
| jr| jdkstdt
| j	r| j	dkstdtttj| _tttj| _tttj| _|   |    | !  d	S )
a  Construct a Geodesic object

    :param a: the equatorial radius of the ellipsoid in meters
    :param f: the flattening of the ellipsoid

    An exception is thrown if *a* or the polar semi-axis *b* = *a* (1 -
    *f*) is not a finite positive quantity.

    r   r	   r   皙?gMbP?      ?z!Equatorial radius is not positivezPolar semi-axis is not positiveN)"floataf_f1_e2r   r   _ep2_n_br   atanhr   atanabs_c2r   tol2_maxmin_etol2isfinite
ValueErrorlistrK   nA3x__A3xnC3x__C3xnC4x__C4x_A3coeff_C3coeff_C4coeff)selfrh   ri   r   r   r   __init__  sB   


zGeodesic.__init__c                 C   s|   g d}d}d}t tjd ddD ]*}ttj| d |}t|||| j||| d   | j|< |d7 }||d 7 }qdS )z#Private: return coefficients for A3)   r   r3   r?   r   r?   r\   r   r?   r      r   r?   r	   r   r   r   r   r?   r	   N)rK   r   nA3_ru   r   r6   rm   r{   )r   r9   rP   r   jr:   r   r   r   r   D  s   (zGeodesic._A3coeffc                 C   s   g d}d}d}t dtjD ]8}t tjd |d dD ]*}ttj| d |}t|||| j||| d   | j|< |d7 }||d 7 }qqdS )z#Private: return coefficients for C3)-r   r   r	      r   r?   r   r   r3   r?   r   r   r   r?   r   r   r   r4   r   r   r   r   r   r   r3   r   r   r	   rA   r`   rH   irE   rV   r   rB   r      r`   rH   ir`   rH      i 
  r   r   r?   r	   N)rK   r   nC3_ru   r   r6   rm   r}   r   r9   rP   r   rQ   r   r:   r   r   r   r   U  s   (zGeodesic._C3coeffc                 C   s   g d}d}d}t tjD ]5}t tjd |d dD ]'}tj| d }t|||| j||| d   | j|< |d7 }||d 7 }qqdS )z#Private: return coefficients for C4)Ma   :  i@       i iPi%  r   i`i@7   ir   r3   ip  r   i  iEr   d      i<  ih  iiNu  r   r   i1#  ii   i  i  ir   i@  ii#  ir   iii  i0i  r   r   i)  i@  iXo i i  ir   i`i@  r   i  r   ixiW  i   i0i i   i ix  i rC   r   i i@  i/ r   i r   r   r?   r	   N)rK   r   nC4_r   r6   rm   r   r   r   r   r   r   p  s   (zGeodesic._C4coeffc                 C   s   t tjd | jd|S )zPrivate: return A3r   r   )r   r6   r   r   r{   )r   r8   r   r   r   _A3f  s   zGeodesic._A3fc                 C   sZ   d}d}t dtjD ] }tj| d }||9 }|t|| j|| ||< ||d 7 }q
dS )zPrivate: return C3r   r   N)rK   r   r   r   r6   r}   r   r8   r   multrP   rQ   r:   r   r   r   _C3f  s   zGeodesic._C3fc                 C   sX   d}d}t tjD ] }tj| d }|t|| j|| ||< ||d 7 }||9 }q	dS )zPrivate: return C4r   r   N)rK   r   r   r   r6   r   r   r   r   r   _C4f  s   
zGeodesic._C4fc                 C   s*  |t jM }tj } } } } } }}|t jt jB t jB @ rIt |}t || |t jt jB @ rEt 	|}t 
|| || }d| }d| }|t j@ rt d|||t d||| }|||  }|t jt jB @ rt d|||t d||| }|| || ||   }n3|t jt jB @ rtdt jD ]}|||  |||   ||< q|| t d|||t d|||  }|t j@ r|}|||  |||   || |  }|t j@ r|| ||  }| j|	|
  |	|
  ||  }||| ||  | |  }||| ||  | |  }|||||fS )z"Private: return a bunch of lengthsr   T)r   OUT_MASKr   nanDISTANCEREDUCEDLENGTHGEODESICSCALEr<   rR   r[   rd   r   rK   rc   rl   )r   r8   sig12ssig1csig1dn1ssig2csig2dn2cbet1cbet2outmaskC1aC2as12bm12bm0m0xJ12M12M21A1A2B1B2rQ   csig12r;   r   r   r   _Lengths  sR   





zGeodesic._Lengthsc           *      C   s,  d}t j } }}|| ||  }|| ||  }|| }||| 7 }|dko0|dk o0|| dk }|rat|| }||t||   }t d| j|  }|| j|  }t |}t |}n|}|	}|| }|dkr|||| t| d|   n||| t| d|   }t 	||}|| || |  }|r|| j
k r|| }||| |dkrt|d|  nd|   }t||\}}t ||}n/t| jdks|dks|dt| j t j t| krnt | |	 }| jdkr*t|| j }|ddt d|   |  }| j| | | t j }|| } || }!||  }"nT|| ||  }#t ||#}$| | jt j|$ || ||||||tj|
|\}%}&}'}%}%d|&|| |' t j   }!|!dk rj||! n| j t| t j } | | }|| }"|"tj kr|!dtj kr| jdkrtd	|! }t dt|  }nWt|!tj krd
nd|!}t dt| }n>t|!|"}(|| jdkr|! |( d|(  n|" d|(  |(  })t |)}t |) }|| }||| t| d|   }|dks
t||\}}nd}d}||||||fS )z3Private: Find a starting value for Newton's method.r?   r   g      ?r   re   r   r	   g{Gzrf                 )r   r   r   r   r   rl   rj   sinr!   hypotrv   normr    rq   rm   piri   r   r   r   r   tol1_xthresh_ru   rt   r2   )*r   sbet1r   r   sbet2r   r   lam12slam12clam12r   r   r   salp2calp2dnmsbet12cbet12sbet12a	shortlinesbetm2omg12somg12comg12salp1calp1ssig12r   lam12xk2r8   lamscalebetscaler"   r#   cbet12abet12adummyr   r   r   omg12ar   r   r   _InverseStart  s   &"
$$ 
zGeodesic._InverseStartc           &      C   sv  |dkr|dkrt j }|| }t||| }|}|| }||  }}t||\}}||kr4|| n|}||ksAt|| krbtt|| || k rV|| ||  n|| ||   | nt|}|}|| }||  }}t||\}}t	t
d|| ||  d || ||  }t
d|| ||  d }|| ||  }t	||
 ||	  ||
 ||	  }t|| j }|ddtd|   |  } | | | t d|||t d||| }!| j | |  | ||!  }"||" }#|r+|dkr
d| j | | }$n$| | |||||||||t j||\}%}$}%}%}%|$| j||  9 }$ntj}$|#|||||||| |"|$fS )zPrivate: Solve hybrid problemr   r   r	   r   Tr   )r   tiny_r   r   r   r   rq   r   r   r    rt   rl   r   r   ri   r   rj   r   r   r   )&r   r   r   r   r   r   r   r   r   slam120clam120diffpr   r   C3asalp0calp0r   somg1r   comg1r   r   r   somg2r   comg2r   r   r   etar   r8   B312domg12r   dlam12r   r   r   r   	_Lambda12q  s`   
zGeodesic._Lambda12c           L      C   s	  t j } } } }	 }
}|tjM }t||\}}t d|}|| }|| }t |}t||\}}d| | }t	t
|}t	t
|}t|t|k sXt |rZdnd}|dk ri|d9 }||}}t d| }||9 }||9 }t|\}}|| j9 }t||\}}ttj|}t|\}}|| j9 }t||\}}ttj|}|| k r||krt ||}n	t|| kr|}t d| jt|  }t d| jt|  }tttjd }tttjd }tttj}|dkp|dk}|r|}|}d} d}!|}"|| }#|}$| | }%t td|#|$ |"|%  d |#|% |"|$  }&| | j|&|"|#||$|%||||tjB tjB ||\}'}(})}	}
|&tjk sV|(dkr|&dtj k sn|&tj k rt|'dk sn|(dk rtd }& }(}'|(| j!9 }(|'| j!9 }'t "|&}nd	}d
}*d}+d},|s|dkr| j#dks|| j#d krd }} d }}!| j$| }'|| j  }&},| j!t %|& }(|tj&@ rt '|& }	}
|| j }n|sv| (|||||||||||\}&}}}!} }-|&dkr"|&| j! |- }'t|-| j! t %|&|-  }(|tj&@ rt '|&|-  }	}
t "|&}|| j|-  },nTd}.d	 }/}0tj}1d}2tj}3d}4	 | )|||||||||||.tj*k |||\}5}!} }&}"}#}$}%}6}7}8|0skt|5|/r^dndtj  krk|.tj+krln|5dkr|.tj*ks|| |4|3 kr|}3|}4n|5dk r|.tj*ks|| |2|1 k r|}1|}2|.d7 }.|.tj*k r|8dkr|5 |8 }9t|9t j,k rt %|9}:t '|9};||; ||:  }<|<dkr||; ||:  }|<}t||\}}t|5dtj  k}/q2|1|3 d }|2|4 d }t||\}}d	}/t|1| |2|  tj-k pt||3 ||4  tj-k }0q3||tjtj&B @ r-tjntj.B }=| |6|&|"|#||$|%||||=||\}'}(})}	}
|(| j!9 }(|'| j!9 }'t "|&}|tj/@ rvt %|7}>t '|7}?||? ||>  }*||? ||>  }+|tj@ rd|' }|tj@ rd|( }|tj/@ r|| }@t 0||| }A|Adkr
|@dkr
|}"|| }#|}$| | }%t|A| j }B|Bddt d|B   |B  }6t| j$|A |@ | j1 }Ct|"|#\}"}#t|$|%\}$}%tttj2}D| 3|6|D t4d	|"|#|D}Et4d	|$|%|D}F|C|F|E  }nd}|s|*d
krt %|,}*t '|,}+|sR|+dkrR|| dk rRd|+ }7d| }Gd| }Hdt |*||H ||G   |7|| |G|H    }In'|!| | |  }J| | |!|  }K|Jdkrs|Kdk rstj| }Jd}Kt |J|K}I|| j5|I 7 }||| | 9 }|d7 }|dk r||!}!}|| } }|tj&@ r|	|
}
}	||| 9 }||| 9 }|!|| 9 }!| || 9 } |||||!| ||	|
|f
S )z/Private: General version of the inverse problemr      r?   r   irf   r   r   Fg       @r   Tr   r\   r	   g-g      ?)6r   r   r   r   r   AngDiffcopysignradianssincosdeAngRoundLatFixrq   isnansincosdrj   r   rt   r   r   rl   r   ry   rK   rL   rc   r   r    r   rm   r   r   rs   tol0_rn   degreesri   rh   r   r   r!   r   r   maxit1_maxit2_r   tolb_EMPTYAREAr   rk   r   r   r   rr   )Lr   lat1lon1lat2lon2r   a12s12m12r   r   S12lon12lon12slonsignr   r   r   swapplatsignr   r   r   r   r   r   r   r   r   meridianr   r   r   r   r   r   r   r   r   s12xm12xr   r   r   r   r   numittripntripbsalp1acalp1asalp1bcalp1br/   r8   r   dvdalp1sdalp1cdalp1nsalp1
lengthmasksdomg12cdomg12r   r   r   A4C4aB41B42dbet1dbet2alp12salp12calp12r   r   r   _GenInverse  sj  

"


 







$


	2









zGeodesic._GenInversec              
   C   s  |  |||||\
}}}}	}
}}}}}|tjM }|tj@ r,t||\}}|| | }nt|}t||tj@ r<|nt|t||d}||d< |tj@ rU||d< |tj	@ rjt
||	|d< t
|
||d< |tj@ rs||d< |tj@ r||d< ||d< |tj@ r||d	< |S )
a7  Solve the inverse geodesic problem

    :param lat1: latitude of the first point in degrees
    :param lon1: longitude of the first point in degrees
    :param lat2: latitude of the second point in degrees
    :param lon2: longitude of the second point in degrees
    :param outmask: the :ref:`output mask <outmask>`
    :return: a :ref:`dict`

    Compute geodesic between (*lat1*, *lon1*) and (*lat2*, *lon2*).
    The default value of *outmask* is STANDARD, i.e., the *lat1*,
    *lon1*, *azi1*, *lat2*, *lon2*, *azi2*, *s12*, *a12* entries are
    returned.

    )r  r  r  r  r  r  azi1azi2r  r   r   r  )r)  r   r   LONG_UNROLLr   r   AngNormalizer   r   AZIMUTHatan2dr   r   r   )r   r  r  r  r  r   r  r  r   r   r   r   r  r   r   r  r	  eresultr   r   r   Inverse  s0   





zGeodesic.Inversec           	      C   s8   ddl m} |s|tjO }|| ||||}||||S )z*Private: General version of direct problemr   GeodesicLine)geographiclib.geodesicliner4  r   DISTANCE_IN_GenPosition)	r   r  r  r*  arcmodes12_a12r   r4  liner   r   r   
_GenDirect"  s   zGeodesic._GenDirectc              	   C   s   |  |||d||\	}}}}	}}
}}}|tjM }t||tj@ r#|nt|t||d}||d< |tj@ r<||d< |tj@ rE||d< |tj	@ rN|	|d< |tj
@ rW|
|d< |tj@ rd||d< ||d	< |tj@ rm||d
< |S )a_  Solve the direct geodesic problem

    :param lat1: latitude of the first point in degrees
    :param lon1: longitude of the first point in degrees
    :param azi1: azimuth at the first point in degrees
    :param s12: the distance from the first point to the second in
      meters
    :param outmask: the :ref:`output mask <outmask>`
    :return: a :ref:`dict`

    Compute geodesic starting at (*lat1*, *lon1*) with azimuth *azi1*
    and length *s12*.  The default value of *outmask* is STANDARD, i.e.,
    the *lat1*, *lon1*, *azi1*, *lat2*, *lon2*, *azi2*, *s12*, *a12*
    entries are returned.

    F)r  r  r*  r  r  r  r  r+  r  r   r   r  )r;  r   r   r   r   r,  r-  LATITUDE	LONGITUDEr.  r   r   r   )r   r  r  r*  r  r   r  r  r  r+  r  r   r   r  r1  r   r   r   Direct*  s&   

zGeodesic.Directc              	   C   s   |  |||d||\	}}}}}	}
}}}|tjM }t||tj@ r#|nt|t||d}|tj@ r8|	|d< |tj@ rA||d< |tj	@ rJ||d< |tj
@ rS||d< |tj@ r\|
|d< |tj@ ri||d< ||d	< |tj@ rr||d
< |S )a  Solve the direct geodesic problem in terms of spherical arc length

    :param lat1: latitude of the first point in degrees
    :param lon1: longitude of the first point in degrees
    :param azi1: azimuth at the first point in degrees
    :param a12: spherical arc length from the first point to the second
      in degrees
    :param outmask: the :ref:`output mask <outmask>`
    :return: a :ref:`dict`

    Compute geodesic starting at (*lat1*, *lon1*) with azimuth *azi1*
    and arc length *a12*.  The default value of *outmask* is STANDARD,
    i.e., the *lat1*, *lon1*, *azi1*, *lat2*, *lon2*, *azi2*, *s12*,
    *a12* entries are returned.

    T)r  r  r*  r  r  r  r  r+  r  r   r   r  )r;  r   r   r   r   r,  r-  r   r<  r=  r.  r   r   r   )r   r  r  r*  r  r   r  r  r+  r  r  r   r   r  r1  r   r   r   	ArcDirectO  s&   

zGeodesic.ArcDirectc                 C   s   ddl m} || ||||S )a  Return a GeodesicLine object

    :param lat1: latitude of the first point in degrees
    :param lon1: longitude of the first point in degrees
    :param azi1: azimuth at the first point in degrees
    :param caps: the :ref:`capabilities <outmask>`
    :return: a :class:`~geographiclib.geodesicline.GeodesicLine`

    This allows points along a geodesic starting at (*lat1*, *lon1*),
    with azimuth *azi1* to be found.  The default value of *caps* is
    STANDARD | DISTANCE_IN, allowing direct geodesic problem to be
    solved.

    r   r3  )r5  r4  )r   r  r  r*  capsr4  r   r   r   Linet  s   zGeodesic.Linec           	      C   sJ   ddl m} |s|tjO }|| ||||}|r|| |S || |S )z#Private: general form of DirectLiner   r3  )r5  r4  r   r6  SetArcSetDistance)	r   r  r  r*  r8  r9  r@  r4  r:  r   r   r   _GenDirectLine  s   

zGeodesic._GenDirectLinec                 C      |  |||d||S )a  Define a GeodesicLine object in terms of the direct geodesic
    problem specified in terms of spherical arc length

    :param lat1: latitude of the first point in degrees
    :param lon1: longitude of the first point in degrees
    :param azi1: azimuth at the first point in degrees
    :param s12: the distance from the first point to the second in
      meters
    :param caps: the :ref:`capabilities <outmask>`
    :return: a :class:`~geographiclib.geodesicline.GeodesicLine`

    This function sets point 3 of the GeodesicLine to correspond to
    point 2 of the direct geodesic problem.  The default value of *caps*
    is STANDARD | DISTANCE_IN, allowing direct geodesic problem to be
    solved.

    FrD  )r   r  r  r*  r  r@  r   r   r   
DirectLine     zGeodesic.DirectLinec                 C   rE  )a  Define a GeodesicLine object in terms of the direct geodesic
    problem specified in terms of spherical arc length

    :param lat1: latitude of the first point in degrees
    :param lon1: longitude of the first point in degrees
    :param azi1: azimuth at the first point in degrees
    :param a12: spherical arc length from the first point to the second
      in degrees
    :param caps: the :ref:`capabilities <outmask>`
    :return: a :class:`~geographiclib.geodesicline.GeodesicLine`

    This function sets point 3 of the GeodesicLine to correspond to
    point 2 of the direct geodesic problem.  The default value of *caps*
    is STANDARD | DISTANCE_IN, allowing direct geodesic problem to be
    solved.

    TrF  )r   r  r  r*  r  r@  r   r   r   ArcDirectLine  rH  zGeodesic.ArcDirectLinec              
   C   sz   ddl m} | ||||d\
}}}	}
}}}}}}t|	|
}|tjtj@ @ r,|tjO }|| |||||	|
}|	| |S )a  Define a GeodesicLine object in terms of the invese geodesic problem

    :param lat1: latitude of the first point in degrees
    :param lon1: longitude of the first point in degrees
    :param lat2: latitude of the second point in degrees
    :param lon2: longitude of the second point in degrees
    :param caps: the :ref:`capabilities <outmask>`
    :return: a :class:`~geographiclib.geodesicline.GeodesicLine`

    This function sets point 3 of the GeodesicLine to correspond to
    point 2 of the inverse geodesic problem.  The default value of *caps*
    is STANDARD | DISTANCE_IN, allowing direct geodesic problem to be
    solved.

    r   r3  )
r5  r4  r)  r   r/  r   r   r6  r   rB  )r   r  r  r  r  r@  r4  r  _r   r   r*  r:  r   r   r   InverseLine  s   


zGeodesic.InverseLineFc                 C   s   ddl m} || |S )zReturn a PolygonArea object

    :param polyline: if True then the object describes a polyline
      instead of a polygon
    :return: a :class:`~geographiclib.polygonarea.PolygonArea`

    r   )PolygonArea)geographiclib.polygonarearL  )r   polylinerL  r   r   r   Polygon  s   	
zGeodesic.PolygonN)F)T__name__
__module____qualname____doc____annotations__GEOGRAPHICLIB_GEODESIC_ORDERr5   rL   rX   rZ   rc   r   rz   r   r|   r   r~   r   sys
float_infomant_digr   r   r   ru   r   epsilonr   r   rs   r   r   r   CAP_NONECAP_C1CAP_C1pCAP_C2CAP_C3CAP_C4CAP_ALLCAP_MASKOUT_ALLr   staticmethodr   r2   r<   rR   rY   r[   rd   r   r   r   r   r   r   r   r   r   r   r)  STANDARDr2  r;  r>  r?  r6  rA  rD  rG  rI  rK  rO  r   r<  r=  r.  r   r   r   r   ALLr,  r   r   r   r   r   V   s   
 


.
	


	
0!6 M  <
+	
&
&





r   )rS  r   rV  geographiclib.geomathr   geographiclib.constantsr    geographiclib.geodesiccapabilityr   r   WGS84_aWGS84_fr   r   r   r   r   <module>   s$    O         >