Ë
    ¹ûàgsq  ã                   ó:  — d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZmZmZmZmZmZ ddlmZmZmZmZmZmZmZ dd	lmZmZ dd
lmZmZmZm Z  ddl!m"Z"  G d„ de#«      Z$ G d„ de$«      Z% G d„ de$«      Z& G d„ de$«      Z' G d„ de$«      Z( G d„ d«      Z)y)a  
 The LayerMapping class provides a way to map the contents of OGR
 vector files (e.g. SHP files) to Geographic-enabled Django models.

 For more information, please consult the GeoDjango documentation:
   https://docs.djangoproject.com/en/dev/ref/contrib/gis/layermapping/
é    N)ÚDecimal)ÚInvalidOperation)ÚPath)ÚGeometryField)ÚCoordTransformÚ
DataSourceÚGDALExceptionÚOGRGeometryÚOGRGeomTypeÚSpatialReference)ÚOFTDateÚOFTDateTimeÚ
OFTIntegerÚOFTInteger64ÚOFTRealÚ	OFTStringÚOFTTime)ÚFieldDoesNotExistÚObjectDoesNotExist)ÚconnectionsÚmodelsÚrouterÚtransaction)Ú	force_strc                   ó   — e Zd Zy)ÚLayerMapErrorN©Ú__name__Ú
__module__Ú__qualname__© ó    úc/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/django/contrib/gis/utils/layermapping.pyr   r   &   ó   „ Ør"   r   c                   ó   — e Zd Zy)ÚInvalidStringNr   r!   r"   r#   r&   r&   *   r$   r"   r&   c                   ó   — e Zd Zy)ÚInvalidDecimalNr   r!   r"   r#   r(   r(   .   r$   r"   r(   c                   ó   — e Zd Zy)ÚInvalidIntegerNr   r!   r"   r#   r*   r*   2   r$   r"   r*   c                   ó   — e Zd Zy)ÚMissingForeignKeyNr   r!   r"   r#   r,   r,   6   r$   r"   r,   c                   ó°  — e Zd ZdZd ed«      d ed«      d ed«       ed«      j
                   ed	«       ed
«      j
                   ed«       ed«      j
                   ed«      iZi ej                  e	“ej                  e“ej                  e	“ej                  e	eef“ej                   e	eef“ej"                  e	ef“ej$                  e“ej(                  e“ej,                  e“ej.                  e“ej2                  e	ef“ej4                  e“ej6                  e“ej8                  e“ej:                  e“ej<                  e“ej>                  e	eef“ej@                  e	eefejB                  e	eefejD                  e	eefejF                  e	eefi¥Z$	 	 	 	 	 	 	 dd„Z%d„ Z&d„ Z'd„ Z(d„ Z)d„ Z*d„ Z+d„ Z,d„ Z-d„ Z.d„ Z/d„ Z0d„ Z1ddddde2jf                  dfd„Z4y)ÚLayerMappingz1A class that maps OGR Layers to GeoDjango Models.é   Ú
MultiPointé   ÚMultiLineStringé   ÚMultiPolygonÚPoint25DÚMultiPoint25DÚLineString25DÚMultiLineString25DÚ
Polygon25DÚMultiPolygon25DNc                 ó  — t        |t        t        f«      rt        ||¬«      | _        n|| _        | j                  |   | _        |
�|
nt        j                  |«      | _        t        | j                     }|j                  | _        || _        || _        | j                  «        |j                  j                   r| j#                  «       | _        nd}|r,| j'                  |«      | _        | j+                  «       | _        n|| _        |rddlm}  ||«       || _        nd| _        |	r| j5                  |	«       d}|	| _        nd| _        || _        |dk(  rd| _        y|dk(  rt<        j>                  | _        ytA        d|z  «      ‚)	a  
        A LayerMapping object is initialized using the given Model (not an instance),
        a DataSource (or string path to an OGR-supported data file), and a mapping
        dictionary.  See the module level docstring for more details and keyword
        argument usage.
        )ÚencodingNFr   )ÚlookupÚ
