
    Dhn                        S r SSKJr  SSKrSSKJr  SSKrSSKJrJ	r	  SSK
JrJrJr  SSK
JrJr  SSK
JrJrJr  SS	KJrJrJrJrJrJr  SS
KJr  SSKJr  SSKJrJ r   SSK!J"r"  SSKJ#r#  SSK$J%r%J&r&J'r'J(r(J)r)  SSK*J+r+J,r,J-r-  \ " 5       r.\" 5       r/\R`                  " \15      r2 " S S5      r3\Rh                  " 5        V s1 s H  n SU ;  d  M  U S:w  d  M  U iM     sn r5\5Rm                  S5        S r7S r8 " S S\35      r9gs  sn f )z5Collections provide file-like access to feature data.    )	ExitStackN)Path)compatvfs)IteratorItemsIteratorKeysIterator)SessionWritingSession)buffer_to_virtual_fileremove_virtual_fileGEOMETRY_TYPES)DriverErrorDriverSupportErrorGDALVersionErrorSchemaErrorUnsupportedGeometryTypeErrorUnsupportedOperation)FieldSkipLogFilter)CRS)get_gdal_release_nameget_gdal_version_tuple)env_ctx_if_needed)FionaDeprecationWarning)driver_from_extensionsupported_driversdriver_mode_mingdal+_driver_converts_field_type_silently_to_str_driver_supports_field)_Path	_vsi_path_parse_pathc                   b   \ rS rSrSr               S&S jrS rS r\S 5       r	\S 5       r
\S	 5       r\S
 5       rS'S jrS'S jrS'S jrS'S jr\S 5       r\rS rS rS rS r\rS rS r\rS rS rS rS rS rS r S r!\S 5       r"S r#S r$S  r%\S! 5       r&S" r'S# r(S$ r)S%r*g)(
Collection)   zA file-like interface to features of a vector dataset

