
    \iU/                         S r SSKJrJr   " S S\5      r " S S\5      r " S S\5      r " S	 S
\5      r " S S\5      r " S S\5      r	 " S S\5      r
 " S S\5      rg)a  
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/>.

    )Kmlablecheckc                      ^  \ 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
 rSrU =r$ )SimpleField   zUCustom field, forms part of a schema.

The arguments are the same as the properties.
c                 ~   > [         [        U ]  5         XR                  S'   X R                  S'   X0R                  S'   g )NnametypedisplayName)superr   __init___kmlselfr	   r
   displayname	__class__s       S/var/www/html/kml_chatgpt/mouzaenv/lib/python3.13/site-packages/simplekml/schema.pyr   SimpleField.__init__   s4    k4)+ 		& 		&#.		-     c                      U R                   S   $ zName of field, accepts string.r	   r   r   s    r   r	   SimpleField.name!        yy  r   c                      XR                   S'   g Nr	   r   r   r	   s     r   r	   r   &        		&r   c                      U R                   S   $ )zFType of field, accepts string from :class:`simplekml.Types` constants.r
   r   r   s    r   r
   SimpleField.type*   r   r   c                      XR                   S'   g )Nr
   r   )r   r
   s     r   r
   r!   /   r   r   c                      U R                   S   $ )zCPretty name of field that is shown in google earth, accepts string.r   r   r   s    r   r   SimpleField.displayname3        yy''r   c                      XR                   S'   g Nr   r   r   r   s     r   r   r$   8       #.		- r   c                 R   SR                  U R                  [        R                  " U R                  5      5      /nU R
                  b>  UR                  SR                  [        R                  " U R
                  5      5      5        UR                  S5        SR                  U5      $ )Nz#<SimpleField type="{0}" name="{1}"><displayName>{0}</displayName>z</SimpleField> )formatr
   r   _chrconvertr	   r   appendjoinr   bufs     r   __str__SimpleField.__str__<   s~    5<<TYYH[H[\`\e\eHfgh'JJ8??@S@STXTdTd@efg

#$wws|r    NstringN)__name__
__module____qualname____firstlineno____doc__r   propertyr	   setterr
   r   r3   __static_attributes____classcell__r   s   @r   r   r      s    
/ ! ! 
[[! ! ! ! 
[[! ! ( ( / / r   r   c                   6   ^  \ rS rSrSrSU 4S jjrS rSrU =r$ )GxSimpleArrayFieldD   zCustom array field for gx:track, forms part of a schema.

Args:
  * *same as properties*
  * *all other args same as* :class:`simplekml.SimpleField`
c                 .   > [         [        U ]  XU5        g N)r   rC   r   r   s       r   r   GxSimpleArrayField.__init__L   s     $0[Ir   c                    SR                  U R                  U R                  5      /nU R                  b*  UR	                  SR                  U R                  5      5        UR	                  S5        SR                  U5      $ )Nz+<gx:SimpleArrayField type="{0}" name="{1}">r+   z</gx:SimpleArrayField>r,   )r-   r
   r	   r   r/   r0   r1   s     r   r3   GxSimpleArrayField.__str__O   sk    <CCDIIDHIIO P'JJ7>>t?O?OPQ

+,wws|r   r5   r6   )	r8   r9   r:   r;   r<   r   r3   r?   r@   rA   s   @r   rC   rC   D   s    J r   rC   c                      ^  \ rS rSrSrU 4S jr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	S r
S	rU =r$ )

SimpleDataX   zAData of a schema.

The arguments are the same as the properties.
c                 b   > [         [        U ]  5         XR                  S'   X R                  S'   g )Nr	   value)r   rK   r   r   )r   r	   rN   r   s      r   r   SimpleData.__init__^   s(    j$(* 		&"		'r   c                      U R                   S   $ r   r   r   s    r   r	   SimpleData.namec   r   r   c                      XR                   S'   g r   r   r   s     r   r	   rQ   h   r   r   c                      U R                   S   $ )z-Value of field, accepts int, float or string.rN   r   r   s    r   rN   SimpleData.valuel        yy!!r   c                      XR                   S'   g NrN   r   r   rN   s     r   rN   rT   q       "		'r   c                 v    SR                  [        R                  " U R                  5      U R                  5      $ )Nz'<SimpleData name="{0}">{1}</SimpleData>)r-   r   r.   r	   rN   r   s    r   r3   SimpleData.__str__u   s.    9@@ATATUYU^U^A_aeakakllr   r5   )r8   r9   r:   r;   r<   r   r=   r	   r>   rN   r3   r?   r@   rA   s   @r   rK   rK   X   sq    
#
 ! ! 
[[! ! " " \\# #m mr   rK   c                   p   ^  \ rS rSrSrS	U 4S jjr\S 5       r\R                  S 5       rS r	S r
SrU =r$ )
GxSimpleArrayDatay   z`Data of a :class:`simplekml.GxSimpleArrayField`.

The arguments are the same as the properties.
c                    > [         [        U ]  5         XR                  S'   / U l        Ub  U =R                  U-  sl        g g r   )r   r]   r   r   values)r   r	   r`   r   s      r   r   GxSimpleArrayData.__init__   s=    /1 		&KK6!K r   c                      U R                   S   $ r   r   r   s    r   r	   GxSimpleArrayData.name   r   r   c                      XR                   S'   g r   r   r   s     r   r	   rc      r   r   c                 :    U R                   R                  U5        g)z'Adds a value to the gxsimpledarraydata.N)r`   r/   rX   s     r   newvalueGxSimpleArrayData.newvalue   s    5!r   c                    SR                  [        R                  " U R                  5      5      /nU R                   H#  nUR                  SR                  U5      5        M%     UR                  S5        SR                  U5      $ )Nz<gx:SimpleArrayData name="{0}">z<gx:value>{0}</gx:value>z</gx:SimpleArrayData>r,   )r-   r   r.   r	   r`   r/   r0   )r   r2   rN   s      r   r3   GxSimpleArrayData.__str__   se    1889L9LTYY9WXY[[EJJ188?@ !

*+wws|r   )r`   rF   )r8   r9   r:   r;   r<   r   r=   r	   r>   rf   r3   r?   r@   rA   s   @r   r]   r]   y   sH    
" ! ! 
[[! !" r   r]   c                      ^  \ 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S jr
SS jrS	 rS
rU =r$ )Schema   zrCustom KML schema that is used to add custom data to KML Features.

The arguments are the same as the properties.
c                 b   > [         [        U ]  5         XR                  S'   / U l        / U l        g r   )r   rk   r   r   simplefieldsgxsimplearrayfields)r   r	   r   s     r   r   Schema.__init__   s,    fd$& 		&#% r   c                     U R                   $ )zUnique id of the schema.)_idr   s    r   id	Schema.id   s     xxr   c                      U R                   S   $ )zName of schema, accepts string.r	   r   r   s    r   r	   Schema.name   r   r   c                      XR                   S'   g r   r   r   s     r   r	   rv      r   r   c                 j    U R                   R                  [        XU5      5        U R                   S   $ )a:  Creates a new :class:`simplekml.SimpleField` and attaches it to this schema.

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

Args:
  * name: string name of simplefield (required)
  * type: string type of field (required)
  * displayname: string for pretty name that will be displayed (default None)
)rn   r/   r   r   r	   r
   r   s       r   newsimplefieldSchema.newsimplefield   s0     	  T!EF  $$r   c                 j    U R                   R                  [        XU5      5        U R                   S   $ )aH  Creates a new :class:`simplekml.GxSimpleArrayField` and attaches it to this schema.

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

Args:
  * name: string name of simplefield (required)
  * type: string type of field (required)
  * displayname: string for pretty name that will be displayed (default None)
ry   )ro   r/   rC   rz   s       r   newgxsimplearrayfieldSchema.newgxsimplearrayfield   s1     	  ''(:4{(ST''++r   c                    / nU R                   bJ  UR                  SR                  [        R                  " U R                   5      U R
                  5      5        O*UR                  SR                  U R
                  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5        SR                  U5      $ )Nz<Schema name="{0}" id="{1}">z<Schema id="{0}">z	</Schema>r,   )
r	   r/   r-   r   r.   rr   rn   r3   ro   r0   r   r2   fields      r   r3   Schema.__str__   s    99 JJ6==g>Q>QRVR[R[>\^b^f^fghJJ*11$((;<&&EJJu}}' '--EJJu}}' .

;wws|r   )ro   rn   rF   )r8   r9   r:   r;   r<   r   r=   rs   r	   r>   r{   r~   r3   r?   r@   rA   s   @r   rk   rk      sa    
&   ! ! 
[[! !%, r   rk   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
 rSrU =r$ )Data   znData of extended data used to add custom data to KML Features.

The arguments are the same as the properties.
c                 ~   > [         [        U ]  5         XR                  S'   X R                  S'   X0R                  S'   g )Nr	   rN   r   )r   r   r   r   )r   r	   rN   r   r   s       r   r   Data.__init__   s4    dD"$ 		&"		'#.		- r   c                      U R                   S   $ )zData name, accepts string.r	   r   r   s    r   r	   	Data.name   r   r   c                      XR                   S'   g r   r   r   s     r   r	   r      r   r   c                      U R                   S   $ )zData value, accepts string.rN   r   r   s    r   rN   
Data.value   rU   r   c                      XR                   S'   g rW   r   rX   s     r   rN   r      rY   r   c                      U R                   S   $ )z7The name that is displayed to the user, accepts string.r   r   r   s    r   r   Data.displayname   r%   r   c                      XR                   S'   g r'   r   r(   s     r   r   r     r)   r   c                    SR                  [        R                  " U R                  5      5      /nU R                  S   b-  UR                  SR                  U R                  S   5      5        U R                  S   bA  UR                  SR                  [        R                  " U R                  S   5      5      5        UR                  S5        SR                  U5      $ )Nz<Data name="{0}">rN   z<value>{0}</value>r   r+   z</Data>r,   )r-   r   r.   r	   r   r/   r0   r1   s     r   r3   Data.__str__  s    #**7+>+>tyy+IJK99W)JJ+22499W3EFG99]#/JJ8??@S@STXT]T]^kTl@mno

9wws|r   r5   )NNN)r8   r9   r:   r;   r<   r   r=   r	   r>   rN   r   r3   r?   r@   rA   s   @r   r   r      s    
/ ! ! 
[[! ! " " \\# # ( ( / / r   r   c                   v   ^  \ rS rSrSrS
U 4S jjr\S 5       r\R                  S 5       rS r	S r
S rS	rU =r$ )
SchemaDatai  qData of a schema that is used to add custom data to KML Features.

The arguments are the same as the properties.
c                 b   > [         [        U ]  5         / U l        / U l        XR
                  S'   g N	schemaUrl)r   r   r   simpledatasgxsimplearraydatasr   )r   	schemaurlr   s     r   r   SchemaData.__init__  s,    j$(*"$!*		+r   c                 `    U R                   S   b  SR                  U R                   S   5      $ g)zSchema url, accepts string.r   Nz#{0})r   r-   r   s    r   r   SchemaData.schemaurl  s.     99[!-==;!788r   c                      XR                   S'   g r   r   )r   r   s     r   r   r   %  s    !*		+r   c                 h    U R                   R                  [        X5      5        U R                   S   $ )a  