autocommitÚcommit_on_successz!Unrecognized transaction mode: %s)!Ú
isinstanceÚstrr   r   ÚdsÚlayerr   Údb_for_writeÚusingr   ÚopsÚspatial_backendÚmappingÚmodelÚcheck_layerÚfeaturesÚsupports_transformÚgeometry_fieldÚ	geo_fieldÚ	check_srsÚ
source_srsÚcoord_transformÚ	transformÚcodecsr=   r<   Úcheck_uniqueÚuniqueÚtransaction_modeÚtransaction_decoratorr   Úatomicr   )ÚselfrI   ÚdatarH   rC   rP   r<   rV   rR   rU   rE   Ú
connectionr=   s                r#   Ú__init__zLayerMapping.__init__`   sa  € ô( �dœS¤$˜KÔ(Ü  °Ô9ˆD�GàˆDŒGØ—W‘W˜U‘^ˆŒ
à#Ð/‘U´V×5HÑ5HÈÓ5OˆŒ
Ü  §¡Ñ,ˆ
Ø)Ÿ~™~ˆÔð ˆŒØˆŒ
ð 	×ÑÔð ×Ñ×1Ò1Ø!×0Ñ0Ó2ˆD�NàˆIñ
 Ø"Ÿn™n¨ZÓ8ˆDŒOØ!×1Ñ1Ó3ˆD�Nà&ˆDŒNñ õ &á�8ÔØ$ˆD�Mà ˆDŒMáØ×Ñ˜fÔ%Ø+ÐØ ˆD�KàˆDŒKð !1ˆÔØ˜|Ò+Ø)-ˆDÕ&ØÐ!4Ò4Ü)4×);Ñ);ˆDÕ&äÐ CÐFVÑ VÓWÐWr"   c                 ót   — |r6t        |t        t        f«      rt        |Ž S t        |t        «      r|S t        ‚y)zCheck the `fid_range` keyword.N)r@   ÚtupleÚlistÚsliceÚ	TypeError)rY   Ú	fid_ranges     r#   Úcheck_fid_rangezLayerMapping.check_fid_range³   s6   € áÜ˜)¤e¬T ]Ô3Ü˜iÐ(Ð(Ü˜I¤uÔ-Ø Ð ä�àr"   c           
      óÐ  ‡— d| _         i | _        | j                  j                  Š| j                  j                  }ˆfd„}| j                  j                  «       D �]  \  }}	 | j                  j                  j                  |«      }|j                  j                  }t        |t        «      r½| j                   rt        d«      ‚|j                  }	 |dk(  rt!        |dz   «      }nt!        |«      }| j                  j$                  }	|	j&                  j)                  |j&                  «      s-| j+                  |	|«      st        d|›|dk(  rd	nd
›d|	›d�«      ‚|| _         || _        |}
�nt        |t.        j0                  «      rpt        |t2        «      rU|j4                  j                  }|j                  «       D ])  \  }} ||«      }	 |j                  j                  |«       Œ+ |}
n‚t7        d«      ‚|j                  | j8                  vrt        d|z  «      ‚ ||«      }||   }t;        || j8                  |j                     «      st        d|›d|j                  ›d|›d�«      ‚|}
|
| j                  |<   �Œ" y# t        $ r t        d|z  «      ‚w xY w# t"        $ r t        d|z  «      ‚w xY w# t        $ r' t        d|›d|j                  j                  ›d�«      ‚w xY w)zÞ
        Check the Layer metadata and ensure that it's compatible with the
        mapping information and model. Unlike previous revisions, there is no
        need to increment through each feature in the Layer.
        Fc                 ób   •— 	 ‰j                  | «      }|S # t        $ r t        d| z  «      ‚w xY w)Nz4Given mapping OGR field "%s" not found in OGR Layer.)ÚindexÚ
