U
    Ha                     @   s   G d d de Zdd ZdS )c                   @   s*   e Zd ZdZdddZdd ZeeZdS )SimpleWebFeaturezB
    A simple, Atom-ish, single geometry (WGS84) GIS feature.
    Nc                 C   s   || _ || _|||d| _dS )a>  
        Initialises a SimpleWebFeature from the parameters provided.

        :param id: Identifier assigned to the object.
        :type id: int, str
        :param geometry: The geometry on which the object is based.
        :type geometry: Geometry
        :param title: Name of the object
        :type title: str
        :param summary: Short summary associated with the object.
        :type summary: str
        :param link: Link associated with the object.
        :type link: str
        :return: A SimpleWebFeature object
        :rtype: SimpleWebFeature
        titlesummarylinkN)idgeometry
properties)selfr   r   r   r   r    r
   4/tmp/pip-unpacked-wheel-kunv6awc/geojson/examples.py__init__   s    zSimpleWebFeature.__init__c                 C   s   d| j | j| jdS )NZFeature)typer   r   r   )r   r   r   )r	   r
   r
   r   as_dict   s
    zSimpleWebFeature.as_dict)NNNNN)__name__
__module____qualname____doc__r   r   propertyZ__geo_interface__r
   r
   r
   r   r      s     
r   c              	   C   s|   z^| d }| d }| d }t t|t|d|dg d|d|dt|d	d
W S  ttfk
rv   Y nX | S )ah  
    Create an instance of SimpleWebFeature from a dict, o. If o does not
    match a Python feature object, simply return o. This function serves as a
    json decoder hook. See coding.load().

    :param o: A dict to create the SimpleWebFeature from.
    :type o: dict
    :return: A SimpleWebFeature from the dict provided.
    :rtype: SimpleWebFeature
    r   r   r   r   coordinates)r   r   r   r   r   r   )r   strgetKeyError	TypeError)or   gpr
   r
   r   create_simple_web_feature/   s    
r   N)objectr   r   r
   r
   r
   r   <module>   s   -