/usr/local/lib/python3.9/site-packages/django/contrib/gis/serializers/__pycache__
a Ӱ�h� � @ sR d dl Z d dlmZmZ d dlmZ d dlmZ G dd� de�ZG dd� d�Z dS ) � N)�CoordTransform�SpatialReference��SerializerDoesNotExist)� Serializerc sP e Zd ZdZ� fdd�Zdd� Zdd� Z� fdd �Zd d� Z� fdd �Z � Z S )r z< Convert a queryset to GeoJSON, http://geojson.org/ c sp t � �� | j�dd �| _| j�dd �| _| j�dd�| _| jd url| jd url| j| jvrlg | j�| j�| _d S )N�geometry_field�id_field�sridi� )�super� _init_optionsZjson_kwargs�popr r r �selected_fields��self�� __class__� �P/usr/local/lib/python3.9/site-packages/django/contrib/gis/serializers/geojson.pyr s �� �zSerializer._init_optionsc C s$ | � � i | _| j�d| j � d S )Nzg{"type": "FeatureCollection", "crs": {"type": "name", "properties": {"name": "EPSG:%d"}}, "features": [)r �_cts�stream�writer r r r r �start_serialization s ��zSerializer.start_serializationc C s | j �d� d S )Nz]})r r r r r r �end_serialization"