ValueErrorr   )Úogr_map_fldÚidxÚ
ogr_fieldss     €r#   Úcheck_ogr_fldz/LayerMapping.check_layer.<locals>.check_ogr_fldÑ   sE   ø€ ðØ ×&Ñ& {Ó3�ð
 ˆJøô	 ò Ü#ØJÈ[ÑXóð ðús   ƒ –.z3Given mapping field "%s" not in given Model fields.zDLayerMapping does not support more than one GeometryField per model.r3   Ú25Dz'Invalid mapping for GeometryField "%s".z$Invalid mapping geometry; model has z(dim=3)Ú z, layer geometry type is ú.zForeignKey mapping field "z	" not in z fields.z.ForeignKey mapping must be of dictionary type.z0Django field type "%s" has no OGR mapping (yet).zOGR field "z" (of type z) cannot be mapped to Django N)Ú
geom_fieldÚfieldsrC   Úfield_typesrH   ÚitemsrI   Ú_metaÚ	get_fieldr   r   Ú	__class__r   r@   r   Údimr   r	   Ú	geom_typeÚnameÚ
startswithÚ
make_multiÚ	coord_dimr   Ú
ForeignKeyÚdictÚremote_fieldra   ÚFIELD_TYPESÚ
issubclass)rY   Úogr_field_typesrk   Ú
field_nameÚogr_nameÚmodel_fieldÚfld_namer{   ÚgtypeÚltypeÚ
fields_valÚ	rel_modelÚrel_nameÚ	ogr_fieldri   rj   s                  @r#   rJ   zLayerMapping.check_layer¿   sà  ø€ ð  ˆŒØˆŒð —Z‘Z×&Ñ&ˆ
ØŸ*™*×0Ñ0ˆô	ð %)§L¡L×$6Ñ$6Ó$8ó V	1Ñ ˆJ˜ðØ"Ÿj™j×.Ñ.×8Ñ8¸ÓD�ð #×,Ñ,×5Ñ5ˆHä˜+¤}Ô5Ø—?’?Ü'ð!óð ð (ŸO™O�	ðØ  A’~Ü +¨H°uÑ,<Ó =™ä +¨HÓ 5˜ð Ÿ
™
×,Ñ,�à—J‘J×)Ñ)¨%¯*©*Ô5Ø—‘ u¨kÔ:å'ñ $°)¸q².¡YÀbÑ%HÊ%ðQóð ð #-�”Ø!*�”Ø(’
Ü˜K¬×):Ñ):Ô;Ü˜h¬Ô-à +× 8Ñ 8× >Ñ >�IØ/7¯~©~Ó/?ò Ñ+˜ )Ù+¨IÓ6˜ðØ%ŸO™O×5Ñ5°hÕ?ðð "+‘Jä#Ð$TÓUÐUð ×(Ñ(°×0@Ñ0@Ñ@Ü'ØJÈXÑUóð ñ
 $ HÓ-�Ø+¨CÑ0�	ô " )¨T×-=Ñ-=¸k×>SÑ>SÑ-TÔUÝ'â$ i×&8Ó&8º(ðDóð ð )�
à&0ˆD�K‰K˜
Ó#ñmV	1øô
 %ò Ü#ØIÈJÑVóð ðûô. %ò Ü'ØAÀJÑNóð ðûô>  1ò Ý"/â#+¨Y×-@Ñ-@×-IÓ-Ið!Kó#ð ðús$   Á#%I?ÃJÇ
J5É?JÊJ2Ê50K%c                 ó  — t        |t        «      r|}nit        || j                  j                  «       «      r|j                  }n8t        |t
        t        f«      rt        |«      }n| j                  j                  }|st        d«      ‚|S )z>Check the compatibility of the given spatial reference object.z#No source reference system defined.)	r@   r   rG   Úspatial_ref_sysÚsrsÚintrA   rC   r   )rY   rP   Úsrs      r#   rO   zLayerMapping.check_srs4  sq   € ô �jÔ"2Ô3Ø‰BÜ˜
 D×$8Ñ$8×$HÑ$HÓ$JÔKØ—‘‰BÜ˜
