
    \i4                       S r SSKJrJr  SSKJrJrJrJrJ	r	J
r
Jr  SSKJr  SSKJrJr  SSKJrJrJrJr  SSKJrJr  SSKJrJrJr  SS	KJrJr  SS
K J!r!J"r"  SSK#J$r$J%r%J&r&J'r'J(r(J)r)  SSK*J+r+J,r,  SSK-J.r.   " S S\5      r/ " S S\/5      r0 " S S\05      r1 " S S\05      r2 " S S\5      r3 " S S\/5      r4 " S S\35      r5 " S S\55      r6 " S S\55      r7 " S  S!\55      r8 " S" S#\35      r9 " S$ S%\35      r: " S& S'\/5      r; " S( S)\;5      r< " S* S+\;5      r= " S, S-\;5      r> " S. S/\/5      r? " S0 S1\35      r@ " S2 S3\35      rA " S4 S5\35      rBg6)7a  
Copyright 2011-2018 Kyle Lancaster | 2019 Patrick Eisoldt

Simplekml is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

    )CameraLookAt)KmlableSnippet	OverlayXYScreenXY
RotationXYSizecheck)Coordinates)IconLink)LocationOrientationScaleResourceMap)
ViewVolumeImagePyramid)	LatLonBoxGxLatLonQuadRegion)ExtendedDataSchema)StyleStyleMap)	IconStyle
LabelStyleBalloonStyle	LineStyle	ListStyle	PolyStyle)TimeSpan	TimeStamp)GxTourc                   "  ^  \ rS rSrSr                 S?U 4S jjr\S 5       r\S 5       r\R                  S 5       r\S 5       r
\
R                  S 5       r
\S	 5       r\R                  S
 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  \" \5      S 5       5       r\S 5       r\R                  \" \5      S 5       5       r\S 5       r\R                  \" \5      S 5       5       r\S 5       r\R                  \" \5      S  5       5       r\S! 5       r\R                  \" \5      S" 5       5       r\S# 5       r\R                  \" \5      S$ 5       5       r\S% 5       r \ R                  \" \!5      S& 5       5       r \S' 5       r\S( 5       r"\"R                  \" \#5      S) 5       5       r"\S* 5       r$\$R                  \" \%5      S+ 5       5       r$\S, 5       r&\&R                  S- 5       r&\S. 5       r'\'R                  \" \(5      S/ 5       5       r'\S0 5       r)\)R                  \" \*5      S1 5       5       r)\S2 5       r+\+R                  \" \,5      S3 5       5       r+\S4 5       r-\-R                  \" \.5      S5 5       5       r-\S6 5       r/\/R                  \" \05      S7 5       5       r/\S8 5       r1\1R                  \" \25      S9 5       5       r1S: r3S; r4S< r5U 4S= jr6S>r7U =r8$ )@Feature!   z~Abstract class extended by all features.

The arguments are the same as the properties.

.. note::
  Not to be used directly.
