o
    …>aÄ  ã                   @   sl  d dl ZddlT dd„ Zdd„ Zdd	„ Zee_ee_ee	_d
d„ Z
dd„ Zdd„ Zdd„ e_dd„ e_e
ddgƒe_dd„ e_e
ddgƒe_dd„ e_dd„ e_dd„ e_e
ddgƒe_dd„ e_ee_dd„ e_e
g d¢ƒe_d d„ e_ee_d!d„ e_e
g d"¢ƒe_e
g d#¢ƒe_d$d„ e_e
g d%¢ƒe_d&d„ e_e
g d'¢ƒe	_d(d„ e	_e
g d)¢ƒe_d*d„ e_dS )+é    Né   )Ú*c                 K   ó   t jjjdd| i|¤ŽS )zÑ Create a mutable node replacing the properties given in the
        named parameters. Note that this function only creates a shallow
        copy which is still bound to the scope of the original object.
    ÚbaseN© )ÚosmiumÚosmÚmutableÚNode)ÚnodeÚargsr   r   ú5/usr/lib/python3/dist-packages/osmium/osm/__init__.pyÚcreate_mutable_node   ó   r   c                 K   r   )zÐ Create a mutable way replacing the properties given in the
        named parameters. Note that this function only creates a shallow
        copy which is still bound to the scope of the original object.
    r   Nr   )r   r   r	   ÚWay)Úwayr   r   r   r   Úcreate_mutable_way   r   r   c                 K   r   )zÕ Create a mutable relation replacing the properties given in the
        named parameters. Note that this function only creates a shallow
        copy which is still bound to the scope of the original object.
    r   Nr   )r   r   r	   ÚRelation)Úrelr   r   r   r   Úcreate_mutable_relation   r   r   c                    s(   dd  dd„ | D ƒ¡ d ‰ ‡ fdd„S )Nzosmium.osm.{0}(ú, c                 S   s   g | ]}d   |¡‘qS )z{0}={{1.{0}!r}}©Úformat)Ú.0Úxr   r   r   Ú
<listcomp>   s    z_make_repr.<locals>.<listcomp>ú)c                    s   ˆ   | jj| ¡S )N)r   Ú	__class__Ú__name__©Úo©Ú
fmt_stringr   r   Ú<lambda>"   ó    z_make_repr.<locals>.<lambda>©Újoin)Ú	attr_listr   r!   r   Ú
_make_repr   s   ÿþr(   c                 C   s   d  | jjd tt| ƒ¡¡S )Nzosmium.osm.{}([{}])r   )r   r   r   r&   ÚmapÚrepr)Úobjr   r   r   Ú
_list_repr$   s   
ÿr,   c                 C   s0   d  tt| ƒ¡}t|ƒdkr|d d… d }|S )Nú,é2   é/   z...)r&   r)   ÚstrÚlen)r+   Úobjectsr   r   r   Ú_list_elipse(   s   r3   c                 C   s   |   ¡ r	d | ¡S dS )Nz)osmium.osm.Location(x={0.x!r}, y={0.y!r})zosmium.osm.Location())Úvalidr   ©Úlr   r   r   r#   .   s   ÿr#   c                 C   s    |   ¡ rd |  ¡ |  ¡ ¡S dS )Nz	{:f}/{:f}Úinvalid)r4   r   Úlon_without_checkÚlat_without_checkr5   r   r   r   r#   0   s
   þÿÚbottom_leftÚ	top_rightc                 C   ó
   d  | ¡S )Nz#({0.bottom_left!s} {0.top_right!s})r   )Úbr   r   r   r#   5   ó   
 ÚkÚvc                 C   r<   )Nz{0.k}={0.v}r   ©Útr   r   r   r#   8   r>   c                 C   s   dd  dd„ | D ƒ¡ S )Nzosmium.osm.TagList({%s})r   c                 S   s   g | ]
}d |j |jf ‘qS )z%r: %r)r?   r@   )r   Úir   r   r   r   ;   s    z<lambda>.<locals>.<listcomp>r%   rA   r   r   r   r#   :   s    ÿc                 C   ó   dt | ƒ d S )Nú{ú}©r3   rA   r   r   r   r#   <   r$   ÚrefÚlocationc                 C   s   | j  ¡ r
d | ¡S t| jƒS )Nz{0.ref:d}@{0.location!s})rI   r4   r   r0   rH   ©Únr   r   r   r#   ?   s   ÿ
c                 C   rD   ©Nú[ú]rG   r   r   r   r   r#   C   r$   )rH   ÚtypeÚrolec                 C   s   | j rd | ¡S d | ¡S )Nz{0.type}{0.ref:d}@{0.role}z{0.type}{0.ref:d})rP   r   )Úrr   r   r   r#   F   s   ÿc                 C   rD   rL   rG   r   r   r   r   r#   J   r$   )	ÚidÚdeletedÚvisibleÚversionÚ	changesetÚuidÚ	timestampÚuserÚtags)
rR   rS   rT   rU   rV   rW   rX   rY   rZ   rI   c                 C   r<   )Nz2n{0.id:d}: location={0.location!s} tags={0.tags!s}r   rJ   r   r   r   r#   Q   ó    )
rR   rS   rT   rU   rV   rW   rX   rY   rZ   Únodesc                 C   r<   )Nz,w{0.id:d}: nodes={0.nodes!s} tags={0.tags!s}r   r   r   r   r   r#   V   r[   )
rR   rS   rT   rU   rV   rW   rX   rY   rZ   Úmembersc                 C   r<   )Nz1r{0.id:d}: members={0.members!s}, tags={0.tags!s}r   r   r   r   r   r#   [   r[   )	rR   rW   Ú
created_atÚ	closed_atÚopenÚnum_changesÚboundsrY   rZ   c                 C   r<   )NzJc{0.id:d}: closed_at={0.closed_at!s}, bounds={0.bounds!s}, tags={0.tags!s}r   r   r   r   r   r#   `   r[   )Úosmium.osm.mutabler   Ú_osmr   r   r   r
   Úreplacer   r   r(   r,   r3   ÚLocationÚ__repr__Ú__str__ÚBoxÚTagÚTagListÚNodeRefÚNodeRefListÚRelationMemberÚRelationMemberListÚ	OSMObjectÚ	Changesetr   r   r   r   Ú<module>   sH    