¤S¬# JÔ/Ü! *Ó-‰Bð —‘—‘ˆBáÜÐ EÓFÐFàˆIr"   c                 óÆ   — t        |t        t        f«      r|D ]  }|| j                  vsŒt        ‚ yt        |t
        «      r|| j                  vrt        ‚yt        d«      ‚)zDCheck the `unique` keyword parameter -- may be a sequence or string.zBUnique keyword argument must be set with a tuple, list, or string.N)r@   r_   r^   rH   rg   rA   ra   )rY   rU   Úattrs      r#   rT   zLayerMapping.check_uniqueF  sf   € ä�fœt¤U˜mÔ,àò %�Ø˜tŸ|™|Ò+Ü$Ð$ñ%ô ˜¤Ô$à˜TŸ\™\Ñ)Ü Ð ð *ô ØTóð r"   c                 óœ  — i }| j                   j                  «       D ]”  \  }}| j                  |   }t        |t        «      r	 | j                  |j                  |«      }nMt        |t        j                  j                  «      r| j                  |||«      }n| j                  ||   |«      }|||<   Œ– |S # t        $ r t        d«      ‚w xY w)z{
        Given an OGR Feature, return a dictionary of keyword arguments for
        constructing the mapped model.
        z)Could not retrieve geometry from feature.)rH   rr   rp   r@   r   Úverify_geomÚgeomr	   r   r   ÚbaseÚ	ModelBaseÚ	verify_fkÚverify_ogr_field)rY   ÚfeatÚkwargsr‚   rƒ   r„   Úvals          r#   Úfeature_kwargszLayerMapping.feature_kwargsW  sÔ   € ð ˆð %)§L¡L×$6Ñ$6Ó$8ò 	%Ñ ˆJ˜ØŸ+™+ jÑ1ˆKä˜+¤}Ô5ðUØ×*Ñ*¨4¯9©9°kÓB‘Cô ˜K¬¯©×)>Ñ)>Ô?ð —n‘n T¨;¸ÓA‘ð ×+Ñ+¨D°©N¸KÓH�ð "%ˆF�:Òð'	%ð* ˆøô %ò UÜ'Ð(SÓTÐTðUús   ÁB6Â6Cc                 ó²   — t        | j                  t        «      r| j                  || j                     iS | j                  D �ci c]  }|||   “Œ
 c}S c c}w )z·
        Given the feature keyword arguments (from `feature_kwargs`), construct
        and return the uniqueness keyword arguments -- a subset of the feature
        kwargs.
        )r@   rU   rA   )rY   r›   Úflds      r#   Úunique_kwargszLayerMapping.unique_kwargsx  sK   € ô �d—k‘k¤3Ô'Ø—K‘K ¨¯©Ñ!4Ð5Ð5à04·±Ö<¨�C˜ ™Ñ$Ò<Ð<ùÒ<s   ÁAc           	      óŠ  — t        |t        «      rÈt        |t        j                  t        j                  f«      rž| j
                  r-|j                  �!t        |j                  | j
                  «      }n|j                  }|j                  rK|�It        |«      |j                  kD  r1t        |j                  ›d|j                  ›dt        |«      ›d�«      ‚|S t        |t        «      r¼t        |t        j                  «      r¢	 t        t        |j                  «      «      }|j%                  «       }|d   }|d   }|j&                  |j(                  z
  }|dk  rt        |d| «      }	nt        |«      |z   }	|	|kD  r%t#        d	|j&                  |j(                  |fz  «      ‚|}|S t        |t        t        f«      r2t        |t        j*                  «      r	 t-        |j                  «      }|S |j                  }|S # t         $ r t#        d|j                  z  «      ‚w xY w# t.        $ r t1        d
|j                  z  «      ‚w xY w)z£
        Verify if the OGR Field contents are acceptable to the model field. If
        they are, return the verified value, otherwise raise an exception.
        Nz& model field maximum string length is z, given z characters.z$Could not construct decimal from: %sr/   r1   r   zeA DecimalField with max_digits %d, decimal_places %d must round to an absolute value less than 10^%d.z$Could not construct integer from: %s)r@   r   r   Ú	CharFieldÚ	TextFieldr<   Úvaluer   Ú