c                 |  > [         [        U ]  5         XR                  S'   X R                  S'   X0R                  S'   X@R                  S'   XPR                  S'   X`R                  S'   XpR                  S'   XR                  S'   XR                  S	'   XR                  S
'   XR                  S'   XR                  S'   XR                  S'   XR                  S'   XR                  S'   S U R                  S'   UU R                  S'   UU R                  S'   S U l        S U l        / U l        / U l        / U l        / U l	        g )Nname
visibilityopenatom:author	atom:linkaddressxal:AddressDetailsphoneNumberdescriptionr   r   snippet_
TimeStamp_	TimeSpan_r   styleUrlr   gx:balloonVisibility)
superr&   __init___kml_style	_stylemap	_features_styles
_stylemaps_folders)selfr)   r*   r+   
atomauthoratomlinkr.   xaladdressdetailsphonenumbersnippetr1   cameralookat	timestamptimespanregionextendeddatagxballoonvisibility	__class__s                     U/var/www/html/kml_chatgpt/mouzaenv/lib/python3.13/site-packages/simplekml/featgeom.pyr8   Feature.__init__*   s   $ 	gt%' 		&",		, 		&#-		- !)		+&		)*;		&'#.		- #.		- $		($		( '		*"+		,!)		+$		( $		*$0		.!,?		()    c                     U R                   $ zThe id string (read only)._idr@   s    rN   id
Feature.idV        xxrP   c                      U R                   S   $ )"Name of placemark, accepts string.r)   r9   rU   s    rN   r)   Feature.name[        yy  rP   c                      XR                   S'   g )Nr)   r[   r@   r)   s     rN   r)   r\   `        		&rP   c                      U R                   S   $ )1Whether the feature is shown, accepts int 0 or 1.r*   r[   rU   s    rN   r*   Feature.visibilityd        yy&&rP   c                      XR                   S'   g )Nr*   r[   r@   r*   s     rN   r*   rc   i       ",		,rP   c                      U R                   S   $ )z;Whether open or closed in Places panel, accepts int 0 or 1.r+   r[   rU   s    rN   r+   Feature.openm   r]   rP   c                      XR                   S'   g )Nr+   r[   )r@   r+   s     rN   r+   ri   r   r`   rP   c                      U R                   S   $ )&Author of the feature, accepts string.r,   r[   rU   s    rN   rA   Feature.atomauthorv        yy''rP   c                      XR                   S'   g )Nr,   r[   r@   rA   s     rN   rA   rm   {   s    #-		- rP   c                      U R                   S   $ )(URL containing this KML, accepts string.r-   r[   rU   s    rN   rB   Feature.atomlink        yy%%rP   c                      XR                   S'   g )Nr-   r[   r@   rB   s     rN   rB   rs      s    !)		+rP   c                      U R                   S   $ )!Standard address, accepts string.r.   r[   rU   s    rN   r.   Feature.address        yy##rP   c                      XR                   S'   g )Nr.   r[   r@   r.   s     rN   r.   ry          &		)rP   c                      U R                   S   $ )a  Address in xAL format, accepts string.

.. note::
    There seems to be a bug in Google Earth where the inclusion of the namespace
    xmlns:xal="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" seems to break some other elements of the KML such
    as touring (a tour will not play). If xaladdressdetails is used the above namespace will be added to the
    KML and will possibly break other elements. Use with caution.
r/   r[   rU   s    rN   rC   Feature.xaladdressdetails   s     yy-..rP   c                      XR                   S'   g )Nr/   r[   r@   rC   s     rN   rC   r      s    *;		&'rP   c                      U R                   S   $ )8Phone number used by Google Maps mobile, accepts string.r0   r[   rU   s    rN   rD   Feature.phonenumber   rn   rP   c                      XR                   S'   g )Nr0   r[   r@   rD   s     rN   rD   r          #.		- rP   c                      U R                   S   $ )=Description shown in the information balloon, accepts string.r1   r[   rU   s    rN   r1   Feature.description   rn   rP   c                      XR                   S'   g )Nr1   r[   r@   r1   s     rN   r1   r      r   rP   c                      U R                   S   $ )Y
Toggles visibility of a description balloon, accepts int 0 or 1

*New in version 1.1.1*
r6   r[   rU   s    rN   rL   Feature.gxballoonvisibility   s     yy/00rP   c                      XR                   S'   g )Nr6   r[   r@   rL   s     rN   rL   r      s    ,?		()rP   c                     U R                   S   c&  [        5       U R                   S'   SU R                   S'   U R                   S   $ )>Camera that views the scene, accepts :class:`simplekml.Camera`r   Nr   )r9   r   rU   s    rN   rF   Feature.camera   @     99X&"((DIIh"&DIIhyy""rP   c                 >    XR                   S'   S U R                   S'   g Nr   r   r[   r@   rF   s     rN   rF   r      s     %		("		(rP   c                     U R                   S   c&  [        5       U R                   S'   SU R                   S'   U R                   S   $ )ACamera relative to the feature, accepts :class:`simplekml.LookAt`r   Nr   )r9   r   rU   s    rN   rG   Feature.lookat   r   rP   c                 >    S U R                   S'   XR                   S'   g r   r[   r@   rG   s     rN   rG   r      s     #		($		(rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )DShort description of the feature, accepts :class:`simplekml.Snippet`r2   )r9   r   rU   s    rN   rE   Feature.snippet   s2     99Z ($+IDIIj!yy$$rP   c                      XR                   S'   g )Nr2   r[   r@   rE   s     rN   rE   r      s     !(		*rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ zExtra data for the feature.r   r9   r   rU   s    rN   rK   Feature.extendeddata   2     99^$,(4DIIn%yy((rP   c                      XR                   S'   g Nr   r[   r@   rK   s     rN   rK   r           %1		.!rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ );Single moment in time, accepts :class:`simplekml.TimeStamp`r3   )r9   r#   rU   s    rN   rH   Feature.timestamp   s2     99\"*&/kDIIl#yy&&rP   c                      XR                   S'   g )Nr3   r[   r@   rH   s     rN   rH   r           #,		,rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )3Period of time, accepts :class:`simplekml.TimeSpan`r4   )r9   r"   rU   s    rN   rI   Feature.timespan   s2     99[!)%-ZDIIk"yy%%rP   c                      XR                   S'   g )Nr4   r[   r@   rI   s     rN   rI   r          "*		+rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ ):Bounding box of feature, accepts :class:`simplekml.Region`r   )r9   r   rU   s    rN   rJ   Feature.region  s2     99X&"((DIIhyy""rP   c                      XR                   S'   g )Nr   r[   r@   rJ   s     rN   rJ   r     s     %		(rP   c                     U R                   $ )z Id number of feature, read-only.rS   rU   s    rN   rV   rW     rX   rP   c                     U R                   cE  [        5       U l         U R                  U R                   5        U R                  U R                   5        U R                   $ zBThe current style of the feature, accepts :class:`simplekml.Style`)r:   r   	_setstyle	_addstylerU   s    rN   styleFeature.style  sA     ;;'DKNN4;;'NN4;;'{{rP   c                 T    U R                  U5        U R                  U5        Xl        g N)r   r   r:   r@   r   s     rN   r   r   &  s!     	uurP   c                     U R                   cE  [        5       U l         U R                  U R                   5        U R                  U R                   5        U R                   $ zHThe current StyleMap of the feature, accepts :class:`simplekml.StyleMap`)r;   r   r   _addstylemaprU   s    rN   stylemapFeature.stylemap-  sC     >>!%ZDNNN4>>*dnn-~~rP   c                 T    U R                  U5        U R                  U5        Xl        g r   )r   r   r;   r@   r   s     rN   r   r   6  s#     	x (#!rP   c                      U R                   S   $ )zAReference to the current styleurl or the feature, accepts string.r5   r[   rU   s    rN   styleurlFeature.styleurl=       yy$$rP   c                      XR                   S'   g )Nr5   r[   )r@   r   s     rN   r   r   B       (		*rP   c                 .    U R                   R                  $ z>IconStyle of the feature, accepts :class:`simplekml.IconStyle`r   	iconstylerU   s    rN   r   Feature.iconstyleF       zz###rP   c                 $    XR                   l        g r   r   r@   r   s     rN   r   r   K        )

rP   c                 .    U R                   R                  $ z@LabelStyle of the feature, accepts :class:`simplekml.LabelStyle`r   
labelstylerU   s    rN   r   Feature.labelstyleP       zz$$$rP   c                 $    XR                   l        g r   r   r@   r   s     rN   r   r   U       !+

rP   c                 .    U R                   R                  $ z>LineStyle of the feature, accepts :class:`simplekml.LineStyle`r   	linestylerU   s    rN   r   Feature.linestyleZ  r   rP   c                 $    XR                   l        g r   r   r@   r   s     rN   r   r   _  r   rP   c                 .    U R                   R                  $ z>PolyStyle of the feature, accepts :class:`simplekml.PolyStyle`r   	polystylerU   s    rN   r   Feature.polystyled  r   rP   c                 $    XR                   l        g r   r   r@   r   s     rN   r   r   i  r   rP   c                 .    U R                   R                  $ zDBalloonStyle of the feature, accepts :class:`simplekml.BalloonStyle`r   balloonstylerU   s    rN   r   Feature.balloonstylen       zz&&&rP   c                 $    XR                   l        g r   r   r@   r   s     rN   r   r   s       #/

rP   c                 .    U R                   R                  $ z>ListStyle of the feature, accepts :class:`simplekml.ListStyle`r   	liststylerU   s    rN   r   Feature.liststylex  r   rP   c                 $    XR                   l        g r   r   r@   r   s     rN   r   r  }  r   rP   c                 Z    XR                   ;  a  U R                   R                  U5        ggz1Attaches the given style (style) to this feature.N)r=   appendr   s     rN   r   Feature._addstyle  s#    $LL& %rP   c                 Z    XR                   ;  a  U R                   R                  U5        ggr  )r>   r  r   s     rN   r   Feature._addstylemap  s#    'OO""5) (rP   c                 T    SR                  UR                  5      U R                  S'   g )Nz#{0}r5   )formatrV   r9   r   s     rN   r   Feature._setstyle  s     &ehh 7		*rP   c                   > / nU R                    H9  nU R                  UR                  5        U R                  UR                  5        M;     SR	                  U R
                  R                  U R                  5      nUR                  U5        U R                   H  n[        R                  (       a~  UR                  [        R                  R                  ;  aT  UR                  UR                  5       5        [        R                  R                  R                  UR                  5        M  M  UR                  UR                  5       5        M     U R                    H  n[        R                  (       a~  UR                  [        R                  R                  ;  aT  UR                  UR                  5       5        [        R                  R                  R                  UR                  5        M  M  UR                  UR                  5       5        M     UR                  [         ["        U ]?  5       5        U R$                   H"  nUR                  UR                  5       5        M$     U R&                   H"  nUR                  UR                  5       5        M$     UR                  SR	                  U R
                  R                  5      5        SR)                  U5      $ )Nz<{0} id="{1}">z</{0}> )r>   r   normalstylehighlightstyler  rM   __name__rT   r  r=   r   
_compilingrV   _currentroot_processedstyles__str__r7   r&   r?   r<   join)r@   bufr   strr   folderfeatrM   s          rN   r  Feature.__str__  s   HNN8//0NN8223 ( %%dnn&=&=txxH

3 \\E!!887#7#7#H#HHJJu}}/((99@@J I 

5==?+ " H!!;;g&:&:&K&KKJJx//12((99@@M L 

8++-. ( 	

5$/12mmFJJv~~'( $NNDJJt||~& #

8??4>>#:#:;<wws|rP   )r<   r?   r:   r;   r>   r=   )NNNNNNNNNNNNNNNNN)9r  
__module____qualname____firstlineno____doc__r8   propertyrV   r)   setterr*   r+   rA   rB   r.   rC   rD   r1   rL   rF   r   r   rG   r   rE   r   rK   r   rH   r#   rI   r"   rJ   r   r   r   r   r   r   r   r   r   r   r   r   r   r!   r   r   r   r    r   r   r   r  __static_attributes____classcell__rM   s   @rN   r&   r&   !   s      #'!!"%)#*X   ! ! 
[[! ! ' ' - - ! ! 
[[! ! ( ( . . & & __* * $ $ ^^' ' 	/ 	/ < < ( ( / / ( ( / / 1 1 @  @ # # ]]
6]#  # # # ]]
6]%  % % % ^^
7^(  ( ) ) 
<1  1 ' ' 
9,  , & & __
8_*  * # # ]]
6]%  %     \\
5\  
   __
8_"  "
 % % __) ) $ $ 
9)  ) % % 
:+  + $ $ 
9)  ) $ $ 
9)  ) ' ' 
</  / $ $ 
9)  )'
*
8   rP   r&   c                   &  ^  \ rS rSrSrU 4S jr\S 5       r\S 5       r\S 5       r	\S 5       r
\S 5       r\S	 5       r\S
 5       r\S 5       r\S 5       r\S 5       rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rSr U =r!$ )	Containeri  zAbstract class, extended by :class:`simplekml.Document` and :class:`simplekml.Folder`

Arguments are the same as :class:`simplekml.Feature`

.. note::
   Not to be used directly.
c                 .   > [         [        U ]
  " S0 UD6  g N )r7   r&  r8   r@   kwargsrM   s     rN   r8   Container.__init__  s    i'1&1rP   c                     / nU R                    HF  n[        U[        5      (       a  UR                  UR                  5        M5  UR                  U5        MH     U$ )zfReturns a list of all the features that have been attached to this container.

*New in version 1.1.0*
)r<   
isinstance	Placemarkr  geometryr@   featsr  s      rN   featuresContainer.features  sG     NND$	**T]]+T"	 #
 rP   c                     / nU R                    H7  n[        U[        5      (       a  XR                  -  nUR	                  U5        M9     U$ )z|Returns a list of all the features that have been attached to this container, and all sub features.

*New in version 1.1.0*
)r3  r.  r&  allfeaturesr  r1  s      rN   r6  Container.allfeatures  sE     MMD$	**)))LL " rP   c                 t    U R                    Vs/ s H  n[        U[        5      (       d  M  UPM     sn$ s  snf )zhReturns a list of all the geometries that have been attached to this container.

*New in version 1.1.0*
)r3  r.  Geometryr@   is     rN   
geometriesContainer.geometries  s)      ==D=aJq(,C=DDD   55c                 t    U R                    Vs/ s H  n[        U[        5      (       d  M  UPM     sn$ s  snf )zReturns a list of all the geometries that have been attached to this container, and all sub geometries.

*New in version 1.1.0*
)r6  r.  r9  r:  s     rN   allgeometriesContainer.allgeometries  s-      ++G+az!X/F+GGGr>  c                 t    U R                    Vs/ s H  n[        U[        5      (       d  M  UPM     sn$ s  snf )zhReturns a list of all the containers that have been attached to this container.

*New in version 1.1.0*
)r3  r.  r&  r:  s     rN   
containersContainer.containers  s)      ==E=aJq),D=EEEr>  c                     / nU R                    H7  n[        U[        5      (       a  XR                  -  nUR	                  U5        M9     U$ )zReturns a list of all the containers that have been attached to this container, and all sub containers.

*New in version 1.1.0*
)rC  r.  r&  allcontainersr  r1  s      rN   rF  Container.allcontainers  sE     OOD$	**+++LL $ rP   c                     U R                   $ )zdReturns a list of all the styles that have been attached to this container.

*New in version 1.1.0*
)r=   rU   s    rN   stylesContainer.styles  s     ||rP   c                 p    U R                    VVs/ s H  oR                    H  o"PM     M     snn$ s  snnf )zxReturns a list of all the styles that have been attached to this container, and all sub styles.

*New in version 1.1.0*
)rF  rI  )r@   	containerr   s      rN   	allstylesContainer.allstyles  s1     (,'9'9X'9)GWGWeGW'9XXX   2c                     U R                   $ )zgReturns a list of all the stylemaps that have been attached to this container.

*New in version 1.1.0*
)r>   rU   s    rN   	stylemapsContainer.stylemaps  s     rP   c                 p    U R                    VVs/ s H  oR                    H  o"PM     M     snn$ s  snnf )z~Returns a list of all the stylemaps that have been attached to this container, and all sub stylemaps.