Python text file objects are iterators over lines of a file. Fiona
Collections are similar iterators (not lists!) over features
represented as GeoJSON-like mappings.
Nc           
         SU l         [        U[        [        45      (       d  [	        SU< 35      e[        U[        5      (       a  US;  a  [	        SU< 35      eU(       a$  [        U[        5      (       d  [	        SU< 35      eU(       a  [        US5      (       d  [	        SU-  5      eU(       ae  [        U[        R                  [        [        4-   5      (       d9  [        US5      (       a  [        UR                  5      (       d  [	        S	U-  5      eU(       a$  [        U[        5      (       d  [	        S
U< 35      eU(       a$  [        U[        5      (       d  [	        SU< 35      eU(       a*  [        U[        [        45      (       d  [	        SU< 35      eU(       a?  [        U[        5      (       a  [        R                  " U5      (       d  [	        SU< 35      eU	(       a$  [        U	[        5      (       d  [	        SU	< 35      eUb  Ub  [        S5      eUS:X  a  Uc  [        U5      nU[         U   ;   ah  [#        5       [         U   U   :  aP  SR%                  ['        [)        [        [         U   U   5      5      5      n[+        U SU SU S[-        5        35      eSU l        SU l        SU l        SU l        SU l        SU l        SU l        SU l        Xl        Xl         Xl!        [E        U5      U l#        UU l$        SU l         U[         U   ;   ah  [#        5       [         U   U   :  aP  SR%                  ['        [)        [        [         U   U   5      5      5      n[+        U SU SU S[-        5        35      eU(       a2  [        RJ                  " XU	5      U l&        [O        U RL                  5      nO[O        U5      n[Q        U5      U l&        U=(       d    SU l)        US:X  aU  U(       a   [        U[        5      (       d  [        S5      eU=(       d    [U        U RL                  5      RV                  U l,        O2Uc  SO'U=(       d    [U        U RL                  5      RV                  U l,        X l-        U RZ                  S:X  Ga  US:X  a  SnU(       d  [+        S5      eU(       dI  U[\        ;  a  [+        SU< 35      eU RZ                  [\        U   ;  a  [+        SU RZ                  < 35      eX0l        U(       d  [_        S5      eSU;   a$  URa                  5       n[c        US   5      US'   UnO0 US'   SU;  a  SUS'   X@l        U Re                  5         U(       d  U(       a1  [        Rf                  " U=(       d    U5      R                  US 9U l        X0l        URi                  US!9  X`l5         U RZ                  S":X  a-  [m        5       U l        U R.                  Rn                  " U 40 UD6  O<U RZ                  S#;   a,  [q        5       U l        U R.                  Rn                  " U 40 UD6  U R.                  b  U Ru                  5         U RZ                  S#;   a%  [w        U Rx                  U Rz                  5      U l>        [        5       U l@        [        5       U lB        S$U l         g! [r         a	    SU l        e f = f)%a  The required ``path`` is the absolute or relative path to
a file, such as '/data/test_uk.shp'. In ``mode`` 'r', data can
be read only. In ``mode`` 'a', data can be appended to a file.
In ``mode`` 'w', data overwrites the existing contents of
a file.

In ``mode`` 'w', an OGR ``driver`` name and a ``schema`` are
required. A Proj4 ``crs`` string is recommended. If both ``crs``
and ``crs_wkt`` keyword arguments are passed, the latter will
trump the former.

In 'w' mode, kwargs will be mapped to OGR layer creation
options.

Tzinvalid path: )rwazinvalid mode: zinvalid driver: getzinvalid schema: %rto_wktzinvalid crs: %rzinvalid crs_wkt: zinvalid encoding: zinvalid name: zinvalid vsi: zinvalid archive: Nz8Cannot specify both 'ignore_fields' and 'include_fields'r(   .z driver requires at least GDAL z for mode 'z', Fiona was compiled against: r   z(in 'w' mode, layer names must be strings	ShapefileESRI Shapefilez	no driverunsupported driver: unsupported mode: z	no schema
propertiesgeometry)version)encodingr'   r)   r(   F)C_closed
isinstancestrr    	TypeErrorhasattrr   
DICT_TYPESr   callabler+   intr   	valid_vsi
ValueErrorr   r   r   joinlistmapr   r   sessioniterator_len_bounds_driver_schema_crs_crs_wktenabled_driversinclude_fieldsignore_fieldsboolignore_geometry_allow_unsupported_driversvsi_pathpathr"   r!   layerr   stemnamemoder   r   copydict_check_schema_driver_supportfrom_user_inputupdater4   r
   startr   OSErrorguard_driver_mode_get_valid_geom_typesschemadriver_valid_geom_typesr   field_skip_log_filterr   _env)selfrR   rV   ra   r`   crsr4   rS   vsiarchiverK   crs_wktrM   rO   rL   wkt_versionallow_unsupported_driverskwargsmin_gdal_versionthis_schemas                       cC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\fiona/collection.py__init__Collection.__init__2   s   H $e--nTH566$$$O(CnTH566*VS11.vj9::'&%00069:: sF$5$5c
$BCCS(++0D0D-344:gs33/{;<<Jx550=>>EC:66nUI677c3''s}}S/A/A-w 788:gs33/{;<<$)CWXX3;6>*40F )$//&(+>t+DV+LL"xxS1$7?@A  (9:J9K L!F #//D/F.GI  		.,*#O4*C' )$//&(+>t+DV+LL"xxS1$7?@A  (9:J9K L!F #//D/F.GI  T8DItyy)Dt$D!$DIZa
3;Zs33 !KLL5dii!5!5DI"]0Mdii9M9MDI	99$)!+..,!22%(<VJ&GHH99$5f$==%(:499-&HII!L!+..v%$kkm,01E,FL)$')|$'%)z"!L--/# # 3 3GNs C J J' !K ! x( 		yyC&y""4262j(-/""4262
 <<#""$99
"%:4;;%TD"%7%9"K	  	DL	s   =<Z. :<Z. .[c           
          SR                  U R                  =(       a    S=(       d    SU R                  S-   [        U R                  5      -   U R
                  [        [        U 5      5      5      $ )Nz%<{} Collection '{}', mode '{}' at {}>closedopen:formatrs   rR   r8   rU   rV   hexidre   s    ro   __repr__Collection.__repr__   sP    6==KK$H.IIOc$))n,II4M	
 	
    c                     U R                   (       dd  U R                  R                  5       nU[        ;  a  [	        SU< 35      eU R
                  [        U   ;  a  [	        SU R
                  < 35      eg g )Nr/   r0   )rP   rC   
get_driverr   r   rV   )re   ra   s     ro   r^   Collection.guard_driver_mode   sl    ..\\,,.F..!$8
"CDDyy 1& 99!$6tyym"DEE :	 /r}   c                     U R                   (       d@  U R                  S;   a0  U R                  (       a  U R                  R                  5       U l         U R                   $ )z*Returns the name of the proper OGR driver.r)   r'   )rG   rV   rC   r   rz   s    ro   ra   Collection.driver  s:     ||		Z 7DLL<<224DL||r}   c                     U R                   (       d@  U R                  S;   a0  U R                  (       a  U R                  R                  5       U l         U R                   $ )zReturns a mapping describing the data schema.

The mapping has 'geometry' and 'properties' items. The former is a
string such as 'Point' and the latter is an ordered mapping that
follows the order of fields in the data file.
r   )rH   rV   rC   
get_schemarz   s    ro   r`   Collection.schema  s:     ||		Z 7DLL<<224DL||r}   c                     U R                   c0  U R                  (       a  U R                  R                  5       U l         U R                   $ )z8The coordinate reference system (CRS) of the Collection.)rI   rC   get_crsrz   s    ro   rf   Collection.crs  s2     99,,.DIyyr}   c                     U R                   c0  U R                  (       a  U R                  R                  5       U l         U R                   $ )zReturns a WKT string.)rJ   rC   get_crs_wktrz   s    ro   ri   Collection.crs_wkt  s2     == T\\ LL446DM}}r}   c                     [         R                  S:  a  [        S[         35      eU R                  (       a  U R                  R                  US9$ g)a  Returns a dict containing copies of the dataset or layers's
tags. Tags are pairs of key and value strings. Tags belong to
namespaces.  The standard namespaces are: default (None) and
'IMAGE_STRUCTURE'.  Applications can create their own additional
namespaces.

Parameters
----------
ns: str, optional
    Can be used to select a namespace other than the default.

Returns
-------
dict
   z3tags requires GDAL 2+, fiona was compiled against: nsN)_GDAL_VERSION_TUPLEmajorr   _GDAL_RELEASE_NAMErC   tags)re   r   s     ro   r   Collection.tags%  sS      $$q("./1  <<<<$$$++r}   c                     [         R                  S:  a  [        S[         35      eU R                  (       a  U R                  R                  XS9$ g)zReturns tag item value

Parameters
----------
key: str
    The key for the metadata item to fetch.
ns: str, optional
    Used to select a namespace other than the default.

Returns
-------
str
r   z;get_tag_item requires GDAL 2+, fiona was compiled against: )keyr   N)r   r   r   r   rC   get_tag_item)re   r   r   s      ro   r   Collection.get_tag_item>  sS     $$q("./1  <<<<,,,<<r}   c                     [         R                  S:  a  [        S[         35      e[	        U R
                  [        5      (       d  [        S5      eU R
                  R                  XS9$ )a  Writes a dict containing the dataset or layers's tags.
Tags are pairs of key and value strings. Tags belong to
namespaces.  The standard namespaces are: default (None) and
'IMAGE_STRUCTURE'.  Applications can create their own additional
namespaces.

Parameters
----------
tags: dict
    The dict of metadata items to set.
ns: str, optional
    Used to select a namespace other than the default.

Returns
-------
int
r   z:update_tags requires GDAL 2+, fiona was compiled against: z-Unable to update tags as not in writing mode.r   )	r   r   r   r   r7   rC   r   r   update_tags)re   r   r   s      ro   r   Collection.update_tagsU  sf    $ $$q("./1  $,,77&'VWW||'''44r}   c                     [         R                  S:  a  [        S[         35      e[	        U R
                  [        5      (       d  [        S5      eU R
                  R                  XUS9$ )zUpdates the tag item value

Parameters
----------
key: str
    The key for the metadata item to set.
tag: str
    The value of the metadata item to set.
ns: str, optional
    Used to select a namespace other than the default.

Returns
-------
int
r   z>update_tag_item requires GDAL 2+, fiona was compiled against: z,Unable to update tag as not in writing mode.)r   tagr   )	r   r   r   r   r7   rC   r   r   update_tag_item)re   r   r   r   s       ro   r   Collection.update_tag_itemp  sh      $$q("./1  $,,77&'UVV||+++DDr}   c                 `    U R                   U R                  U R                  U R                  S.$ )zJReturns a mapping with the driver, schema, crs, and additional
properties.ra   r`   rf   ri   r   rz   s    ro   metaCollection.meta  s*    
 kkkk88||	
 	
r}   c           	         U R                   (       a  [        S5      eU R                  S:w  a  [        S5      eU(       a-  [	        U6 nUR
                  nUR                  nUR                  nOS=n=pVUR                  S5      nUR                  S5      nU(       a  U(       a  [        S5      eUR                  S5      n	[        XXVXxU	5      U l
        U R                  $ )	a2  Returns an iterator over records, but filtered by a test for
spatial intersection with the provided ``bbox``, a (minx, miny,
maxx, maxy) tuple or a geometry ``mask``. An attribute filter can
be set using an SQL ``where`` clause, which uses the `OGR SQL dialect
<https://gdal.org/user/ogr_sql_dialect.html#where>`__.

Positional arguments ``stop`` or ``start, stop[, step]`` allows
iteration to skip over items or stop at a specific item.

Note: spatial filtering using ``mask`` may be inaccurate and returning
all features overlapping the envelope of ``mask``.

"I/O operation on closed collectionr'   collection not open for readingNbboxmask%mask and bbox can not be set togetherwhere)rs   r?   rV   r]   slicer\   stopstepr*   r   rD   
re   argskwdssr\   r   r   r   r   r   s
             ro   filterCollection.filter  s     ;;ABBYY#;<<tAGGE66D66D"&&E&DxxxxDDEE! d$eL}}r}   c           	         U R                   (       a  [        S5      eU R                  S:w  a  [        S5      eU(       a-  [	        U6 nUR
                  nUR                  nUR                  nOS=n=pVUR                  S5      nUR                  S5      nU(       a  U(       a  [        S5      eUR                  S5      n	[        XXVXxU	5      U l
        U R                  $ )	aC  Returns an iterator over FID, record pairs, optionally
filtered by a test for spatial intersection with the provided
``bbox``, a (minx, miny, maxx, maxy) tuple or a geometry
``mask``. An attribute filter can be set using an SQL ``where``
clause, which uses the `OGR SQL dialect
<https://gdal.org/user/ogr_sql_dialect.html#where>`__.

Positional arguments ``stop`` or ``start, stop[, step]`` allows
iteration to skip over items or stop at a specific item.

Note: spatial filtering using ``mask`` may be inaccurate and returning
all features overlapping the envelope of ``mask``.

r   r'   r   Nr   r   r   r   )rs   r?   rV   r]   r   r\   r   r   r*   r   rD   r   s
             ro   itemsCollection.items  s     ;;ABBYY#;<<tAGGE66D66D"&&E&DxxxxDDEE!%d4t5Q}}r}   c           	         U R                   (       a  [        S5      eU R                  S:w  a  [        S5      eU(       a-  [	        U6 nUR
                  nUR                  nUR                  nOS=n=pVUR                  S5      nUR                  S5      nU(       a  U(       a  [        S5      eUR                  S5      n	[        XXVXxU	5      U l
        U R                  $ )	a5  Returns an iterator over FIDs, optionally
filtered by a test for spatial intersection with the provided
``bbox``, a (minx, miny, maxx, maxy) tuple or a geometry
``mask``. An attribute filter can be set using an SQL ``where``
clause, which uses the `OGR SQL dialect
<https://gdal.org/user/ogr_sql_dialect.html#where>`__.

Positional arguments ``stop`` or ``start, stop[, step]`` allows
iteration to skip over items or stop at a specific item.

Note: spatial filtering using ``mask`` may be inaccurate and returning
all features overlapping the envelope of ``mask``.
r   r'   r   Nr   r   r   r   )rs   r?   rV   r]   r   r\   r   r   r*   r	   rD   r   s
             ro   keysCollection.keys  s     ;;ABBYY#;<<tAGGE66D66D"&&E&DxxxxDDEE!$T$d%P}}r}   c                 8    U R                   R                  U5      $ N)rC   has_feature)re   fids     ro   __contains__Collection.__contains__  s    ||'',,r}   c                 "    U R                  5       $ )z!Returns an iterator over records.)r   rz   s    ro   __iter__Collection.__iter__  s    {{}r}   c                     [         R                  " S[        SS9  U R                  (       d  [	        U 5        [        U R                  5      $ )z"Returns next record from iterator.zdCollection.__next__() is buggy and will be removed in Fiona 2.0. Switch to `next(iter(collection))`.r   )
stacklevel)warningswarnr   rD   iternextrz   s    ro   __next__Collection.__next__  s8    =#		
 }}JDMM""r}   c                 8    U R                   R                  U5      $ r   )rC   __getitem__re   items     ro   r   Collection.__getitem__  s    ||''--r}   c                 8    U R                   R                  U5      $ r   )rC   r*   r   s     ro   r*   Collection.get  s    ||%%r}   c                     U R                   (       a  [        S5      eU R                  S;  a  [        S5      eU R                  R                  X5        U R                  R                  5       U l        SU l        g)z,Stages multiple records for writing to disk.r   r5   zcollection not open for writingN)	rs   r?   rV   r]   rC   	writerecs
get_lengthrE   rF   )re   recordss     ro   writerecordsCollection.writerecords  sZ    ;;ABB99J&;<<w-LL++-	r}   c                 (    U R                  U/5        g)zStages a record for writing to disk.

Note: Each call of this method will start and commit a
unique transaction with the data source.
N)r   re   records     ro   writeCollection.write!  s     	6(#r}   c                     [        US   R                  5       5      [        U R                  S   R                  5       5      :H  =(       a    U R                  U5      $ )ziCompares the record to the collection's schema.

Returns ``True`` if the record matches, else ``False``.
r1   )setr   r`   validate_record_geometryr   s     ro   validate_recordCollection.validate_record)  sS     6,',,./3KK%**,4
 
 4++F3	4r}   c                    U R                   S:X  aQ  SUS   S   ;  aE  US   S   R                  S5      U R                  S   R                  S5      R                  S5      :H  $ US   S   U R                  S   R                  S5      :H  $ )ztCompares the record's geometry to the collection's schema.

Returns ``True`` if the record matches, else ``False``.
r.   Pointr2   typeMulti3D )ra   lstripr`   r   s     ro   r   #Collection.validate_record_geometry4  s     KK++vj1&99*%f-44W=BfUmFF7O, , *%f-Z1H1O1OPU1VVVr}   c                     U R                   S::  a,  U R                  b  U R                  R                  5       U l         U R                   S:  a  [        S5      eU R                   $ )Nr   zLayer does not support counting)rE   rC   r   r9   rz   s    ro   __len__Collection.__len__G  sM    99>dll6//1DI99q= =>>yyr}   c                     U R                   c,  U R                  b  U R                  R                  5       U l         U R                   $ )z!Returns (minx, miny, maxx, maxy).)rF   rC   
get_extentrz   s    ro   boundsCollection.boundsP  s5     <<DLL$<<<224DL||r}   c                 T   [         R                  nU R                  S   R                  5        H  nUR	                  S5      S   n[        U R                  U5      (       dB  U R                  S:X  a  US:  a  US:X  a  [        S5      e[        U R                   SU S	35      eUS
;   d  M|  [        U R                  U5      (       d  M  U R                  S:X  a(  US:  a"  US;   a  [        R                  " SU S35        M  [        R                  " U R                   SU S35        M     g)zLCheck support for the schema against the driver

See GH#572 for discussion.
r1   ru   r   GPKGr   datetimez5GDAL 1.x GPKG driver does not support datetime fieldsz does not support z fields>   datetimer   GeoJSON>   r   r   z-GeoJSON driver in GDAL 1.x silently converts z! to string in non-standard formatz driver silently converts z
 to stringN)r   r   rH   valuessplitr   ra   r   r   rG   r   r   )re   gdal_version_majorfield
field_types       ro   rY   'Collection._check_schema_driver_supportW  s)   
 166\\,/668ES)!,J)$++zBBKK6)*Q."j0,O  -;;-'9*WM   @ZXX LLI-*Q."&::MMG%,&GI
 MM;;-'A* N$ $G 9r}   c                     U R                   bl  U R                   R                  U 5        U R                   R                  5       nXR                  :  =(       a    U=(       d    U R                  U l        SU l        gg)zFlush the buffer.N)rC   syncr   rE   rF   )re   new_lens     ro   flushCollection.flush  sX    <<#LLd#ll--/G))+7D499DIDL	 $r}   c                    U R                   (       d  U R                  b  U R                  R                  5       (       ar  U R                  S;   a  U R	                  5         [
        R                  S5        U R                  R                  5         [
        R                  S5        SU l        SU l        U R                  (       a!  U R                  R                  5         SU l	        SU l         gg)z@In append or write mode, flushes data to disk, then ends access.Nr5   zFlushed bufferzStopped sessionT)r6   rC   isactiverV   r   logdebugr   rD   rd   closerz   s    ro   r  Collection.close  s    ||||'DLL,A,A,C,C99
*JJL		*+!!#		+,# $yy		! 	DL r}   c                     U R                   $ )z6``False`` if data can be accessed, otherwise ``True``.)r6   rz   s    ro   rs   Collection.closed  s     ||r}   c                     U R                   R                  [        5       5        [        R                  " S5      R                  U R                  5        U $ Nzfiona.ogrext)rd   enter_contextr   logging	getLogger	addFilterrc   rz   s    ro   	__enter__Collection.__enter__  s<    		 1 34.)33D4N4NOr}   c                     [         R                  " S5      R                  U R                  5        U R	                  5         g r  )r  r  removeFilterrc   r  )re   r   value	tracebacks       ro   __exit__Collection.__exit__  s*    .)66t7Q7QR

r}   c                 H    U R                   (       d  U R                  5         g g r   )r6   r  rz   s    ro   __del__Collection.__del__  s     ||JJL r}   )rP   rF   r6   rI   rJ   rG   rd   rE   rH   rb   rK   r4   rc   rM   rO   rL   rD   rS   rV   rU   rR   rC   )r'   NNNNNNNNNNFNNFr   )+__name__
__module____qualname____firstlineno____doc__rp   r{   r^   propertyra   r`   rf   ri   r   r   r   r   r   profiler   r   r   r   r   r   r   r   r   r*   r   r   r   r   r   r   rY   r   r  rs   r  r  r  __static_attributes__ r}   ro   r$   r$   )   sb    "'#@D
F   	 	    2.56E2 
 
 GB DB- F
# D.&$	4W&  -^     
r}   r$   r   Nonec                    U S   n[        U[        5      (       d  Uc  U4n[        5       nU Hf  n[        U5      R                  S5      nUS:X  d  US:X  a  UR	                  [
        5        M@  U[
        ;  a  [        U5      eUR                  U5        Mh     US:X  aD  SU;  a>  [        U5       H/  nUR                  S5      (       a  M  UR                  SU-   5        M1     U$ )z6Returns a set of geometry types the schema will acceptr2   r   UnknownAnyr.   r   r   )
r7   r8   r   r   r[   ALL_GEOMETRY_TYPESr   addrA   
startswith)r`   ra   schema_geom_typevalid_types	geom_types        ro   r_   r_     s    j)"C((,<,D,.%K%		N))%0		!Y%%712 2229==OOI& & !!g[&@k*I''00) 34 + r}   c                 8    U SS R                  S5      (       a  gg)zVDetect compression type of bytesbuf.

ZIP only. TODO: add others relevant to GDAL/OGR.N   s   PKzip )r*  )bytesbufs    ro   get_filetyper3    s!     |}--r}   c                   >   ^  \ rS rSrSrU 4S jrU 4S jrS rSrU =r	$ )BytesCollectioni  zjBytesCollection takes a buffer of bytes and maps that to
a virtual file that can then be opened by fiona.
c                 H  > SU l         [        U[        5      (       d  [        S5      eXl        [        U R                  5      nSnUS:X  a  SnOUR                  S5      S:X  a  Sn[        U R                  US	9U l        [        TU ](  " U R                  4S
U0UD6  SU l         g)zoTakes buffer of bytes whose contents is something we'd like
to open with Fiona and maps it to a virtual file.

Tzinput buffer must be bytesr1  r0  z.zipra   r   z.json)extrg   FN)r6   r7   bytesr?   r2  r3  r*   r   virtual_filesuperrp   )re   r2  r   filetyper7  	__class__s        ro   rp   BytesCollection.__init__  s    
 (E**9:: !  .uCXXh9,C24==cJ 	**AADAr}   c                    > [         TU ]  5         U R                  (       a$  [        U R                  5        SU l        SU l        gg)z3Removes the virtual file associated with the class.N)r:  r  r9  r   r2  )re   r<  s    ro   r  BytesCollection.close   s7     1 12 $D DM r}   c           
          SR                  U R                  =(       a    S=(       d    SU R                  S-   [        U R                  5      -   U R
                  [        [        U 5      5      5      $ )Nz*<{} BytesCollection '{}', mode '{}' at {}>rs   rt   ru   rv   rz   s    ro   r{   BytesCollection.__repr__  sP    ;BBKK$H.IIOc$))n,II4M	
 	
r}   )r6   r2  r9  )
r  r  r  r  r  rp   r  r{   r"  __classcell__)r<  s   @ro   r5  r5    s    <!
 
r}   r5  ):r  
contextlibr   r  pathlibr   r   fionar   r   fiona.ogrextr   r   r	   r
   r   r   r   r   fiona.errorsr   r   r   r   r   r   fiona.logutilsr   	fiona.crsr   
fiona._envr   r   	fiona.envr   r   fiona.drvsupportr   r   r   r   r   fiona._pathr    r!   r"   r   r   r  r  r  r$   r   r(  r)  r_   r3  r5  )r-  s   0ro   <module>rN     s    ;       > > 0 T T  .  D ' 0  6 5 -. *, !G
 G
X (..00I	! 	&/6&9 	0 
   v 01
j 1
Us    
DDD