max_lengthÚlenr&   rx   r   ÚDecimalFieldr   rA   ÚDecimalInvalidOperationr(   Úas_tupleÚ
max_digitsÚdecimal_placesÚIntegerFieldr�   rg   r*   )
rY   r‹   r„   rœ   ÚdÚdtupÚdigitsÚd_idxÚmax_precÚn_precs
             r#   r™   zLayerMapping.verify_ogr_field„  s,  € ô
 �i¤Ô+´
Øœ&×*Ñ*¬F×,<Ñ,<Ð=ô1
ð �}Š} §¡Ð!<ô   	§¡°·±Ó?‘à—o‘o�à×&Ò&Ø�OÜ˜“H˜{×5Ñ5Ò5ä#à"×'Ó'¨×)?Ó)?ÄÀSÅðKóð ðf ˆ
ô_ ˜	¤7Ô+´
Øœ×,Ñ,ô1
ðäœC 	§¡Ó0Ó1�ð —:‘:“<ˆDØ˜!‘WˆFØ˜‘GˆEð #×-Ñ-°×0JÑ0JÑJˆHð �qŠyÜ˜V F U˜^Ó,‘ä˜V› uÑ,�ð ˜Ò Ü$ðBà"×-Ñ-¨{×/IÑ/IÈ8ÐTñUóð ð
 ˆCð ˆ
ô ˜	¤G¬YÐ#7Ô8¼ZØœ×,Ñ,ô>
ðÜ˜)Ÿ/™/Ó*�ð ˆ
ð —/‘/ˆCØˆ
øôS +ò Ü$Ø:¸Y¿_¹_ÑLóð ðûôF ò Ü$Ø:¸Y¿_¹_ÑLóð ðús   ÄG; ÇH  Ç;"HÈ "Ic                 óT  — i }|j                  «       D ]6  \  }}| j                  ||   |j                  j                  |«      «      ||<   Œ8 	  |j                  j                  | j
                  «      j                  di |¤ŽS # t        $ r t        d|j                  ›d|›�«      ‚w xY w)z”
        Given an OGR Feature, the related model and its dictionary mapping,
        retrieve the related model for the ForeignKey mapping.
        zNo ForeignKey z% model found with keyword arguments: r!   )
rr   r™   rs   rt   ÚobjectsrE   Úgetr   r,   r   )rY   rš   r‰   Úrel_mappingÚ	fk_kwargsr‚   rƒ   s          r#   r˜   zLayerMapping.verify_fkÌ  s¯   € ð ˆ	Ø$/×$5Ñ$5Ó$7ò 	Ñ ˆJ˜Ø$(×$9Ñ$9Ø�X‘ 	§¡× 9Ñ 9¸*Ó Eó%ˆI�jÒ!ð	ð	Ø:�9×$Ñ$×*Ñ*¨4¯:©:Ó6×:Ñ:ÑG¸YÑGÐGøÜ!ò 	Ý#à×%Ó%¡yð2óð ð	ús   Á4B Â%B'c                 ó¶  — |j                   r|j                  d«       | j                  dk(  r|j                  r|j	                  d«       | j                  |j                  |«      r@| j                  |j                  j                     }t        |«      }|j                  |«       n|}| j                  r|j                  | j                  «       |j                  S )zØ
        Verify the geometry -- construct and return a GeometryCollection
        if necessary (for example if the model field is MultiPolygonField while
        the mapped shapefile only contains Polygons).
        Fr1   )Úis_measuredÚset_measuredr{   Úis_3dÚset_3drz   rw   ÚMULTI_TYPESÚnumr
   ÚaddrR   Úwkt)rY   r•   r„   Ú