Creates a new :class:`simplekml.SimpleData` and attaches it to this schemadata.

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

Args:
  * name: string name of simplefield (required)
  * value: int, float or string for value of field (required)
ry   )r   r/   rK   r   r	   rN   s      r   newsimpledataSchemaData.newsimpledata)  s.     	
4 78##r   c                 h    U R                   R                  [        X5      5        U R                   S   $ )a  Creates a new :class:`simplekml.GxSimpleArrayData` and attaches it to this schemadata.

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

Args:
  * name: string name of simplefield (required)
  * value: int, float or string for value of field (required)
ry   )r   r/   r]   r   s      r   newgxsimplearraydataSchemaData.newgxsimplearraydata6  s/     	&&'8'EF&&r**r   c                 F   SR                  U R                  5      /n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5        SR                  U5      $ )Nz<SchemaData schemaUrl="{0}">z</SchemaData>r,   )r-   r   r   r/   r3   r   r0   r   s      r   r3   SchemaData.__str__B  sw    -44T^^DE%%EJJu}}' &,,EJJu}}' -

?#wws|r   )r   r   rF   )r8   r9   r:   r;   r<   r   r=   r   r>   r   r   r3   r?   r@   rA   s   @r   r   r     sO    
+   + +$
+ r   r   c                      ^  \ rS rSrSrU 4S jr\S 5       r\R                  \	" \
5      S 5       5       rS	S jrS rSrU =r$ )
ExtendedDataiM  r   c                 V   > [         [        U ]  5         S U R                  S'   / U l        g NschemaData_)r   r   r   r   datas)r   r   s    r   r   ExtendedData.__init__S  s%    lD*,#'		- 
r   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zBExtra data for the feature, accepts :class:`simplekml.SchemaData`.r   )r   r   r   s    r   
schemadataExtendedData.schemadataX  s2     99]#+'1|DIIm$yy''r   c                      XR                   S'   g r   r   )r   r   s     r   r   r   _  s     $.		- r   c                 j    U R                   R                  [        XU5      5        U R                   S   $ )aD  Creates a new :class:`simplekml.Data` and attaches it to this schemadata.

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

Args:
  * name: string name of simplefield (required)
  * value: int, float or string for value of field (required)
  * displayname: string for pretty name that will be displayed (default None)
ry   )r   r/   r   )r   r	   rN   r   s       r   newdataExtendedData.newdatad  s+     	

$tK89zz"~r   c                    / nU R                    H"  nUR                  UR                  5       5        M$     U R                  S   b,  UR                  U R                  S   R                  5       5        SR	                  U5      $ )Nr   r,   )r   r/   r3   r   r0   )r   r2   datas      r   r3   ExtendedData.__str__q  sb    JJDJJt||~& 99]#/JJtyy/779:wws|r   )r   rF   )r8   r9   r:   r;   r<   r   r=   r   r>   r   r   r   r3   r?   r@   rA   s   @r   r   r   M  sW    

 ( ( 
:.  . r   r   N)r<   simplekml.baser   r   r   rC   rK   r]   rk   r   r   r   r5   r   r   <module>r      sw   $ *,' ,^ (m mB F?W ?F.7 .d8 8x*7 *r   