*New in version 1.1.0*
)rF  rQ  )r@   rL  r   s      rN   allstylemapsContainer.allstylemaps  s1     +/*<*<a*<YM`M`M`*<aaarO  c                 ,   U" S0 UD6nXl         [        U[        5      (       aU  U R                  R	                  UR
                  5        Xl         UR                  b  U R                  UR                  5        U$ U R                  R	                  U5        U$ )zLCreates a new feature from the given class and attaches it to this
feature.
r)  )_parentr.  r9  r<   r  
_placemarkr:   r   r@   clsr+  r  s       rN   _newfeatureContainer._newfeature  sv     }V}dH%%NN!!$//2L{{&t{{+  NN!!$'rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.Point` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.Point`

Returns:
  * an instance of :class:`simplekml.Point` class.
r[  Pointr@   r+  s     rN   newpointContainer.newpoint,       000rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.LineString` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.LineString`

Returns:
  * an instance of :class:`simplekml.LineString` class.
r[  
LineStringr`  s     rN   newlinestringContainer.newlinestring6       
5f55rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.Polygon` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.Polygon`

Returns:
  * an instance of :class:`simplekml.Polygon` class.
r[  Polygonr`  s     rN   
newpolygonContainer.newpolygon@       2622rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.MultiGeometry` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.MultiGeometry`

Returns:
  * an instance of :class:`simplekml.MultiGeometry` class.
)r[  MultiGeometryr`  s     rN   newmultigeometryContainer.newmultigeometryJ       888rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.GroundOverlay` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.GroundOverlay`

Returns:
  * an instance of :class:`simplekml.GroundOverlay` class.
r[  GroundOverlayr`  s     rN   newgroundoverlayContainer.newgroundoverlayT  rt  rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.ScreenOverlay` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.ScreenOverlay`

Returns:
  * an instance of :class:`simplekml.ScreenOverlay` class.
r[  ScreenOverlayr`  s     rN   newscreenoverlayContainer.newscreenoverlay^  rt  rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.PhotoOverlay` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.PhotoOverlay`

Returns:
  * an instance of :class:`simplekml.PhotoOverlay` class.
r[  PhotoOverlayr`  s     rN   newphotooverlayContainer.newphotooverlayh       777rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.Model` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.Model`

Returns:
  * an instance of :class:`simplekml.Model` class.
r[  Modelr`  s     rN   newmodelContainer.newmodelr  rc  rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.GxTrack` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.GxTrack`

Returns:
  * an instance of :class:`simplekml.GxTrack` class.
)r[  GxTrackr`  s     rN   
newgxtrackContainer.newgxtrack|  ro  rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.GxMultiTrack` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.GxMultiTrack`

Returns:
  * an instance of :class:`simplekml.GxMultiTrack` class.
)r[  GxMultiTrackr`  s     rN   newgxmultitrackContainer.newgxmultitrack  r  rP   c                 0    U R                   " [        40 UD6$ zCreates a new :class:`simplekml.Folder` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.Folder`

Returns:
  * an instance of :class:`simplekml.Folder` class.
)r[  Folderr`  s     rN   	newfolderContainer.newfolder       1&11rP   c                 0    U R                   " [        40 UD6$ r  )r[  Documentr`  s     rN   newdocumentContainer.newdocument  s     3F33rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.NetworkLink` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.NetworkLink`

Returns:
  * an instance of :class:`simplekml.NetworkLink` class.
)r[  NetworkLinkr`  s     rN   newnetworklinkContainer.newnetworklink  s     6v66rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.GxTour` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.GxTour`

Returns:
  * an instance of :class:`simplekml.NetworkLink` class.
)r[  r$   r`  s     rN   	newgxtourContainer.newgxtour  r  rP   r)  )"r  r  r  r  r  r8   r   r3  r6  r<  r@  rC  rF  rI  rM  rQ  rT  r[  ra  rg  rm  rr  rx  r}  r  r  r  r  r  r  r  r  r"  r#  r$  s   @rN   r&  r&    s/   2   
 
 E E H H F F 
 
   Y Y   b b16399981382472 2rP   r&  c                   2   ^  \ rS rSrSrU 4S jrS rSrU =r$ )r  i  zA container for features and styles.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    doc = kml.newdocument(name='A Document')
    pnt = doc.newpoint()
    kml.save("Document.kml")
c                 .   > [         [        U ]
  " S0 UD6  g r(  )r7   r  r8   r*  s     rN   r8   Document.__init__  s    h&00rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.Schema` and attaches it to this KML document.

Arguments are the same as :class:`simplekml.Schema`

Returns:
  * an instance of :class:`simplekml.Schema` class.
)r[  r   r`  s     rN   	newschemaDocument.newschema  r  rP   r)  )	r  r  r  r  r  r8   r  r"  r#  r$  s   @rN   r  r    s    12 2rP   r  c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r  i  zA container for features that act like a folder.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    fol = kml.newfolder(name='A Folder')
    pnt = fol.newpoint()
    kml.save("Folder.kml")
c                 .   > [         [        U ]
  " S0 UD6  g r(  )r7   r  r8   r*  s     rN   r8   Folder.__init__  s    fd$.v.rP   r)  )r  r  r  r  r  r8   r"  r#  r$  s   @rN   r  r    s    / /rP   r  c                   v  ^  \ rS rSrSrU 4S jr\S 5       r\S 5       r\R                  S 5       r\S 5       r
\
R                  S 5       r
\S	 5       r\R                  S
 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  \" \5      S 5       5       r\S 5       r\R                  \" \5      S 5       5       r\S 5       r\R                  \" \5      S 5       5       r\S 5       r\R                  \" \5      S 5       5       r\S 5       r\R                  \" \5      S  5       5       r\S! 5       r\R                  \" \5      S" 5       5       r\S# 5       r\R                  \" \ 5      S$ 5       5       r\S% 5       r!\!R                  \" \"5      S& 5       5       r!\S' 5       r#\#R                  \" \$5      S( 5       5       r#\S) 5       r%\%R                  \" \&5      S* 5       5       r%\S+ 5       r'\'R                  \" \(5      S, 5       5       r'\S- 5       r)\)R                  \" \*5      S. 5       5       r)\S/ 5       r+\+R                  \" \,5      S0 5       5       r+\S1 5       r-\-R                  \" \.5      S2 5       5       r-\S3 5       r/\/R                  \" \05      S4 5       5       r/\S5 5       r1S6r2U =r3$ )7r9  i  zAbstract class for all Geometries.

Arguments are the same as :class:`simplekml.Placemark`

.. note::
   Not to be used directly.
c                    > [         [        U ]  5         [        S0 UD6U l        X R                  l        S U l        S U l        S U l        g r(  )	r7   r9  r8   r/  rX  r0  rW  r:   r;   r*  s     rN   r8   Geometry.__init__  s>    h&(#-f-#' rP   c                     U R                   $ rR   rS   rU   s    rN   rV   Geometry.id  rX   rP   c                 .    U R                   R                  $ )rZ   rX  r)   rU   s    rN   r)   Geometry.name  s     ###rP   c                 $    XR                   l        g r   r  r_   s     rN   r)   r    s    #rP   c                 .    U R                   R                  $ )rb   rX  r*   rU   s    rN   r*   Geometry.visibility       )))rP   c                 $    XR                   l        g r   r  rf   s     rN   r*   r        %/"rP   c                 .    U R                   R                  $ )rl   rX  rA   rU   s    rN   rA   Geometry.atomauthor  r  rP   c                 $    XR                   l        g r   r  rp   s     rN   rA   r    r  rP   c                 .    U R                   R                  $ )rr   rX  rB   rU   s    rN   rB   Geometry.atomlink       '''rP   c                 $    XR                   l        g r   r  rv   s     rN   rB   r    s    #+ rP   c                 .    U R                   R                  $ )rx   rX  r.   rU   s    rN   r.   Geometry.address!       &&&rP   c                 $    XR                   l        g r   r  r|   s     rN   r.   r  &  s    ")rP   c                 .    U R                   R                  $ )z&Address in xAL format, accepts string.rX  rC   rU   s    rN   rC   Geometry.xaladdressdetails*  s     000rP   c                 $    XR                   l        g r   r  r   s     rN   rC   r  /  s    ,=)rP   c                 .    U R                   R                  $ )r   rX  rD   rU   s    rN   rD   Geometry.phonenumber3       ***rP   c                 $    XR                   l        g r   r  r   s     rN   rD   r  8      &1#rP   c                 .    U R                   R                  $ )r   rX  r1   rU   s    rN   r1   Geometry.description<  r  rP   c                 $    XR                   l        g r   r  r   s     rN   r1   r  A  r  rP   c                 .    U R                   R                  $ )r   rX  rL   rU   s    rN   rL   Geometry.gxballoonvisibilityE  s     222rP   c                 $    XR                   l        g r   r  r   s     rN   rL   r  N  s    .A+rP   c                     U R                   R                  c  [        5       U R                   l        U R                   R                  $ )r   )rX  rF   r   rU   s    rN   rF   Geometry.cameraR  2     ??!!)%+XDOO"%%%rP   c                 $    XR                   l        g r   )rX  rF   r   s     rN   rF   r  Y       "(rP   c                     U R                   R                  c  [        5       U R                   l        U R                   R                  $ )r   )rX  rG   r   rU   s    rN   rG   Geometry.lookat^  r  rP   c                 $    XR                   l        g r   )rX  rG   r   s     rN   rG   r  e  r  rP   c                 .    U R                   R                  $ r   rX  rE   rU   s    rN   rE   Geometry.snippetj  r  rP   c                 $    XR                   l        g r   r  r   s     rN   rE   r  o  s     #*rP   c                 .    U R                   R                  $ r  rX  rK   rU   s    rN   rK   Geometry.extendeddatat  s     +++rP   c                 $    XR                   l        g r   r  r   s     rN   rK   r  y  s     (4$rP   c                 .    U R                   R                  $ )r   rX  rI   rU   s    rN   rI   Geometry.timespan~  r  rP   c                 $    XR                   l        g r   r  r   s     rN   rI   r    s     $, rP   c                 .    U R                   R                  $ )r   rX  rH   rU   s    rN   rH   Geometry.timestamp  s     (((rP   c                 $    XR                   l        g r   r  r   s     rN   rH   r    s     %.!rP   c                 .    U R                   R                  $ )r   rX  rJ   rU   s    rN   rJ   Geometry.region  s     %%%rP   c                 $    XR                   l        g r   r  r   s     rN   rJ   r    r  rP   c                     U R                   cf  [        5       U l         U R                  R                  U R                   5        U R                  b%  U R                  R                  U R                   5        U R                   $ r   )r:   r   rX  r   rW  r   rU   s    rN   r   Geometry.style  sW     ;;'DKOO%%dkk2||'&&t{{3{{rP   c                     U R                   R                  U5        U R                  b  U R                  R                  U5        Xl        g r   )rX  r   rW  r   r:   r   s     rN   r   r    s7     	!!%(<<#LL""5)rP   c                     U R                   cf  [        5       U l         U R                  R                  U R                   5        U R                  b%  U R                  R                  U R                   5        U R                   $ r   )r;   r   rX  r   rW  r   rU   s    rN   r   Geometry.stylemap  sW     >>!%ZDNOO%%dnn5||'))$..9~~rP   c                     U R                   R                  U5        U R                  b  U R                  R                  U5        Xl        g r   )rX  r   rW  r   r;   r   s     rN   r   r    s7     	!!(+<<#LL%%h/!rP   c                 .    U R                   R                  $ r   r   rU   s    rN   r   Geometry.iconstyle  r   rP   c                 $    XR                   l        g r   r   r   s     rN   r   r    r   rP   c                 .    U R                   R                  $ r   r   rU   s    rN   r   Geometry.labelstyle  r   rP   c                 $    XR                   l        g r   r   r   s     rN   r   r    r   rP   c                 .    U R                   R                  $ r   r   rU   s    rN   r   Geometry.linestyle  r   rP   c                 $    XR                   l        g r   r   r   s     rN   r   r    r   rP   c                 .    U R                   R                  $ r   r   rU   s    rN   r   Geometry.polystyle  r   rP   c                 $    XR                   l        g r   r   r   s     rN   r   r    r   rP   c                 .    U R                   R                  $ r   r   rU   s    rN   r   Geometry.balloonstyle  r   rP   c                 $    XR                   l        g r   r   r   s     rN   r   r    r   rP   c                 .    U R                   R                  $ r   r   rU   s    rN   r   Geometry.liststyle  r   rP   c                 $    XR                   l        g r   r   r  s     rN   r   r    r   rP   c                     U R                   $ )z4The placemark that contains this feature, read-only.)rX  rU   s    rN   	placemarkGeometry.placemark  s     rP   )rW  rX  r:   r;   )4r  r  r  r  r  r8   r   rV   r)   r!  r*   rA   rB   r.   rC   rD   r1   rL   rF   r   r   rG   r   rE   r   rK   r   rI   r"   rH   r#   rJ   r   r   r   r   r   r   r   r   r   r   r   r   r!   r   r   r   r    r  r"  r#  r$  s   @rN   r9  r9    s/      $ $ 
[[$ $ * * 0 0 * * 0 0 ( ( __, , ' ' ^^* * 1 1 > > + + 2 2 + + 2 2 3 3 B  B & & ]]
6](  ( & & ]]
6](  ( ' ' ^^
7^*  * , , 
<4  4 ( ( __
8_,  , ) ) 
9.  . & & ]]
6](  (   \\
5\     __
8_"  " $ $ 
9)  ) % % 
:+  + $ $ 
9)  ) $ $ 
9)  ) ' ' 
</  / $ $ 
9)  )  rP   r9  c                   |   ^  \ rS rSrSrSU 4S jjr\S 5       r\R                  \	" \
S5      S 5       5       rSrU =r$ )	r/  i  zA Placemark is a Feature with associated Geometry.

Args:
  * geometry: any class that inherits from :class:`simplekml.Geometry`
  * *all other args same as* :class:`simplekml.Feature`

.. note::
   Not to be used directly.
c                 J   > [         [        U ]
  " S0 UD6  XR                  S'   g )N	Geometry_r)  )r7   r/  r8   r9   )r@   r0  r+  rM   s      rN   r8   Placemark.__init__  s!    i'1&1!)		+rP   c                      U R                   S   $ )z>Accepts a class that inherits from :class:`simplekml.Geometry`r  r[   rU   s    rN   r0  Placemark.geometry  rt   rP   Tc                      XR                   S'   g )Nr  r[   )r@   geoms     rN   r0  r    s     "&		+rP   r)  r   )r  r  r  r  r  r8   r   r0  r!  r   r9  r"  r#  r$  s   @rN   r/  r/    sH    * & & __
8T&  &rP   r/  c                   f   ^  \ rS rSrSr SU 4S jjr\S 5       r\R                  S 5       rSr	U =r
$ )PointGeometryi  a  Abstract class for any geometry requiring coordinates (not :class:`simplekml.Polygon`).

Args:
  * coords: list of tuples (see :func:`simplekml.coords` for examples)
  * *all other args same as* :class:`simplekml.Geometry`

.. note::
   Not to be used directly.
r)  c                    > [         [        U ]
  " S0 UD6  [        5       U R                  S'   U R                  S   R                  [        U5      5        g )Ncoordinatesr)  )r7   r  r8   r   r9   addcoordinateslist)r@   coordsr+  rM   s      rN   r8   PointGeometry.__init__&  s@    mT+5f5#.=		- 		- //V=rP   c                      U R                   S   $ )a&  The coordinates of the feature, accepts list of tuples.

A tuple represents a coordinate in the order longitude then latitude. The tuple has the option
of specifying a height. If no height is given, it defaults to zero. A point feature has just one point,
therefore a list with one tuple is given.

Examples:
  * No height:      `[(1.0, 1.0), (2.0, 1.0)]`
  * Height:         `[(1.0, 1.0, 50.0), (2.0, 1.0, 10.0)]`
  * Point:          `[(1.0, 1.0)]` # longitude, latitude
  * Point + height: `[(1.0, 1.0, 100)]` # longitude, latitude, height of 100m
r  r[   rU   s    rN   r!  PointGeometry.coords,  s     yy''rP   c                 n    [        5       U R                  S'   U R                  S   R                  U5        g )Nr  )r   r9   r  r@   r!  s     rN   r!  r$  <  s)    #.=		- 		- //7rP   r)  )r  r  r  r  r  r8   r   r!  r!  r"  r#  r$  s   @rN   r  r    s>     > ( ( ]]8 8rP   r  c                   L  ^  \ rS rSrSr      SU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	\S	 5       r
\
R                  S
 5       r
\S 5       r\R                  S 5       r\S 5       r\R                  S 5       rU 4S jrSrU =r$ )
LinearRingiB  a  A closed line string, typically the outer boundary of a :class:`simplekml.Polygon`

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    pol = kml.newpolygon()
    print(pol.outerboundaryis) # Shows that the outer boundary of a polygon is a linear ring
    pol.outerboundaryis.coords = [(0.0,0.0), (1.0,1.0), (2.0,2.0)]
    kml.save("LinearRing.kml")
r)  c                 &  > [         [        U ]
  " [        U5      40 UD6  X R                  S'   X0R                  S'   X@R                  S'   XPR                  S'   X`R                  S'    U R                  R                  S5        g ! [         a     g f = f)Nextrude
tessellatealtitudeModegx:altitudeModegx:altitudeOffsetr  )r7   r)  r8   r   r9   move_to_endAttributeError)	r@   r!  r+  r,  altitudemodegxaltitudemodegxaltitudeoffsetr+  rM   s	           rN   r8   LinearRing.__init__P  s     	j$(f@@&		)",		,$0		.!'5		#$)9		%&	II!!-0 		s   'B 
BBc                      U R                   S   $ z;Connect the LinearRing to the ground, accepts int (0 or 1).r+  r[   rU   s    rN   r+  LinearRing.extrudeb  rz   rP   c                      XR                   S'   g Nr+  r[   r@   r+  s     rN   r+  r8  g  r}   rP   c                      U R                   S   $ )zBAllows the LinearRing to follow the terrain, accepts int (0 or 1).r,  r[   rU   s    rN   r,  LinearRing.tessellatek  rd   rP   c                      XR                   S'   g Nr,  r[   r@   r,  s     rN   r,  r=  p  rg   rP   c                      U R                   S   $ znSpecifies how the altitude for the Camera is interpreted.

Accepts :class:`simplekml.AltitudeMode` constants.
r-  r[   rU   s    rN   r2  LinearRing.altitudemodet       yy((rP   c                      XR                   S'   g Nr-  r[   r@   modes     rN   r2  rC  |      $(		.!rP   c                      U R                   S   $ zSpecifies how the altitude for the Camera is interpreted.

With the addition of being relative to the sea floor.
Accepts :class:`simplekml.GxAltitudeMode` constants.
r.  r[   rU   s    rN   r3  LinearRing.gxaltitudemode       yy*++rP   c                      XR                   S'   g Nr.  r[   rG  s     rN   r3  rL        '+		#$rP   c                      U R                   S   $ z;How much to offsets the LinearRing vertically, accepts int.r/  r[   rU   s    rN   r4  LinearRing.gxaltitudeoffset       yy,--rP   c                      XR                   S'   g Nr/  r[   r@   offsets     rN   r4  rS        )/		%&rP   c                 \   > SR                  U R                  [        [        U ]  5       5      $ )Nz%<LinearRing id="{0}">{1}</LinearRing>)r  rT   r7   r)  r  r@   rM   s    rN   r  LinearRing.__str__  %    6==dhhjZ^HgHijjrP   )r)  NNNNN)r  r  r  r  r  r8   r   r+  r!  r,  r2  r3  r4  r  r"  r#  r$  s   @rN   r)  r)  B  s    ! " $"&$ $ $ ^^' ' ' ' - - ) ) ) ) , , , , . . 0 0k krP   r)  c                      ^  \ rS rSrSr   SU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	\S 5       r
\
R                  S	 5       r
U 4S
 jrSrU =r$ )r_  i  a   A geographic location defined by lon, lat, and altitude.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    pnt = kml.newpoint(name='A Point')
    pnt.coords = [(1.0, 2.0)]
    kml.save("Point.kml")

Styling a Single Point::

    import simplekml
    kml = simplekml.Kml()
    pnt = kml.newpoint(name='A Point')
    pnt.coords = [(1.0, 2.0)]
    pnt.style.labelstyle.color = simplekml.Color.red  # Make the text red
    pnt.style.labelstyle.scale = 2  # Make the text twice as big
    pnt.style.iconstyle.icon.href = 'http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png'
    kml.save("Point Styling.kml")

Sharing a Style with many Points (Shared Style)::

    import simplekml
    kml = simplekml.Kml()
    style = simplekml.Style()
    style.labelstyle.color = simplekml.Color.red  # Make the text red
    style.labelstyle.scale = 2  # Make the text twice as big
    style.iconstyle.icon.href = 'http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png'
    for lon in range(2):  # Generate longitude values
        for lat in range(2): # Generate latitude values
           pnt = kml.newpoint(name='Point: {0}{0}'.format(lon,lat))
           pnt.coords = [(lon, lat)] 
           pnt.style = style
    kml.save("Point Shared Style.kml")
c                    > [         [        U ]
  " S0 UD6  XR                  S'   X R                  S'   X0R                  S'   g )Nr+  r-  r.  r)  )r7   r_  r8   r9   )r@   r+  r2  r3  r+  rM   s        rN   r8   Point.__init__  s<    
 	eT#-f-&		)$0		.!'5		#$rP   c                      U R                   S   $ )z6Connect the Point to the ground, accepts int (0 or 1).r+  r[   rU   s    rN   r+  Point.extrude  rz   rP   c                      XR                   S'   g r:  r[   r;  s     rN   r+  rb    r}   rP   c                      U R                   S   $ rB  r[   rU   s    rN   r2  Point.altitudemode  rD  rP   c                      XR                   S'   g rF  r[   rG  s     rN   r2  re    rI  rP   c                      U R                   S   $ rK  r[   rU   s    rN   r3  Point.gxaltitudemode  rM  rP   c                      XR                   S'   g rO  r[   rG  s     rN   r3  rh    rP  rP   c                 \   > SR                  U R                  [        [        U ]  5       5      $ )Nz<Point id="{0}">{1}</Point>)r  rT   r7   r_  r  r[  s    rN   r  Point.__str__  $    ,33DHHeE4>X>Z[[rP   r)  NNN)r  r  r  r  r  r8   r   r+  r!  r2  r3  r  r"  r#  r$  s   @rN   r_  r_    s    %P " $6 $ $ ^^' ' ) ) ) ) , , , ,\ \rP   r_  c                     ^  \ rS rSrSr      SU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	\S 5       r
\
R                  S	 5       r
\S
 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       rU 4S jrSrU =r$ )rf  i  a  A connected set of line segments.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    ls = kml.newlinestring(name='A LineString')
    ls.coords = [(18.333868,-34.038274,10.0), (18.370618,-34.034421,10.0)]
    ls.extrude = 1
    ls.altitudemode = simplekml.AltitudeMode.relativetoground
    kml.save("LineString.kml")

Styling::

    import simplekml
    kml = simplekml.Kml()
    ls = kml.newlinestring(name='A LineString')
    ls.coords = [(18.333868,-34.038274,10.0), (18.370618,-34.034421,10.0)]
    ls.extrude = 1
    ls.altitudemode = simplekml.AltitudeMode.relativetoground
    ls.style.linestyle.width = 5
    ls.style.linestyle.color = simplekml.Color.blue
    kml.save("LineString Styling.kml")
c                 .  > [         [        U ]
  " S0 UD6  XR                  S'   X R                  S'   X0R                  S'   X@R                  S'   XPR                  S'   X`R                  S'    U R                  R	                  S5        g ! [
         a     g f = f)	Nr+  r,  r-  r.  r/  gx:drawOrderr  r)  )r7   rf  r8   r9   r0  r1  )	r@   r+  r,  r2  r3  r4  gxdraworderr+  rM   s	           rN   r8   LineString.__init__  s     	j$(262&		)",		,$0		.!'5		#$)9		%&$/		.!	II!!-0 		s   +B 
BBc                      U R                   S   $ r7  r[   rU   s    rN   r+  LineString.extrude!  rz   rP   c                      XR                   S'   g r:  r[   r;  s     rN   r+  rt  &  r}   rP   c                      U R                   S   $ )zBAllowe the LinearRing to follow the terrain, accepts int (0 or 1).r,  r[   rU   s    rN   r,  LineString.tessellate*  rd   rP   c                      XR                   S'   g r?  r[   r@  s     rN   r,  rw  /  rg   rP   c                      U R                   S   $ rB  r[   rU   s    rN   r2  LineString.altitudemode3  rD  rP   c                      XR                   S'   g rF  r[   rG  s     rN   r2  rz  ;  rI  rP   c                      U R                   S   $ rK  r[   rU   s    rN   r3  LineString.gxaltitudemode?  rM  rP   c                      XR                   S'   g rO  r[   rG  s     rN   r3  r}  H  rP  rP   c                      U R                   S   $ rR  r[   rU   s    rN   r4  LineString.gxaltitudeoffsetL  rT  rP   c                      XR                   S'   g rV  r[   rW  s     rN   r4  r  Q  rY  rP   c                      U R                   S   $ )z.The order to draw the linestring, accepts int.rp  r[   rU   s    rN   rq  LineString.gxdraworderU  s     yy((rP   c                      XR                   S'   g )Nrp  r[   )r@   rq  s     rN   rq  r  Z  s    $/		.!rP   c                 \   > SR                  U R                  [        [        U ]  5       5      $ )Nz%<LineString id="{0}">{1}</LineString>)r  rT   r7   rf  r  r[  s    rN   r  LineString.__str__^  r]  rP   r)  )NNNNNN)r  r  r  r  r  r8   r   r+  r!  r,  r2  r3  r4  rq  r  r"  r#  r$  s   @rN   rf  rf    s?   6  " $"&!( $ $ ^^' ' ' ' - - ) ) ) ) , , , , . . 0 0 ) ) 0 0k krP   rf  c                     ^  \ rS rSrSr      SU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	\S 5       r
\
R                  S	 5       r
\S
 5       r\R                  S 5       r\S 5       r\R                  S 5       r\S 5       r\R                  S 5       rU 4S jrSrU =r$ )rl  ib  a  A Polygon is defined by an outer boundary and/or an inner boundary.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    pol = kml.newpolygon(name='A Polygon')
    pol.outerboundaryis = [(18.333868,-34.038274), (18.370618,-34.034421),
                           (18.350616,-34.051677),(18.333868,-34.038274)]
    pol.innerboundaryis = [(18.347171,-34.040177), (18.355741,-34.039730),
                           (18.350467,-34.048388),(18.347171,-34.040177)]
    kml.save("Polygon.kml")
    
Styling::

    import simplekml
    kml = simplekml.Kml()
    pol = kml.newpolygon(name='A Polygon')
    pol.outerboundaryis = [(18.333868,-34.038274), (18.370618,-34.034421),
                           (18.350616,-34.051677),(18.333868,-34.038274)]
    pol.innerboundaryis = [(18.347171,-34.040177), (18.355741,-34.039730),
                           (18.350467,-34.048388),(18.347171,-34.040177)]
    pol.style.linestyle.color = simplekml.Color.green
    pol.style.linestyle.width = 5
    pol.style.polystyle.color = simplekml.Color.changealphaint(100, simplekml.Color.green)
    kml.save("Polygon Styling.kml")
c                   > [         [        U ]
  " S0 UD6  XR                  S'   X R                  S'   X0R                  S'   X@R                  S'   [	        [        U5      5      U R                  S'   S U R                  S'   [        U5      U l        g )Nr+  r,  r-  r.  outerBoundaryIsinnerBoundaryIsr)  )r7   rl  r8   r9   r)  r   innerboundaryis)	r@   r+  r,  r2  r3  outerboundaryisr  r+  rM   s	           rN   r8   Polygon.__init__  s}     	gt%//&		)",		,$0		.!'5		#$'1$2G'H		#$'+		#$#O4rP   c                      U R                   S   $ r7  r[   rU   s    rN   r+  Polygon.extrude  rz   rP   c                      XR                   S'   g r:  r[   r;  s     rN   r+  r    r}   rP   c                      U R                   S   $ )z?Allows the Polygon to follow the terrain, accepts int (0 or 1).r,  r[   rU   s    rN   r,  Polygon.tessellate  rd   rP   c                      XR                   S'   g r?  r[   r@  s     rN   r,  r    rg   rP   c                      U R                   S   $ rB  r[   rU   s    rN   r2  Polygon.altitudemode  rD  rP   c                      XR                   S'   g rF  r[   rG  s     rN   r2  r    rI  rP   c                      U R                   S   $ rK  r[   rU   s    rN   r3  Polygon.gxaltitudemode  rM  rP   c                      XR                   S'   g rO  r[   rG  s     rN   r3  r    rP  rP   c                     U R                   $ )zThe inner boundaries.

Accepts list of list of tuples of floats for multiple boundaries, or a
list of tuples of floats for a single boundary.
)_innerboundaryisrU   s    rN   r  Polygon.innerboundaryis  s     $$$rP   c                 b   / U l         [        U5      (       d  S U R                  S'   g [        US   5      [        S5      :X  a  U/nSU R                  S'   U HU  nU R                  S==   [	        U5      R                  5       -  ss'   U R                   R                  [	        U5      5        MW     g )Nr  r   r)  r  )r  lenr9   typer)  r  r  )r@   ringsrings      rN   r  r    s     "5zz+/DII'(E!H~b)+-DII'(		+,
40@0H0H0JJ,%%,,Z-=> rP   c                      U R                   S   $ )z7The outer boundary, accepts a list of tuples of floats.r  r[   rU   s    rN   r  Polygon.outerboundaryis  s     yy*++rP   c                 4    [        U5      U R                  S'   g )Nr  )r)  r9   r&  s     rN   r  r    s    '1&'9		#$rP   c                 \   > SR                  U R                  [        [        U ]  5       5      $ )Nz<Polygon id="{0}">{1}</Polygon>)r  rT   r7   rl  r  r[  s    rN   r  Polygon.__str__  s%    077%QUB^B`aarP   )r  r  )NNNNr)  r)  )r  r  r  r  r  r8   r   r+  r!  r,  r2  r3  r  r  r  r"  r#  r$  s   @rN   rl  rl  b  s?   >  " $!#!#5  $ $ ^^' ' ' ' - - ) ) ) ) , , , , % % 
? 
? , , : :b brP   rl  c                   n   ^  \ rS rSrSr SU 4S jjrS rS rS rS r	S r
S	 rS
 rS rU 4S jrSrU =r$ )rq  i  av  MultiGeometry is a collection of simple features (Points, LineStrings, etc).

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    multipnt = kml.newmultigeometry(name="MultiPoint")
    for lon in range(2):  # Generate longitude values
        for lat in range(2): # Generate latitude values
            multipnt.newpoint(coords=[(lon, lat)])
    kml.save("MultiGeometry.kml")
    
Styling::

    import simplekml
    kml = simplekml.Kml()
    multipnt = kml.newmultigeometry(name="MultiPoint")
    multipnt.style.labelstyle.scale = 0  # Remove the labels from all the points
    multipnt.style.iconstyle.color = simplekml.Color.red
    for lon in range(2):  # Generate longitude values
        for lat in range(2): # Generate latitude values
            multipnt.newpoint(coords=[(lon, lat)])
    kml.save("MultiGeometry Styling.kml")
c                 N   > [         [        U ]
  " S0 UD6  [        U5      U l        g r(  )r7   rq  r8   r   _geometries)r@   r<  r+  rM   s      rN   r8   MultiGeometry.__init__  s"    mT+5f5
+rP   c                 n    U" S0 UD6nU R                   Ul        U R                  R                  U5        U$ r(  )rX  rW  r  r  rY  s       rN   r[  MultiGeometry._newfeature   s1    }V}%rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.Point` and attaches it to this MultiGeometry.

The arguments are the same as :class:`simplekml.Point`

Returns:
  * an instance of :class:`simplekml.Point`
r^  r`  s     rN   ra  MultiGeometry.newpoint  rc  rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.LineString` and attaches it to this MultiGeometry.

The arguments are the same as :class:`simplekml.LineString`

Returns:
  * an instance of :class:`simplekml.LineString`
re  r`  s     rN   rg  MultiGeometry.newlinestring  ri  rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.Polygon` and attaches it to this MultiGeometry.

The arguments are the same as :class:`simplekml.Polygon`

Returns:
  * an instance of :class:`simplekml.Polygon`
rk  r`  s     rN   rm  MultiGeometry.newpolygon  ro  rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.GroundOverlay` and attaches it to this MultiGeometry.

The arguments are the same as :class:`simplekml.GroundOverlay`

Returns:
  * an instance of :class:`simplekml.GroundOverlay`
rv  r`  s     rN   rx  MultiGeometry.newgroundoverlay$  rt  rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.ScreenOverlay` and attaches it to this MultiGeometry.

The arguments are the same as :class:`simplekml.ScreenOverlay`

Returns:
  * an instance of :class:`simplekml.ScreenOverlay`
r{  r`  s     rN   r}  MultiGeometry.newscreenoverlay.  rt  rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.PhotoOverlay` and attaches it to this MultiGeometry.

The arguments are the same as :class:`simplekml.PhotoOverlay`

Returns:
  * an instance of :class:`simplekml.PhotoOverlay`
r  r`  s     rN   r  MultiGeometry.newphotooverlay8  r  rP   c                 0    U R                   " [        40 UD6$ )zCreates a new :class:`simplekml.Model` and attaches it to this MultiGeometry.

The arguments are the same as :class:`simplekml.Model`

Returns:
  * an instance of :class:`simplekml.Model`
r  r`  s     rN   r  MultiGeometry.newmodelB  rc  rP   c                   > SR                  U R                  5      [        [        U ]  5       /nU R
                   H"  nUR                  UR	                  5       5        M$     UR                  S5        SR                  U5      $ )Nz<MultiGeometry id="{0}">z</MultiGeometry>r  )r  rT   r7   rq  r  r  r  r  )r@   r  r  rM   s      rN   r  MultiGeometry.__str__L  sf    )00:]D135$$DJJt||~& %

%&wws|rP   )r  r'  )r  r  r  r  r  r8   r[  ra  rg  rm  rx  r}  r  r  r  r"  r#  r$  s   @rN   rq  rq    sD    8 ,
1639981 rP   rq  c                      ^  \ rS rSrSr   SU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	\S 5       r
\
R                  \" \5      S	 5       5       r
S
rU =r$ )OverlayiU  ztAbstract class for image overlays.

Arguments are the same as the properties.

.. note::
  Not to be used directly.
c                    > [         [        U ]
  " S0 UD6  XR                  S'   X R                  S'   X0R                  S'   g )Ncolor	drawOrderIcon_r)  )r7   r  r8   r9   )r@   r  	drawordericonr+  rM   s        rN   r8   Overlay.__init__]  s;     	gt%//"		'!*		+!		'rP   c                      U R                   S   $ )z-The color of the overlay, accepts hex string.r  r[   rU   s    rN   r  Overlay.colorf       yy!!rP   c                      XR                   S'   g )Nr  r[   )r@   r  s     rN   r  r  k      "		'rP   c                      U R                   S   $ )z+The order to draw the overlay, accepts int.r  r[   rU   s    rN   r  Overlay.drawordero  rt   rP   c                      XR                   S'   g )Nr  r[   )r@   r  s     rN   r  r  t      !*		+rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )z@The icon to use for the overlay, accepts :class:`simplekml.Icon`r  )r9   r   rU   s    rN   r  Overlay.iconx  2     99W%!%DIIgyy!!rP   c                      XR                   S'   g )Nr  r[   )r@   r  s     rN   r  r         "		'rP   r)  rm  )r  r  r  r  r  r8   r   r  r!  r  r  r   r   r"  r#  r$  s   @rN   r  r  U  s     "!% " " " \\# # & & + + " " 
[[
4["  "rP   r  c                   j  ^  \ rS rSrSr     SU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	\S 5       r
\
R                  S	 5       r
\S
 5       r\R                  \" \5      S 5       5       r\S 5       r\R                  \" \5      S 5       5       rSrU =r$ )rw  i  a  Draws an image overlay draped onto the terrain.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    ground = kml.newgroundoverlay(name='GroundOverlay')
    ground.icon.href = 'http://simplekml.googlecode.com/hg/samples/resources/smile.png'
    ground.gxlatlonquad.coords = [(18.410524,-33.903972),(18.411429,-33.904171),
                                  (18.411757,-33.902944),(18.410850,-33.902767)]
    # or
    #ground.latlonbox.north = -33.902828
    #ground.latlonbox.south = -33.904104
    #ground.latlonbox.east =  18.410684
    #ground.latlonbox.west =  18.411633
    #ground.latlonbox.rotation = -14
    kml.save("GroundOverlay.kml")
c                    > [         [        U ]
  " S0 UD6  XR                  S'   X R                  S'   X0R                  S'   X@R                  S'   XPR                  S'   g )Naltituder-  r.  r   gx:LatLonQuadr)  )r7   rw  r8   r9   )r@   r  r2  r3  	latlonboxgxlatlonquadr+  rM   s          rN   r8   GroundOverlay.__init__  sT     	mT+5f5 (		*$0		.!'5		#$!*		+%1		/"rP   c                      U R                   S   $ )z,Distance above earth surface, accepts float.r  r[   rU   s    rN   r  GroundOverlay.altitude  r   rP   c                      XR                   S'   g )Nr  r[   )r@   r  s     rN   r  r    r   rP   c                      U R                   S   $ rB  r[   rU   s    rN   r2  GroundOverlay.altitudemode  rD  rP   c                      XR                   S'   g rF  r[   r@   r2  s     rN   r2  r        $0		.!rP   c                      U R                   S   $ rK  r[   rU   s    rN   r3  GroundOverlay.gxaltitudemode  rM  rP   c                      XR                   S'   g rO  r[   r@   r3  s     rN   r3  r        '5		#$rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zcSpecifies where the top, bottom, right, and left sides are.

Accepts :class:`simplekml.LatLonBox`.
r   )r9   r   rU   s    rN   r  GroundOverlay.latlonbox  s2     99[!)%.[DIIk"yy%%rP   c                      XR                   S'   g )Nr   r[   )r@   r  s     rN   r  r    s     "+		+rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zSpecifies the coordinates of the four corner points of a quadrilateral
defining the overlay area. Accepts :class:`simplekml.GxLatLonQuad`
r  )r9   r   rU   s    rN   r  GroundOverlay.gxlatlonquad  s2    
 99_%-)5DIIo&yy))rP   c                      XR                   S'   g )Nr  r[   )r@   r  s     rN   r  r    s     &2		/"rP   r)  NNNNN)r  r  r  r  r  r8   r   r  r!  r2  r3  r  r   r   r  r   r"  r#  r$  s   @rN   rw  rw    s   * !%$(&*!%$(	2 % % __) ) ) ) 1 1 , , 6 6 & & 
9+  + * * 
<2  2rP   rw  c                     ^  \ rS rSrSr     SU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  \
" \5      S 5       5       r	\S 5       r\R                  \
" \5      S	 5       5       r\S
 5       r\R                  \
" \5      S 5       5       r\S 5       r\R                  \
" \5      S 5       5       rSrU =r$ )r|  i  a  Draws an image overlay fixed to the screen.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    screen = kml.newscreenoverlay(name='ScreenOverlay')
    screen.icon.href = 'http://simplekml.googlecode.com/hg/samples/resources/simplekml-logo.png'
    screen.overlayxy = simplekml.OverlayXY(x=0,y=1,xunits=simplekml.Units.fraction,
                                           yunits=simplekml.Units.fraction)
    screen.screenxy = simplekml.ScreenXY(x=15,y=15,xunits=simplekml.Units.pixels,
                                         yunits=simplekml.Units.insetpixels)
    screen.size.x = -1
    screen.size.y = -1
    screen.size.xunits = simplekml.Units.fraction
    screen.size.yunits = simplekml.Units.fraction
    kml.save("ScreenOverlay.kml")
c                    > [         [        U ]
  " S0 UD6  XPR                  S'   XR                  S'   X R                  S'   X0R                  S'   X@R                  S'   g )Nrotation
overlayXY_	screenXY_rotationXY_size_r)  )r7   r|  r8   r9   )r@   	overlayxyscreenxy
rotationxysizer  r+  rM   s          rN   r8   ScreenOverlay.__init__  sS     	mT+5f5'		*"+		,!)		+#-		- !		'rP   c                      U R                   S   $ z'Rotation of the overlay, accepts float.r  r[   rU   s    rN   r  ScreenOverlay.rotation  r   rP   c                      XR                   S'   g Nr  r[   r@   r  s     rN   r  r    r   rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zPoint on the overlay image that is mapped to a screen coordinate.

Specifies a point on (or outside of) the overlay image that is mapped
to the screen coordinate :class:`simplekml.ScreenXY`,
accepts :class:`simplekml.OverlayXY`
r  )r9   r   rU   s    rN   r  ScreenOverlay.overlayxy  s2     99\"*&/kDIIl#yy&&rP   c                      XR                   S'   g )Nr  r[   )r@   r  s     rN   r  r     r   rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zPoint relative to screen origin that the image is mapped to.

Specifies a point relative to the screen origin that the overlay image
is mapped to, accepts :class:`simplekml.ScreenXY`
r  )r9   r   rU   s    rN   r  ScreenOverlay.screenxy%  s2     99[!)%-ZDIIk"yy%%rP   c                      XR                   S'   g )Nr  r[   )r@   r  s     rN   r  r  0  r   rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zhPoint relative to the screen about which the overlay is rotated.

Accepts :class:`simplekml.RotationXY`
r  )r9   r	   rU   s    rN   r  ScreenOverlay.rotationxy5  s2     99]#+'1|DIIm$yy''rP   c                      XR                   S'   g )Nr  r[   )r@   r  s     rN   r  r  ?  s     $.		- rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zMThe size of the image for the screen overlay, accepts :class:`simplekml.Size`r  )r9   r
   rU   s    rN   r  ScreenOverlay.sizeD  r  rP   c                      XR                   S'   g )Nr  r[   )r@   r  s     rN   r  r  K  r  rP   r)  r  )r  r  r  r  r  r8   r   r  r!  r  r   r   r  r   r  r	   r  r
   r"  r#  r$  s   @rN   r|  r|    s0   * "& $"&  $	" % % __) ) 	' 	' 
9,  , & & __
8_*  * ( ( 
:.  . " " 
[[
4["  "rP   r|  c                     ^  \ rS rSrSr     SU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  \
" \5      S 5       5       r	\S 5       r\R                  \
" \5      S	 5       5       r\S
 5       r\R                  \
" \5      S 5       5       r\S 5       r\R                  S 5       rSrU =r$ )r  iQ  a  Geographically locate a photograph in Google Earth.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    photo = kml.newphotooverlay(name='PhotoOverlay Test')
    photo.camera = simplekml.Camera(longitude=18.410858, latitude=-33.904446, altitude=50,
                                    altitudemode=simplekml.AltitudeMode.clamptoground)
    photo.point.coords = [(18.410858,-33.90444)]
    photo.style.iconstyle.icon.href = 'http://maps.google.com/mapfiles/kml/shapes/camera.png'
    photo.icon.href = 'http://simplekml.googlecode.com/hg/samples/resources/stadium.jpg'
    photo.viewvolume = simplekml.ViewVolume(-25,25,-15,15,1)
    kml.save("PhotoOverlay.kml")
c                    > [         [        U ]
  " S0 UD6  XR                  S'   X R                  S'   X0R                  S'   X@R                  S'   XPR                  S'   g )Nr  r   r   point_shaper)  )r7   r  r8   r9   )r@   r  
viewvolumeimagepyramidpointr  r+  rM   s          rN   r8   PhotoOverlay.__init__d  sS     	lD*4V4 (		*",		,$0		.!#		("		'rP   c                      U R                   S   $ r  r[   rU   s    rN   r  PhotoOverlay.rotationq  r   rP   c                      XR                   S'   g r  r[   r   s     rN   r  r  v  r   rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zOHow much of the current scene is visible, accepts :class:`simplekml.ViewVolume`r   )r9   r   rU   s    rN   r  PhotoOverlay.viewvolumez  s2     99\"*&0lDIIl#yy&&rP   c                      XR                   S'   g )Nr   r[   )r@   r  s     rN   r  r    s     #-		,rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zCHierarchical set of images, accepts :class:`simplekml.ImagePyramid`r   )r9   r   rU   s    rN   r  PhotoOverlay.imagepyramid  r   rP   c                      XR                   S'   g )Nr   r[   )r@   r  s     rN   r  r    r   rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zRDraws an icon to mark the position of the overlay,accepts :class:`simplekml.Point`r  )r9   r_  rU   s    rN   r  PhotoOverlay.point  s2     99X&"''DIIhyy""rP   c                      XR                   S'   g )Nr  r[   )r@   r  s     rN   r  r         $		(rP   c                      U R                   S   $ )zQShape the photo is drawn, accepts string from :class:`simplekml.Shape` constants.r  r[   rU   s    rN   r  PhotoOverlay.shape  r  rP   c                      XR                   S'   g )Nr  r[   )r@   r  s     rN   r  r#    r  rP   r)  r  )r  r  r  r  r  r8   r   r  r!  r  r   r   r  r   r  r_  r  r"  r#  r$  s   @rN   r  r  Q  s$   $ !%"&$(!!	# % % __) ) ' ' 
:-  - ) ) 
<1  1 # # \\
5\$  $ " " \\# #rP   r  c                      ^  \ rS rSrSr   SU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	\S 5       r
\
R                  \" \5      S	 5       5       r
S
rU =r$ )r  i  a  References a KML file or KMZ archive on a local or remote network.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    netlink = kml.newnetworklink(name="Network Link")
    netlink.link.href = "http://simplekml.googlecode.com/hg/samples/samples.kml"
    netlink.link.viewrefreshmode = simplekml.ViewRefreshMode.onrequest
    kml.save("NetworkLink.kml")
c                    > [         [        U ]
  " S0 UD6  XR                  S'   X R                  S'   X0R                  S'   g )NrefreshVisibility	flyToViewLink_r)  )r7   r  r8   r9   )r@   refreshvisibility	flytoviewlinkr+  rM   s        rN   r8   NetworkLink.__init__  s<     	k4)3F3):		%&!*		+!		'rP   c                      U R                   S   $ )zHow the visibility is affected by a refresh

A value of 0 leaves the visibility of features within the control of
the Google Earth user. Set the value to 1 to reset the visibility of
features each time the NetworkLink is refreshed, accepts int (0 or 1).
r'  r[   rU   s    rN   r*  NetworkLink.refreshvisibility  s     yy,--rP   c                      XR                   S'   g )Nr'  r[   )r@   r*  s     rN   r*  r/    s    ):		%&rP   c                      U R                   S   $ )z`A value of 1 causes Google Earth to fly to the view of the AbstractView.

Accepts int (0 or 1).
r(  r[   rU   s    rN   r+  NetworkLink.flytoview  s     yy%%rP   c                      XR                   S'   g )Nr(  r[   )r@   r+  s     rN   r+  r2    r  rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zIA :class:`simplekml.Link` class instance, accepts :class:`simplekml.Link`r)  r9   r   rU   s    rN   r,  NetworkLink.link  r  rP   c                      XR                   S'   g Nr)  r[   r@   r,  s     rN   r,  r6    r  rP   r)  rm  )r  r  r  r  r  r8   r   r*  r!  r+  r,  r   r   r"  r#  r$  s   @rN   r  r    s     *.!% " . . ; ; & & + + " " 
[[
4["  "rP   r  c                   $  ^  \ rS rSrSr       SU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	\S 5       r
\
R                  \" \5      S	 5       5       r
\S
 5       r\R                  \" \5      S 5       5       r\S 5       r\R                  \" \5      S 5       5       r\S 5       r\R                  \" \5      S 5       5       r\S 5       r\R                  \" \5      S 5       5       rU 4S jrSrU =r$ )r  i  zTA 3D object described in a COLLADA file.

Arguments are the same as the properties.
c                    > [         [        U ]
  " S0 UD6  XR                  S'   X R                  S'   X0R                  S'   X@R                  S'   XPR                  S'   X`R                  S'   XpR                  S'   g )	Nr-  r.  r   r   r   r)  r   r)  )r7   r  r8   r9   )
r@   r2  r3  locationorientationscaler,  resourcemapr+  rM   s
            rN   r8   Model.__init__  sl     	eT#-f-$0		.!'5		#$ (		*#.		- "		'!		'#.		- rP   c                      U R                   S   $ rB  r[   rU   s    rN   r2  Model.altitudemode  rD  rP   c                      XR                   S'   g rF  r[   r  s     rN   r2  rB    r  rP   c                      U R                   S   $ rK  r[   rU   s    rN   r3  Model.gxaltitudemode  rM  rP   c                      XR                   S'   g rO  r[   r  s     rN   r3  rE    r  rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zHPosition of the origin of the model, accepts :class:`simplekml.Location`r   )r9   r   rU   s    rN   r<  Model.location  s2     99Z ($,JDIIj!yy$$rP   c                      XR                   S'   g )Nr   r[   )r@   r<  s     rN   r<  rH    s     !)		*rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zAThe rotation on the model, accepts :class:`simplekml.Orientation`r   )r9   r   rU   s    rN   r=  Model.orientation$  2     99]#+'2}DIIm$yy''rP   c                      XR                   S'   g )Nr   r[   )r@   r=  s     rN   r=  rK  +       $/		- rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )z9"The scale of the model, accepts :class:`simplekml.Scale`r   )r9   r   rU   s    rN   r>  Model.scale0  s2     99W%!&DIIgyy!!rP   c                      XR                   S'   g )Nr   r[   )r@   r>  s     rN   r>  rP  7  s     #		'rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zJ"A :class:`simplekml.Link` class instance, accepts :class:`simplekml.Link`r)  r5  rU   s    rN   r,  
Model.link<  r  rP   c                      XR                   S'   g r8  r[   r9  s     rN   r,  rS  C  r  rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zAUsed for mapping textures, accepts :class:`simplekml.ResourceMap`r   )r9   r   rU   s    rN   r?  Model.resourcemapH  rL  rP   c                      XR                   S'   g )Nr   r[   )r@   r?  s     rN   r?  rV  O  rN  rP   c                 \   > SR                  U R                  [        [        U ]  5       5      $ )Nz<Model id="{0}">{1}</Model>)r  rT   r7   r  r  r[  s    rN   r  Model.__str__T  rl  rP   r)  )NNNNNNN)r  r  r  r  r  r8   r   r2  r!  r3  r<  r   r   r=  r   r>  r   r,  r   r?  r   r  r"  r#  r$  s   @rN   r  r    s    # $!!/$ ) ) 1 1 , , 6 6 % % __
8_)  ) ( ( 
;/  / " " \\
5\#  # " " 
[[
4["  " ( ( 
;/  /\ \rP   r  c                     ^  \ rS rSrSr    SU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	\S 5       r
\
R                  S	 5       r
SS
 jrS rS rS r\S 5       r\R                  \" \5      S 5       5       r\S 5       r\R                  \" \5      S 5       5       rU 4S jrSrU =r$ )r  iX  a  A track describes how an object moves through the world over a given time period.

Arguments are the same as the properties.

Usage::

    # This is a recreation of the example found in the KML Reference:
    # http://code.google.com/apis/kml/documentation/kmlreference.html#gxtrack

    import os
    from simplekml import Kml, Snippet, Types

    # Data for the track
    when = ["2010-05-28T02:02:09Z",
        "2010-05-28T02:02:35Z",
        "2010-05-28T02:02:44Z",
        "2010-05-28T02:02:53Z",
        "2010-05-28T02:02:54Z",
        "2010-05-28T02:02:55Z",
        "2010-05-28T02:02:56Z"]

    coord = [(-122.207881,37.371915,156.000000),
        (-122.205712,37.373288,152.000000),
        (-122.204678,37.373939,147.000000),
        (-122.203572,37.374630,142.199997),
        (-122.203451,37.374706,141.800003),
        (-122.203329,37.374780,141.199997),
        (-122.203207,37.374857,140.199997)]

    cadence = [86, 103, 108, 113, 113, 113, 113]
    heartrate = [181, 177, 175, 173, 173, 173, 173]
    power = [327.0, 177.0, 179.0, 162.0, 166.0, 177.0, 183.0]

    # Create the KML document
    kml = Kml(name="Tracks", open=1)
    doc = kml.newdocument(name='GPS device', snippet=Snippet('Created Wed Jun 2 15:33:39 2010'))
    doc.lookat.gxtimespan.begin = '2010-05-28T02:02:09Z'
    doc.lookat.gxtimespan.end = '2010-05-28T02:02:56Z'
    doc.lookat.longitude = -122.205544
    doc.lookat.latitude = 37.373386
    doc.lookat.range = 1300.000000

    # Create a folder
    fol = doc.newfolder(name='Tracks')

    # Create a schema for extended data: heart rate, cadence and power
    schema = kml.newschema()
    schema.newgxsimplearrayfield(name='heartrate', type=Types.int, displayname='Heart Rate')
    schema.newgxsimplearrayfield(name='cadence', type=Types.int, displayname='Cadence')
    schema.newgxsimplearrayfield(name='power', type=Types.float, displayname='Power')

    # Create a new track in the folder
    trk = fol.newgxtrack(name='2010-05-28T01:16:35.000Z')

    # Apply the above schema to this track
    trk.extendeddata.schemadata.schemaurl = schema.id

    # Add all the information to the track
    trk.newwhen(when) # Each item in the give nlist will become a new <when> tag
    trk.newgxcoord(coord) # Ditto
    trk.extendeddata.schemadata.newgxsimplearraydata('heartrate', heartrate) # Ditto
    trk.extendeddata.schemadata.newgxsimplearraydata('cadence', cadence) # Ditto
    trk.extendeddata.schemadata.newgxsimplearraydata('power', power) # Ditto

    # Styling
    trk.stylemap.normalstyle.iconstyle.icon.href = 'http://earth.google.com/images/kml-icons/track-directional/track-0.png'
    trk.stylemap.normalstyle.linestyle.color = '99ffac59'
    trk.stylemap.normalstyle.linestyle.width = 6
    trk.stylemap.highlightstyle.iconstyle.icon.href = 'http://earth.google.com/images/kml-icons/track-directional/track-0.png'
    trk.stylemap.highlightstyle.iconstyle.scale = 1.2
    trk.stylemap.highlightstyle.linestyle.color = '99ffac59'
    trk.stylemap.highlightstyle.linestyle.width = 8

    # Save the kml to file
    kml.save("GxTrack.kml")
c                    > [         [        U ]
  " S0 UD6  XR                  S'   X R                  S'   X0R                  S'   S U R                  S'   X@R                  S'   / U l        / U l        / U l        g )Nr+  r-  r.  r   Model_r)  )r7   r  r8   r9   whensgxcoordsgxangles)r@   r+  r2  r3  modelr+  rM   s         rN   r8   GxTrack.__init__  sk     	gt%//&		)$0		.!'5		#$$(		.!#		(
rP   c                      U R                   S   $ )z8Connect the GxTrack to the ground, accepts int (0 or 1).r+  r[   rU   s    rN   r+  GxTrack.extrude  rz   rP   c                      XR                   S'   g r:  r[   r;  s     rN   r+  rc    r}   rP   c                      U R                   S   $ )zoSpecifies how the altitude for the Camera is interpreted.

Accepts :class:`simplekml.AltitudeMode` constants.

r-  r[   rU   s    rN   r2  GxTrack.altitudemode  s     yy((rP   c                      XR                   S'   g rF  r[   r  s     rN   r2  rf    r  rP   c                      U R                   S   $ rK  r[   rU   s    rN   r3  GxTrack.gxaltitudemode  rM  rP   c                      XR                   S'   g rO  r[   r  s     rN   r3  ri    r  rP   c                 r    U R                  U5        U R                  U5        Ub  U R                  U5        gg)zCreates a new gxcoord, when time and angle (if provided).

This is a convenience method for calling newwhen, newgxcoord and
newangle. when and gxcoord are required, angle is optional.
N)
newgxcoordnewwhen
newgxangle)r@   gxcoordwhenangles       rN   newdataGxTrack.newdata  s3     	 TOOE" rP   c                     [        U5      [        :X  a  U =R                  U-  sl        gU R                  R                  U5        g)zCreates a new when time, accepts string or list of string.

If one string is given a single when entry is created, but if a list of
strings is given, a when entry is created for each string in the list.
N)r  r   r]  r  )r@   rp  s     rN   rm  GxTrack.newwhen  s0     :JJ$JJJd#rP   c                 *   [        U5      [        :X  aA  U H:  n[        5       nUR                  U/5        U R                  R                  U5        M<     g[        5       nUR                  [        U5      5        U R                  R                  U5        g)ziCreates a gx:coord, accepts list of one tuples.

A gxcoord entry is created for every tuple in the list.
N)r  r   r   r  r^  r  )r@   coordcrdr!  s       rN   rl  GxTrack.newgxcoord  sp    
 ;$$%%se,$$V, 
 !]F!!$u+.MM  (rP   c                     [        U5      [        :X  a  U =R                  U-  sl        gU R                  R                  U5        g)zCreates a new gx:angle, accepts float or list of floats.

If one float is given a single angle entry is created, but if a list of
floats is given, a angle entry is created for each float in the list.
N)r  r   r_  r  )r@   rq  s     rN   rn  GxTrack.newgxangle  s0     ;$MMU"MMM  'rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ r   r   rU   s    rN   rK   GxTrack.extendeddata		  r   rP   c                      XR                   S'   g r   r[   r   s     rN   rK   r}  	  r   rP   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zVA model to use on the track, accepts :class:`simplekml.Model`

*New in version 1.2.1*
r\  )r9   r  rU   s    rN   r`  GxTrack.model	  s2     99X&"''DIIhyy""rP   c                      XR                   S'   g )Nr\  r[   )r@   r`  s     rN   r`  r  	  r!  rP   c           	      <  > S/nU R                    H#  nUR                  SR                  U5      5        M%     U R                   HB  nSR	                  [        [        U5      5      nUR                  SR                  U5      5        MD     U R                   HA  nUR                  SR                  UR                  5       R                  SS5      5      5        MC     UR                  [        [        U ]#  5       5        UR                  S5        SR	                  U5      $ )	Nz
<gx:Track>z<when>{0}</when> z<gx:angles>{0}</gx:angles>z<gx:coord>{0}</gx:coord>,z</gx:Track>r  )r]  r  r  r_  r  mapr  r^  r  replacer7   r  )r@   r  rp  rq  	angle_strro  rM   s         rN   r  GxTrack.__str__$	  s    nJJDJJ)0067 ]]ES%1IJJ3::9EF # }}GJJ1889J9R9RSVX[9\]^ %

5$/12

=!wws|rP   )r_  r^  r]  )NNNNr   )r  r  r  r  r  r8   r   r+  r!  r2  r3  rr  rm  rl  rn  rK   r   r   r`  r  r  r"  r#  r$  s   @rN   r  r  X  s6   K\ " $	  $ $ ^^' ' ) ) 1 1 , , 6 6	#	$)	( ) ) 
<1  1 # # \\
5\$  $ rP   r  c                   D   ^  \ rS rSrSr SU 4S jjrS rU 4S jrSrU =r	$ )r  i2	  a4  A container for grouping gx:tracks.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    multitrack = kml.newgxmultitrack()
    track1 = multitrack.newgxtrack(name="track1")
    track2 = multitrack.newgxtrack(name="track2")
    kml.save("GxMultiTrack.kml")
c                 j   > [         [        U ]
  " S0 UD6  X R                  S'   [	        U5      U l        g )Nzgx:interpolater)  )r7   r  r8   r9   r   tracks)r@   r  gxinterpolater+  rM   s       rN   r8   GxMultiTrack.__init__A	  s-    lD*4V4&3		"#6lrP   c                 h    U R                   R                  [        S0 UD65        U R                   S   $ )a2  Creates a new :class:`simplekml.GxTrack` and attaches it to this mutlitrack.

Returns an instance of :class:`simplekml.GxTrack` class.

Args:
  * Same as :class:`simplekml.GxTrack`, except arguments that are not applicable in a multitrack grouping
    will be ignored, such as name, visibility, open, etc.
r)  )r  r  r  r`  s     rN   r  GxMultiTrack.newgxtrackG	  s,     	7,V,-{{2rP   c                   > SR                  U R                  5      [        [        U ]  5       /nU R
                   H"  nUR                  UR	                  5       5        M$     UR                  S5        SR                  U5      $ )Nz<gx:MultiTrack id="{0}">z</gx:MultiTrack>r  )r  rT   r7   r  r  r  r  r  )r@   r  trackrM   s      rN   r  GxMultiTrack.__str__S	  sd    )00:\4024[[EJJu}}' !

%&wws|rP   )r  )r)  N)
r  r  r  r  r  r8   r  r  r"  r#  r$  s   @rN   r  r  2	  s!     +/#
 rP   r  N)Cr  simplekml.abstractviewr   r   simplekml.baser   r   r   r   r	   r
   r   simplekml.coordinatesr   simplekml.iconr   r   simplekml.modelr   r   r   r   simplekml.overlayr   r   simplekml.regionr   r   r   simplekml.schemar   r   simplekml.styleselectorr   r   simplekml.substyler   r   r   r   r    r!   simplekml.timeprimitiver"   r#   simplekml.tourr$   r&   r&  r  r  r9  r/  r  r)  r_  rf  rl  rq  r  rw  r|  r  r  r  r  r  r)  rP   rN   <module>r     sc  $ 2 Y Y Y - % E E 6 < < 1 3 c c 7 !Ng NbD2 D2N2y 28/Y /$Xw Xv& &4#8H #8LUk UkpU\M U\pmk mk`zbh zbzsH sl-"g -"``2G `2Ff"G f"RT#7 T#n<"' <"~n\H n\bWh Wt'8 'rP   