multi_typeÚgs        r#   r”   zLayerMapping.verify_geomå  s¥   € ð ×ÒØ×Ñ˜eÔ$ð �>‰>˜QÒ 4§:¢:Ø�K‰K˜Ôà�?‰?˜4Ÿ>™>¨;Ô7à×)Ñ)¨$¯.©.×*<Ñ*<Ñ=ˆJÜ˜JÓ'ˆAØ�E‰E�$�KàˆAð
 �>Š>Ø�K‰K˜Ÿ™Ô'ð �u‰uˆr"   c                 óD  — | j                   j                  «       }	 |j                  j                  | j                  «      j	                  | j
                  j                  ¬«      j                  }t        | j                  |«      S # t        $ r}t        d«      |‚d}~ww xY w)z,Return the coordinate transformation object.)Úsridz?Could not translate between the data source and model geometry.N)rG   r�   r´   rE   rµ   rN   rÄ   rŽ   r   rP   Ú	Exceptionr   )rY   ÚSpatialRefSysÚ
target_srsÚexcs       r#   rQ   zLayerMapping.coord_transform  s‹   € à×,Ñ,×<Ñ<Ó>ˆð	ð ×%Ñ%×+Ñ+¨D¯J©JÓ7ß‘˜$Ÿ.™.×-Ñ-�Ó.ß‘ð ô " $§/¡/°:Ó>Ð>øÜò 	ÜØQóàðûð	ús   œA(B Â	BÂBÂBc                 ód   — | j                   j                  }|j                  | j                  «      S )zHReturn the GeometryField instance associated with the geographic column.)rI   rs   rt   ro   )rY   Úoptss     r#   rM   zLayerMapping.geometry_field  s&   € ð �z‰z×ÑˆØ�~‰~˜dŸo™oÓ.Ð.r"   c                 ó‚   — |j                   | j                  v xr& |j                  j                  d|j                  z  k(  S )z«
        Given the OGRGeomType for a geometry and its associated GeometryField,
        determine whether the geometry should be turned into a GeometryCollection.
        zMulti%s)r¾   r½   ru   r   Údjango)rY   rw   r„   s      r#   rz   zLayerMapping.make_multi  s@   € ð �M‰M˜T×-Ñ-Ð-ò OØ×%Ñ%×.Ñ.°)¸i×>NÑ>NÑ2NÑNð	
r"   Fc                 óT  ‡ ‡‡‡‡‡‡— ‰ j                  |«      }‰r‰du st        ‰t        «      sdŠn‰Š|ddfˆˆˆ ˆˆˆˆfd„	}	‰ j                  �‰ j                  |	«      }	‰ j                  j
                  }
|r…t        |t        «      ru||
k  rp|rt        d«      ‚d\  }}}t        ||
|«      }t        |«      }t        |«      D ]6  \  }}|dz   |k(  rt        |d«      }nt        ||«      }	  |	|||«      \  }}|}Œ8 y |	«        y# t        $ r ‰j                  d	›d
|›d�«       ‚ w xY w)a²  
        Save the contents from the OGR DataSource Layer into the database
        according to the mapping dictionary given at initialization.

        Keyword Parameters:
         verbose:
           If set, information will be printed subsequent to each model save
           executed on the database.

         fid_range:
           May be set with a slice or tuple of (begin, end) feature ID's to map
           from the data source.  In other words, this keyword enables the user
           to selectively import a subset range of features in the geographic
           data source.

         step:
           If set with an integer, transactions will occur at every step
           interval. For example, if step=1000, a commit would occur after
           the 1,000th feature, the 2,000th feature etc.

         progress:
           When this keyword is set, status information will be printed giving
           the number of features processed and successfully saved.  By default,
           progress information will pe printed every 1000 features processed,
           however, this default may be overridden by setting this keyword with an
           integer for the desired interval.

         stream:
           Status information will be written to this file handle.  Defaults to
           using `sys.stdout`, but any object with a `write` method is supported.

         silent:
           By default, non-fatal error notifications are printed to stdout, but
           this keyword may be set to disable these notifications.

         strict:
           Execution of the model mapping will cease upon the first error
           encountered.  The default behavior is to attempt to continue.
        Tiè  r   c           	      óÜ  •— | r‰j                   |    }n‰j                   }|D �]  }|dz  }	 ‰j                  |«      }d}‰j                  râ	 ‰j                  |«      } ‰j                  j
                  j                  ‰j                  «      j                  di |¤Ž}d}t        |‰j                  «      }	|	€t        |‰j                     «      }
n<|	j                  }
t        |‰j                     «      }|D ]  }|
j                  |«       Œ t        |‰j                  |
j                  «       n ‰j                  di |¤Ž}	 |j!                  ‰j                  ¬«       |dz  }‰r‰j#                  |rdnd›d|›d�«       ‰s�Œ`|‰z  dk(  s�Œj‰j#                  d||fz  «       �Œ‚ ||fS # t        $ r  ‰j                  di |¤Ž}Y Œ‡w xY w# t$        $ r[}‰r5‰s2‰j#                  d	|j&                  z  «       ‰j#                  d
|z  «       ‚ ‰s‰j#                  d|›d|›d�«       Y d }~Œ«d }~ww xY w# t(        $ r1}‰r‚ ‰s"‰j#                  d|j&                  ›d|›d�«       Y d }~Œèd }~ww xY w)Nr/   FT)rE   ÚUpdatedÚSavedz: ú
zOFailed to save the feature (id: %s) into the model with the keyword arguments:
z%s
zFailed to save z:
 z
Continuing
zIgnoring Feature ID z
 because: r   z$Processed %d features, saved %d ...
r!   )rC   r�   rU   r    rI   r´   rE   rµ   Úgetattrro   r
   Úogrr¿   ÚsetattrrÀ   r   ÚsaveÚwriterÅ   Úfidr   )Ú
feat_rangeÚnum_featÚ	num_savedÚ
layer_iterrš   r›   Ú	is_updateÚu_kwargsÚmÚ
geom_valuer•   ÚnewrÂ   ÚmsgÚprogressÚprogress_intervalrY   ÚsilentÚstreamÚstrictÚverboses                 €€€€€€€r#   Ú_savez LayerMapping.save.<locals>._savec  se  ø€ ÙØ!ŸZ™Z¨
Ñ3‘
à!ŸZ™Z�
à"ó H�Ø˜A‘�ð?Ø!×0Ñ0°Ó6�Fð !&�IØ—{’{ð5ð (,×'9Ñ'9¸&Ó'A˜HØ H §
¡
× 2Ñ 2× 8Ñ 8¸¿¹Ó D× HÑ HÑ TÈ8Ñ T˜AØ(,˜Iô *1°°D·O±OÓ)D˜JØ)Ð1Ü'2°6¸$¿/¹/Ñ3JÓ'K¡à'1§~¡~ Ü&1°&¸¿¹Ñ2IÓ&J Ø),ò !0 AØ$(§H¡H¨Q¥Kð!0ä# A t§¡¸¿¹ÕAð
 '˜DŸJ™JÑ0¨Ñ0˜ðàŸ™ T§Z¡Z˜Ô0Ø! Q™˜	Ù"Ø"ŸL™LÙ;D©iÈ'Ñ.QÒSTÐ Uôó&  Ð+<Ñ <ÀÔ AØ—L‘LØ?À8ÈYÐBWÑWöðMHðX ˜hÐ&Ð&øôK  2ò 5à * §
¡
Ñ 4¨VÑ 4šAð5ûô %ò Ù!á#)Ø &§¡ð%JØLPÏHÉHñ%Uô!"ð !'§¡¨V°f©_Ô =Ø!Ù!'Ø"ŸLšLÚKQÒSVÐ Wôÿøðûôa %ò áØÙ#ØŸšØFJÇhÃhÒPSÐTôÿøðúsC   ¬H1ÁC F)Å >G
Æ)GÇGÇ
	H.ÇAH)È)H.È1	I+È:'I&É&I+NzOThe `step` keyword may not be used in conjunction with the `fid_range` keyword.)r   r   r   r/   z(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-z
Failed to save slice: rÑ   )rc   r@   r�   rW   rC   rÙ   r   Úranger¦   Ú	enumerater`   rÅ   rÖ   )rY   rç   rb   Ústeprâ   rä   rå   ræ   Údefault_rangerè   ÚnfeatÚbegrÙ   rÚ   ÚindicesÚn_iÚiÚendÚ
step_slicerã   s   ``  ````           @r#   rÕ   zLayerMapping.save(  sO  þ€ ðd ×,Ñ,¨YÓ7ˆñ Ø˜4Ñ¤z°(¼CÔ'@Ø$(Ñ!à$,Ð!à*°QÀ!÷ R	'ó R	'ðh ×%Ñ%Ð1Ø×.Ñ.¨uÓ5ˆEà—
‘
×#Ñ#ˆÙ”J˜t¤SÔ)¨d°UªláÜ#ð+óð ð (1Ñ$ˆC�˜9Ü˜D %¨Ó.ˆGÜ�g“,ˆCä# GÓ,ò ‘��3ð �q‘5˜C’<Ü!& s¨DÓ!1‘Jä!& s¨C£�JðÙ*/°
¸HÀiÓ*PÑ'�H˜iØ‘Cññ$ �Gøô !ò Ø—L‘LÚ<EÂzÐRôð ð	ús   Ã+DÄ"D')r   Nzutf-8r?   TNN)5r   r   r    Ú__doc__r   r¾   r½   r   Ú	AutoFieldr   ÚBigAutoFieldr   ÚSmallAutoFieldÚBooleanFieldr   r   r¬   Ú
FloatFieldÚ	DateFieldr   ÚDateTimeFieldr   Ú
EmailFieldÚ	TimeFieldr   r§   r¢   Ú	SlugFieldr£   ÚURLFieldÚ	UUIDFieldÚBigIntegerFieldÚSmallIntegerFieldÚPositiveBigIntegerFieldÚPositiveIntegerFieldÚPositiveSmallIntegerFieldr   r\   rc   rJ   rO   rT   r�   r    r™   r˜   r”   rQ   rM   rz   ÚsysÚstdoutrÕ   r!   r"   r#   r.   r.   :   s‘  „ Ù7ð 	
‰;�|Ó$Ø	‰;Ð(Ó)Ø	‰;�~Ó&Ù�JÓ×#Ñ#¡[°Ó%AÙ�OÓ$×(Ñ(©+Ð6JÓ*KÙ�LÓ!×%Ñ%¡{Ð3DÓ'Eð€KðØ×Ñ˜*ðà×Ñ˜\ðð 	×Ñ˜zðð 	×Ñ˜j¨'°9Ð=ð	ð
 	×Ñ˜j¨'°9Ð=ðð 	×Ñ˜J¨Ð0ðð 	×Ñ˜'ðð 	×Ñ˜kðð 	×Ñ˜9ðð 	×Ñ˜'ðð 	×Ñ˜j¨'Ð2ðð 	×Ñ˜)ðð 	×Ñ˜)ðð 	×Ñ˜)ðð 	�‰˜ðð  	×Ñ˜)ð!ð" 	×Ñ ¨W°iÐ @ð#ð$ 	× Ñ  :¨w¸	Ð"BØ×&Ñ&¨°W¸iÐ(HØ×#Ñ# j°'¸9Ð%EØ×(Ñ(¨:°wÀ	Ð*Jñ+€Kð: ØØØ,ØØØóPXòf
òs1òjò$ò"òB	=òFòPò2ò@ò$/ò
ð ØØØØØ�z‰zØôpr"   r.   )*rô   r  Údecimalr   r   r¨   Úpathlibr   Údjango.contrib.gis.db.modelsr   Údjango.contrib.gis.gdalr   r   r	   r
   r   r   Údjango.contrib.gis.gdal.fieldr   r   r   r   r   r   r   Údjango.core.exceptionsr   r   Ú	django.dbr   r   r   r   Údjango.utils.encodingr   rÅ   r   r&   r(   r*   r,   r.   r!   r"   r#   ú<module>r     s‹   ðñó Ý Ý ?Ý å 6÷÷ ÷÷ ñ ÷ Iß >Ó >Ý +ô	�Iô 	ô	�Mô 	ô	�]ô 	ô	�]ô 	ô	˜ô 	÷^
ò ^
r"   