
    nj|                    h   S SK Jr  \(       d  S\;   a  SSKJr  OS SKr S SKrS r
S rS rS	 r " S
 S\5      r\R                   r\R"                  r\R$                  r\R&                  r\R(                  r\R*                  r\R,                  r\R.                  r\R0                  r\R2                  r\R4                  r\R6                  r\R8                  r\R:                  r\R<                  r\R>                  r\R@                  r \RB                  r!\RD                  r"\RF                  r#\RH                  r$\RJ                  r%\RL                  r&\RN                  r'\RP                  r(\RR                  r)\RT                  r*\RV                  r+\RX                  r,\RZ                  r-\R\                  r.\R^                  r/\R`                  r0\Rb                  r1\Rd                  r2\Rf                  r3\Rh                  r4\Rj                  r5\Rl                  r6\Rn                  r7\Rp                  r8\Rr                  r9\Rt                  r:\Rv                  r;\Rx                  r<\Rz                  r=\R|                  r>\R~                  r?\R                  r@\R                  rA\R                  rB\R                  rC\R                  rD\R                  rE\R                  rF\R                  rG\R                  rH\R                  rI\R                  rJ\R                  rK\R                  rL\R                  rM\R                  rN\R                  rO\R                  rP\R                  rQ\R                  rR\R                  rS\R                  rT\R                  rU\R                  rV\R                  rW\R                  rX\R                  rY\R                  rZ\R                  r[\R                  r\\R                  r]\R                  r^\R                  r_\R                  r`\R                  ra\R                  rb\R                  rc\R                  rd\R                  re\R                  rf\R                  rg\R                  rh\R                  ri\R                  rj\R                  rk\R                  rl\R                  rm\R                  rn\R                  ro\R                  rp\R                  rq\R                  rr\R                  rs\R                  rt\R                  ru\R                  rv\R                  rw\R                  rx\R                  ry\R                  rz\R                  r{\R                  r|\R                  r}\R                  r~\R                  r\GR                   r\GR                  r\GR                  r\GR                  r\GR                  r\GR
                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                   r\GR"                  r\GR$                  r\GR&                  r\GR(                  r\GR*                  r\GR,                  r\GR.                  r\GR0                  r\GR2                  r\GR4                  r\GR6                  r\GR8                  r\GR:                  r\GR<                  r\GR>                  r\GR@                  r\GRB                  r\GRD                  r\GRF                  r\GRH                  r\GRJ                  r\GRL                  r\GRN                  r\GRP                  r\GRR                  r\GRT                  r\GRV                  r\GRX                  r\GRZ                  r\GR\                  r\GR^                  r\GR`                  r\GRb                  r\GRd                  r\GRf                  r\GRh                  r\GRj                  r\GRl                  r\GRn                  r\GRp                  r\GRr                  r\GRt                  r\GRv                  r\GRx                  r\GRz                  r\GR|                  r\GR~                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  r\GR                  rS rS rS rS rS rS r " S S\5      rS rS rSrS rSSKJr   " S S\5      r\GR                  " \5        S rS rS r " S S\5      r\GR                  " \5         " S  S!\5      r\GR                  " \5         " S" S#\5      r\GR                  " \5         " S$ S%\5      r\GR                  " \5         " S& S'\5      r\GR                  " \5         " S( S)\5      r\GR                  " \5         " S* S+\5      r\GR                  " \5         " S, S-\5      r\GR                  " \5         " S. S/\5      r\GR                  " \5         " S0 S1\5      r\GR                  " \5         " S2 S3\5      r\GR                  " \5        S4 rS5 rS6 rS7 rS8 rS9 rS: rS; rS< rS= rS> rS? rS@ r " SA SB\5      Gr \GR                  " G\ 5         " SC SD\5      Gr\GR                  " G\5         " SE SF\5      Gr\GR
                  " G\5         " SG SH\5      Gr\GR                  " G\5        SI GrSJ Gr	SK Gr
SL GrSM GrSN GrSO GrSP GrSQ GrSR GrSS GrST GrSU GrSV GrSW GrSX GrSY GrSZ GrS[ GrS\ GrS] GrS^ GrS_ GrS` GrSa Gr Sb Gr!Sc Gr"Sd Gr#Se Gr$Sf Gr%Sg Gr&Sh Gr'Si Gr(\GRR                  Gr)g! \	 a    S SKr GNf = f)j    )version_info.   )_ogrNc                      SU R                   R                  5       -   nSU R                  R
                  < SU R                  R                  < SU< S3$ ! [        R                   a    Sn NOf = f)Nz	proxy of  <r   z; z >)this__repr____builtin__	Exception	__class__
__module____name__)selfstrthiss     E/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/osgeo/ogr.py
_swig_reprr      s_    		 2 2 44 "^^668O8OQXZZ    s   A A/.A/c                    ^  U 4S jnU$ )Nc                   > US:X  a
  T" XU5        g US:X  a  U R                   R                  U5        g [        X5      (       a2  [        [	        [        U 5      U5      [        5      (       a
  T" XU5        g [        SU -  5      e)Nr
   thisownz(You cannot add instance attributes to %s)r
   ownhasattr
isinstancegetattrtypepropertyAttributeError)r   namevaluesets      r   set_instance_attrE_swig_setattr_nondynamic_instance_variable.<locals>.set_instance_attr   si    6>E"YIIMM% T  ZT
D0I8%T%TE" !Kd!RSS     )r!   r"   s   ` r   *_swig_setattr_nondynamic_instance_variabler&      s    T r$   c                    ^  U 4S jnU$ )Nc                    > [        X5      (       a(  [        [        X5      [        5      (       d
  T" XU5        g [	        SU -  5      e)Nz%You cannot add class attributes to %s)r   r   r   r   r   )clsr   r    r!   s      r   set_class_attr?_swig_setattr_nondynamic_class_variable.<locals>.set_class_attr)   s:    3j1CX&N&N5! !H3!NOOr$   r%   )r!   r*   s   ` r   '_swig_setattr_nondynamic_class_variabler,   (   s    P
 r$   c                    ^  U 4S jnU$ )zlClass decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclassc                 p   > T" U R                   U R                  U R                  R                  5       5      $ N)r   	__bases____dict__copy)r)   	metaclasss    r   wrapper$_swig_add_metaclass.<locals>.wrapper3   s'    s}}cll6G6G6IJJr$   r%   )r3   r4   s   ` r   _swig_add_metaclassr6   1   s    KNr$   c                   <    \ rS rSrSr\" \R                  5      rSrg)_SwigNonDynamicMeta8   zKMeta class to enforce nondynamic attributes (no new attributes) for a classr%   N)	r   r   __qualname____firstlineno____doc__r,   r   __setattr____static_attributes__r%   r$   r   r8   r8   8   s    U9$:J:JKKr$   r8   c                  (    [         R                  " U 6 $ )zGetUseExceptions() -> int)r   GetUseExceptionsargss    r   r@   r@           $''r$   c                  (    [         R                  " U 6 $ )z_GetExceptionsLocal() -> int)r   _GetExceptionsLocalrA   s    r   rE   rE         ##T**r$   c                  (    [         R                  " U 6 $ )z_SetExceptionsLocal(int bVal))r   _SetExceptionsLocalrA   s    r   rH   rH     rF   r$   c                  (    [         R                  " U 6 $ )z_UseExceptions())r   _UseExceptionsrA   s    r   rJ   rJ         %%r$   c                  (    [         R                  " U 6 $ )z_DontUseExceptions())r   _DontUseExceptionsrA   s    r   rM   rM         ""D))r$   c                  (    [         R                  " U 6 $ )z+_UserHasSpecifiedIfUsingExceptions() -> int)r   "_UserHasSpecifiedIfUsingExceptionsrA   s    r   rP   rP     s    22D99r$   c                   .    \ rS rSrSrSS jrS rS rSrg)	ExceptionMgri  a;  
Context manager to manage Python Exception state
for GDAL/OGR/OSR/GNM.

Separate exception state is maintained for each
module (gdal, ogr, etc), and this class appears independently
in all of them. This is built in top of calls to the older
UseExceptions()/DontUseExceptions() functions.

Example::

    >>> print(gdal.GetUseExceptions())
    0
    >>> with gdal.ExceptionMgr():
    ...     # Exceptions are now in use
    ...     print(gdal.GetUseExceptions())
    1
    >>>
    >>> # Exception state has now been restored
    >>> print(gdal.GetUseExceptions())
    0

c                     Xl         g)z;
Save whether or not this context will be using exceptions
N)requestedUseExceptions)r   useExceptionss     r   __init__ExceptionMgr.__init__  s
     '4#r$   c                     [        5       U l        [        U R                  5        [        R
                  S:X  a+   SSKJn  U(       a  UR                  U R                  5        ggg! [         a    Sn N3f = f)zm
On context entry, save the current GDAL exception state, and
set it to the state requested for the context


osgeo.gdalr   
gdal_arrayN)	rE   currentUseExceptionsrH   rT   rR   r   r   r[   ImportError)r   r[   s     r   	__enter__ExceptionMgr.__enter__  sl     %8$9!D778""l2"( ..t/J/JK  3  "!
"s   A% %A43A4c                     [        U R                  5        [        R                  S:X  a+   SSKJn  U(       a  UR                  U R                  5        ggg! [         a    Sn N3f = f)za
On exit, restore the GDAL/OGR/OSR/GNM exception state which was
current on entry to the context
rY   r   rZ   N)rH   r\   rR   r   r   r[   r]   )r   exc_typeexc_valexc_tbr[   s        r   __exit__ExceptionMgr.__exit__  sa    
 	D556""l2"( ..t/H/HI  3  "!
"s   A A%$A%)r\   rT   N)T)	r   r   r:   r;   r<   rV   r^   rd   r>   r%   r$   r   rR   rR     s    .4L Jr$   rR   c                      SSK Jn   U R                  5          SSK Jn  UR                  5          SSK Jn  UR                  5          SSK Jn  UR                  " 5          SSK Jn  UR                  5         g! [         a     Njf = f! [         a     Ncf = f! [         a     N\f = f! [         a     NTf = f! [         a     gf = f)zEnable exceptions in all GDAL related modules (osgeo.gdal, osgeo.ogr, osgeo.osr, osgeo.gnm).
Note: prior to GDAL 3.7, this only affected the calling moduler   gdalrZ   ogrosrgnmN)r   rh   rJ   r]   r[   rj   rl   rn   rh   r[   rj   rl   rn   s        r   UseExceptionsrp     s     !!#'  
  
  
  
  W   A6 B B B& B6 6
BB
BB
B#"B#&
B32B36
CCc                      SSK Jn   U R                  5          SSK Jn  UR                  5          SSK Jn  UR                  5          SSK Jn  UR                  " 5          SSK Jn  UR                  5         g! [         a     Njf = f! [         a     Ncf = f! [         a     N\f = f! [         a     NTf = f! [         a     gf = f)zDisable exceptions in all GDAL related modules (osgeo.gdal, osgeo.ogr, osgeo.osr, osgeo.gnm).
Note: prior to GDAL 3.7, this only affected the calling moduler   rg   rZ   ri   rk   rm   N)r   rh   rM   r]   r[   rj   rl   rn   ro   s        r   DontUseExceptionsrs   )  s    ! %%'   '  
  
  
  
  rq   Fc                      SSK Jn   [        U S5      (       d2  [        5       (       d"  SU l        SS KnUR                  S[        5        g g g )Nr   rg   2hasWarnedAboutUserHasNotSpecifiedIfUsingExceptionsTr   zNeither ogr.UseExceptions() nor ogr.DontUseExceptions() has been explicitly called. In GDAL 4.0, exceptions will be enabled by default.)r   rh   r   rP   ru   warningswarnFutureWarning)rh   rv   s     r   +_WarnIfUserHasNotSpecifiedIfUsingExceptionsry   L  sG    4MNNWyW{W{BF?BCP	R X|Nr$   rk   c                   p    \ rS rSrSr\" S S SS9rS r\r	S r
S	 rS
 rS rS rS rS rS rSS jrSrg)MajorObjectiV  z)Proxy of C++ GDALMajorObjectShadow class.c                 6    U R                   R                  5       $ r/   r
   r   xs    r   <lambda>MajorObject.<lambda>Y      r$   c                 8    U R                   R                  U5      $ r/   r}   r   vs     r   r   r   Y      AFFJJqMr$   The membership flagdocc                     [        S5      eNzNo constructor definedr   r   rB   kwargss      r   rV   MajorObject.__init__[      566r$   c                 0    [         R                  " U /UQ76 $ )z0GetDescription(MajorObject self) -> char const *)r   MajorObject_GetDescriptionr   rB   s     r   GetDescriptionMajorObject.GetDescription_      ..t;d;;r$   c                 0    [         R                  " U /UQ76 $ )z9SetDescription(MajorObject self, char const * pszNewDesc))r   MajorObject_SetDescriptionr   s     r   SetDescriptionMajorObject.SetDescriptionc  r   r$   c                 0    [         R                  " U /UQ76 $ )z2GetMetadataDomainList(MajorObject self) -> char **)r   !MajorObject_GetMetadataDomainListr   s     r   GetMetadataDomainList!MajorObject.GetMetadataDomainListg  s    55dBTBBr$   c                 0    [         R                  " U /UQ76 $ )zHGetMetadata_Dict(MajorObject self, char const * pszDomain="") -> char **)r   MajorObject_GetMetadata_Dictr   s     r   GetMetadata_DictMajorObject.GetMetadata_Dictk      00===r$   c                 0    [         R                  " U /UQ76 $ )zHGetMetadata_List(MajorObject self, char const * pszDomain="") -> char **)r   MajorObject_GetMetadata_Listr   s     r   GetMetadata_ListMajorObject.GetMetadata_Listo  r   r$   c                 0    [         R                  " U /UQ76 $ )z
SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain="") -> CPLErr
SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain="") -> CPLErr
)r   MajorObject_SetMetadatar   s     r   SetMetadataMajorObject.SetMetadatas  s    
 ++D8488r$   c                 0    [         R                  " U /UQ76 $ )zbGetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain="") -> char const *)r   MajorObject_GetMetadataItemr   s     r   GetMetadataItemMajorObject.GetMetadataItemz      //<t<<r$   c                 0    [         R                  " U /UQ76 $ )zsSetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain="") -> CPLErr)r   MajorObject_SetMetadataItemr   s     r   SetMetadataItemMajorObject.SetMetadataItem~  r   r$   c                 X    US S S:X  a  U R                  U5      $ U R                  U5      $ )N   zxml:)r   r   )r   domains     r   GetMetadataMajorObject.GetMetadata  s2    	v	$$V,,""6**r$   r%   N)r   )r   r   r:   r;   r<   r   r   rV   r   r   r   r   r   r   r   r   r   r   r   r>   r%   r$   r   r{   r{   V  sN    4-/IOdeG7H<<C>>9==+r$   r{   c                  (    [         R                  " U 6 $ )zGetGEOSVersionMajor() -> int)r   GetGEOSVersionMajorrA   s    r   r   r     rF   r$   c                  (    [         R                  " U 6 $ )zGetGEOSVersionMinor() -> int)r   GetGEOSVersionMinorrA   s    r   r   r     rF   r$   c                  (    [         R                  " U 6 $ )zGetGEOSVersionMicro() -> int)r   GetGEOSVersionMicrorA   s    r   r   r     rF   r$   c                   x    \ rS rSrSr\" S S SS9r\rS r	\
R                  rS rS	 rS
 rS rS rS rS rSrg)
StyleTablei  z'Proxy of C++ OGRStyleTableShadow class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   StyleTable.<lambda>  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r     r   r$   r   r   c                 T    [         R                  " U [         R                  " U6 5        g)z'__init__(StyleTable self) -> StyleTableN)r   StyleTable_swiginitnew_StyleTabler   s     r   rV   StyleTable.__init__        t':':D'ABr$   c                 0    [         R                  " U /UQ76 $ )zSAddStyle(StyleTable self, char const * pszName, char const * pszStyleString) -> int)r   StyleTable_AddStyler   s     r   AddStyleStyleTable.AddStyle      ''4t44r$   c                 0    [         R                  " U /UQ76 $ )z>LoadStyleTable(StyleTable self, char const * utf8_path) -> int)r   StyleTable_LoadStyleTabler   s     r   LoadStyleTableStyleTable.LoadStyleTable      --d:T::r$   c                 0    [         R                  " U /UQ76 $ )z>SaveStyleTable(StyleTable self, char const * utf8_path) -> int)r   StyleTable_SaveStyleTabler   s     r   SaveStyleTableStyleTable.SaveStyleTable  r   r$   c                 0    [         R                  " U /UQ76 $ )z;Find(StyleTable self, char const * pszName) -> char const *)r   StyleTable_Findr   s     r   FindStyleTable.Find      ##D0400r$   c                 0    [         R                  " U /UQ76 $ )z(ResetStyleStringReading(StyleTable self))r   "StyleTable_ResetStyleStringReadingr   s     r   ResetStyleStringReading"StyleTable.ResetStyleStringReading  s    66tCdCCr$   c                 0    [         R                  " U /UQ76 $ )z-GetNextStyle(StyleTable self) -> char const *)r   StyleTable_GetNextStyler   s     r   GetNextStyleStyleTable.GetNextStyle      ++D8488r$   c                 0    [         R                  " U /UQ76 $ )z1GetLastStyleName(StyleTable self) -> char const *)r   StyleTable_GetLastStyleNamer   s     r   GetLastStyleNameStyleTable.GetLastStyleName  r   r$   r%   N)r   r   r:   r;   r<   r   r   r   r   rV   r   delete_StyleTable__swig_destroy__r   r   r   r   r   r   r   r>   r%   r$   r   r   r     sS    2-/IOdeGHC --5;;1D9=r$   r   c                       \ rS rSrSr\" S S SS9rS r\r	\" \
R                  SS9rS	 rS
 rS rS rS rS rS rS rSrg)Driveri  z#Proxy of C++ OGRDriverShadow class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   Driver.<lambda>  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r     r   r$   r   r   c                     [        S5      er   r   r   s      r   rV   Driver.__init__  r   r$   name : p.q(const).charc                 6    [         R                  " U /UQ70 UD6$ )zYCreateDataSource(Driver self, char const * utf8_path, char ** options=None) -> DataSource)r   Driver_CreateDataSourcer   s      r   CreateDataSourceDriver.CreateDataSource  s    ++DB4B6BBr$   c                 6    [         R                  " U /UQ70 UD6$ )zkCopyDataSource(Driver self, DataSource copy_ds, char const * utf8_path, char ** options=None) -> DataSource)r   Driver_CopyDataSourcer   s      r   CopyDataSourceDriver.CopyDataSource      ))$@@@@r$   c                 J    [        5         [        R                  " U /UQ70 UD6$ )zEOpen(Driver self, char const * utf8_path, int update=0) -> DataSource)ry   r   Driver_Openr   s      r   OpenDriver.Open  s'     	45 6t6v66r$   c                 0    [         R                  " U /UQ76 $ )z<DeleteDataSource(Driver self, char const * utf8_path) -> int)r   Driver_DeleteDataSourcer   s     r   DeleteDataSourceDriver.DeleteDataSource  r   r$   c                 0    [         R                  " U /UQ76 $ )z5TestCapability(Driver self, char const * cap) -> bool)r   Driver_TestCapabilityr   s     r   TestCapabilityDriver.TestCapability      ))$666r$   c                 0    [         R                  " U /UQ76 $ )z$GetName(Driver self) -> char const *)r   Driver_GetNamer   s     r   GetNameDriver.GetName      ""4/$//r$   c                 0    [         R                  " U /UQ76 $ )zRegister(Driver self))r   Driver_Registerr   s     r   RegisterDriver.Register  r   r$   c                 0    [         R                  " U /UQ76 $ )zDeregister(Driver self))r   Driver_Deregisterr   s     r   
DeregisterDriver.Deregister      %%d2T22r$   r%   N)r   r   r:   r;   r<   r   r   rV   r   r   r   Driver_name_getr   r   r   r   r  r  r  r  r  r>   r%   r$   r   r   r     s]    .-/IOdeG7HD((.KLDCA797013r$   r   c                   L   \ rS rSrSr\" S S SS9rS r\r	\" \
R                  SS9r\
R                  rS	 rS
 rS rS rS rS rS-S jrS rS rS rS rS rS rS rS.S jrS rS rS r S r!S r"S r#S r$S  r%S! r&S" r'S# r(S$ r)S% r*S& r+S' r,S( r-S/S) jr.S0S* jr/S+ r0S,r1g)1
DataSourcei  z

Python proxy of a vector :cpp:class:`GDALDataset`.

Since GDAL 3.8, a DataSource can be used as a context manager.
When exiting the context, the DataSource will be closed and
features will be written to disk.

c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   DataSource.<lambda>  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r    r   r$   r   r   c                     [        S5      er   r   r   s      r   rV   DataSource.__init__  r   r$   r   c                 p    [         R                  " U /UQ76 nSU l        SU l        U R	                  5         U$ )a.  
Close(DataSource self) -> CPLErr

Closes opened dataset and releases allocated resources.

This method can be used to force the dataset to close
when one more references to the dataset are still
reachable. If Close is never called, the dataset will
be closed automatically during garbage collection.

r   N)r   DataSource_Closer   r
   _invalidate_layersr   rB   vals      r   CloseDataSource.Close  s8     ##D040	!
r$   c                 0    [         R                  " U /UQ76 $ )zY
GetRefCount(DataSource self) -> int
int
OGR_DS_GetRefCount(OGRDataSourceH hDataSource) 
)r   DataSource_GetRefCountr   s     r   GetRefCountDataSource.GetRefCount  s     **47$77r$   c                 0    [         R                  " U /UQ76 $ )zg
GetSummaryRefCount(DataSource self) -> int
int
OGR_DS_GetSummaryRefCount(OGRDataSourceH hDataSource) 
)r   DataSource_GetSummaryRefCountr   s     r   GetSummaryRefCountDataSource.GetSummaryRefCount"  s     11$>>>r$   c                 0    [         R                  " U /UQ76 $ )aJ  
GetLayerCount(DataSource self) -> int
int
OGR_DS_GetLayerCount(OGRDataSourceH hDS)

Get the number of layers in this data source.

Deprecated Use GDALDatasetGetLayerCount() in GDAL 2.0

Parameters
-----------
hDS:
    handle to the data source from which to get the number of
    layers.

Returns
--------
int:
    layer count.

)r   DataSource_GetLayerCountr   s     r   GetLayerCountDataSource.GetLayerCount*      , ,,T9D99r$   c                 0    [         R                  " U /UQ76 $ )a$  
GetDriver(DataSource self) -> Driver
OGRSFDriverH
OGR_DS_GetDriver(OGRDataSourceH hDS)

Returns the driver that the dataset was opened with.

NOTE: Starting with GDAL 2.0, it is NOT safe to cast the returned
handle to OGRSFDriver\*. If a C++ object is needed, the handle should
be cast to GDALDriver\*.

Deprecated Use GDALGetDatasetDriver() in GDAL 2.0

Parameters
-----------
hDS:
    handle to the datasource

Returns
--------
OGRSFDriverH:
    NULL if driver info is not available, or pointer to a driver owned by
    the OGRSFDriverManager.

)r   DataSource_GetDriverr   s     r   	GetDriverDataSource.GetDriverB  s    4 ((555r$   c                 0    [         R                  " U /UQ76 $ )al  
GetName(DataSource self) -> char const *
const char\*
OGR_DS_GetName(OGRDataSourceH hDS)

Returns the name of the data source.

This string should be sufficient to open the data source if passed to
the same OGRSFDriver that this data source was opened with, but it
need not be exactly the same string that was used to open the data
source. Normally this is a filename.

Deprecated Use GDALGetDescription() in GDAL 2.0

Parameters
-----------
hDS:
    handle to the data source to get the name from.

Returns
--------
str:
    pointer to an internal name string which should not be modified or
    freed by the caller.

)r   DataSource_GetNamer   s     r   r  DataSource.GetName^  s    6 &&t3d33r$   c                    [        U[        5      (       ak  [        U R                  5       5       H@  nU R	                  U5      nUR                  5       U:X  d  M*  [        R                  " X5      s  $    [        SU-  5      e[        U[        5      (       a  [        R                  " X5      $ [        S[        U5      -  5      e)a  
DeleteLayer(DataSource self, value) -> OGRErr

Delete the indicated layer from the datasource.

For more details: :c:func:`OGR_DS_DeleteLayer`

Parameters
-----------
value: str | int
    index or name of the layer to delete.

Returns
-------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success, or :py:const:`osgeo.ogr.OGRERR_UNSUPPORTED_OPERATION` if deleting
    layers is not supported for this datasource.
zLayer %s not found to delete%Input %s is not of String or Int type)r   strranger1  GetLayerr  r   DataSource_DeleteLayer
ValueErrorint	TypeErrorr   )r   r    ilyrs       r   DeleteLayerDataSource.DeleteLayer{  s    ( eS!!4--/0mmA&;;=E)66t?? 1 ;eCDDs##..t;;Cd5kQRRr$   c                 0    [         R                  " U /UQ76 $ )z
SyncToDisk(DataSource self) -> OGRErr
OGRErr
OGR_DS_SyncToDisk(OGRDataSourceH hDS)

Flush pending changes to disk.

See GDALDataset::FlushCache() 
)r   DataSource_SyncToDiskr   s     r   
SyncToDiskDataSource.SyncToDisk  s     ))$666r$   c                 0    [         R                  " U /UQ76 $ )zFlushCache(DataSource self))r   DataSource_FlushCacher   s     r   
FlushCacheDataSource.FlushCache  r	  r$   c                 \    [         R                  " U /UQ70 UD6nU R                  U5        U$ )a   
CreateLayer(DataSource self, char const * name, SpatialReference srs=None, OGRwkbGeometryType geom_type=wkbUnknown, char ** options=None) -> Layer
OGRLayerH
OGR_DS_CreateLayer(OGRDataSourceH hDS, const char \*pszName,
OGRSpatialReferenceH hSpatialRef, OGRwkbGeometryType eType, char
\*\*papszOptions)

This function attempts to create a new layer on the data source with
the indicated name, coordinate system, geometry type.

The papszOptions argument can be used to control driver specific
creation options. These options are normally documented in the format
specific documentation.

Deprecated Use GDALDatasetCreateLayer() in GDAL 2.0

Parameters
-----------
hDS:
    The dataset handle.pszName:  the name for the new layer. This should ideally not match
    any existing layer on the datasource.
hSpatialRef:
    handle to the coordinate system to use for the new
    layer, or NULL if no coordinate system is available. The driver might
    only increase the reference counter of the object to take ownership,
    and not make a full copy, so do not use OSRDestroySpatialReference(),
    but OSRRelease() instead when you are done with the object.
eType:
    the geometry type for the layer. Use wkbUnknown if there are
    no constraints on the types geometry to be written.
papszOptions:
    a StringList of name=value options. Options are driver
    specific, and driver information can be found at the following
    url:http://www.gdal.org/ogr_formats.html


Returns
--------
OGRLayerH:
    NULL is returned on failure, or a new OGRLayer handle on success.

)r   DataSource_CreateLayer_add_layer_refr   rB   r   r$  s       r   CreateLayerDataSource.CreateLayer  s4    V ))$@@@C  
r$   c                 \    [         R                  " U /UQ70 UD6nU R                  U5        U$ )a  
CopyLayer(DataSource self, Layer src_layer, char const * new_name, char ** options=None) -> Layer
OGRLayerH
OGR_DS_CopyLayer(OGRDataSourceH hDS, OGRLayerH hSrcLayer, const char
\*pszNewName, char \*\*papszOptions)

Duplicate an existing layer.

This function creates a new layer, duplicate the field definitions of
the source layer and then duplicate each features of the source layer.
The papszOptions argument can be used to control driver specific
creation options. These options are normally documented in the format
specific documentation. The source layer may come from another
dataset.

Deprecated Use GDALDatasetCopyLayer() in GDAL 2.0

Parameters
-----------
hDS:
    handle to the data source where to create the new layer
hSrcLayer:
    handle to the source layer.
pszNewName:
    the name of the layer to create.
papszOptions:
    a StringList of name=value options. Options are driver
    specific.

Returns
-------
OGRLayerH:
    a handle to the layer, or NULL if an error occurs.

)r   DataSource_CopyLayerrR  rS  s       r   	CopyLayerDataSource.CopyLayer  s4    H ''>t>v>C  
r$   c                 V    [         R                  " U /UQ76 nU R                  U5        U$ )z6GetLayerByIndex(DataSource self, int index=0) -> Layer)r   DataSource_GetLayerByIndexrR  r#  s      r   GetLayerByIndexDataSource.GetLayerByIndex  s,    --d:T:C  
r$   c                 V    [         R                  " U /UQ76 nU R                  U5        U$ )aQ  
GetLayerByName(DataSource self, char const * layer_name) -> Layer
OGRLayerH
OGR_DS_GetLayerByName(OGRDataSourceH hDS, const char \*pszLayerName)

Fetch a layer by name.

The returned layer remains owned by the OGRDataSource and should not
be deleted by the application.

Deprecated Use GDALDatasetGetLayerByName() in GDAL 2.0

Parameters
-----------
hDS:
    handle to the data source from which to get the layer.
pszLayerName:
    Layer the layer name of the layer to fetch.


Returns
--------
OGRLayerH:
    a handle to the layer, or NULL if the layer is not found or an error
    occurs.

)r   DataSource_GetLayerByNamerR  r#  s      r   GetLayerByNameDataSource.GetLayerByName  s.    8 ,,T9D9C  
r$   c                 0    [         R                  " U /UQ76 $ )a  
TestCapability(DataSource self, char const * cap) -> bool
int
OGR_DS_TestCapability(OGRDataSourceH hDS, const char \*pszCapability)

Test if capability is available.

One of the following data source capability names can be passed into
this function, and a TRUE or FALSE value will be returned indicating
whether or not the capability is available for this object.

ODsCCreateLayer: True if this datasource can create new layers.

ODsCDeleteLayer: True if this datasource can delete existing layers.

ODsCCreateGeomFieldAfterCreateLayer: True if the layers of this
datasource support CreateGeomField() just after layer creation.

ODsCCurveGeometries: True if this datasource supports writing curve
geometries. (GDAL 2.0). In that case, OLCCurveGeometries must also be
declared in layers of that dataset.

The #define macro forms of the capability names should be used in
preference to the strings themselves to avoid misspelling.

Deprecated Use GDALDatasetTestCapability() in GDAL 2.0

Parameters
-----------
hDS:
    handle to the data source against which to test the capability.
pszCapability:
    the capability to test.

Returns
--------
int:
    TRUE if capability available otherwise FALSE.

)r   DataSource_TestCapabilityr   s     r   r  DataSource.TestCapability9  s    R --d:T::r$   Nc                     [         R                  " XX#5      nU(       a.  SSKnSUl        UR	                  U 5      Ul        U(       a  Xl        U$ )a  ExecuteSQL(self, statement, spatialFilter: ogr.Geometry = None, dialect: Optional[str] = "", keep_ref_on_ds=False) -> ogr.Layer

Execute a SQL statement against the dataset

The result of a SQL query is:
  - None (or an exception if exceptions are enabled) for statements
    that are in error
  - or None for statements that have no results set,
  - or a ogr.Layer handle representing a results set from the query.

Note that this ogr.Layer is in addition to the layers in the data store
and must be released with ReleaseResultSet() before the data source is closed
(destroyed).

Starting with GDAL 3.7, this method can also be used as a context manager,
as a convenient way of automatically releasing the returned result layer.

For more information on the SQL dialect supported internally by OGR
review the OGR SQL document (:ref:`ogr_sql_sqlite_dialect`)
Some drivers (i.e. Oracle and PostGIS) pass the SQL directly through to the
underlying RDBMS.

The SQLITE dialect can also be used (:ref:`sql_sqlite_dialect`)

Parameters
----------
statement:
    the SQL statement to execute (e.g "SELECT * FROM layer")
spatialFilter:
    a geometry which represents a spatial filter. Can be None
dialect:
    allows control of the statement dialect. If set to None or empty string,
    the OGR SQL engine will be used, except for RDBMS drivers that will
    use their dedicated SQL engine, unless OGRSQL is explicitly passed as
    the dialect. The SQLITE dialect can also be used.
keep_ref_on_ds:
    whether the returned layer should keep a (strong) reference on
    the current dataset. Cf example 2 for a use case.

Returns
-------
ogr.Layer:
    a ogr.Layer containing the results of the query, that will be
    automatically released when the context manager goes out of scope.

Examples
--------
1. Use as a context manager:

>>> with ds.ExecuteSQL("SELECT * FROM layer") as lyr:
...     print(lyr.GetFeatureCount())

2. Use keep_ref_on_ds=True to return an object that keeps a reference to its dataset:

>>> def get_sql_lyr():
...     return gdal.OpenEx("test.shp").ExecuteSQL("SELECT * FROM test", keep_ref_on_ds=True)
...
... with get_sql_lyr() as lyr:
...     print(lyr.GetFeatureCount())
r   NT)r   DataSource_ExecuteSQLweakref_to_releaseref_dataset_weak_ref_dataset_strong_ref)r   	statementspatialFilterdialectkeep_ref_on_dssql_lyrrg  s          r   
ExecuteSQLDataSource.ExecuteSQLd  sD    | ,,TmU"&G(/D(9G%.2+r$   c                 0    [         R                  " U /UQ76 $ )z#AbortSQL(DataSource self) -> OGRErr)r   DataSource_AbortSQLr   s     r   AbortSQLDataSource.AbortSQL  r   r$   c                     U(       a  [        US5      (       d  [        S5      e[        R                  " X5        U(       a  SUl        SUl        gg)zReleaseResultSet(self, sql_lyr: ogr.Layer)

Release ogr.Layer returned by ExecuteSQL() (when not called as an execution manager)

The sql_lyr object is invalidated after this call.

Parameters
----------
sql_lyr:
    ogr.Layer got with ExecuteSQL()
rh  z^This layer was not returned by ExecuteSQL() and should not be released with ReleaseResultSet()N)r   r   r   DataSource_ReleaseResultSetr   r
   )r   rp  s     r   ReleaseResultSetDataSource.ReleaseResultSet  sC     77M::|}}((7"GOGL r$   c                 0    [         R                  " U /UQ76 $ )zy
GetStyleTable(DataSource self) -> StyleTable
OGRStyleTableH
OGR_DS_GetStyleTable(OGRDataSourceH hDS)

Get style table. 
)r   DataSource_GetStyleTabler   s     r   GetStyleTableDataSource.GetStyleTable       ,,T9D99r$   c                 0    [         R                  " U /UQ76 $ )z
SetStyleTable(DataSource self, StyleTable table)
void
OGR_DS_SetStyleTable(OGRDataSourceH hDS, OGRStyleTableH hStyleTable)

Set style table. 
)r   DataSource_SetStyleTabler   s     r   SetStyleTableDataSource.SetStyleTable  r  r$   c                 6    [         R                  " U /UQ70 UD6$ )z<StartTransaction(DataSource self, int force=FALSE) -> OGRErr)r   DataSource_StartTransactionr   s      r   StartTransactionDataSource.StartTransaction  s    //FtFvFFr$   c                 0    [         R                  " U /UQ76 $ )z,CommitTransaction(DataSource self) -> OGRErr)r   DataSource_CommitTransactionr   s     r   CommitTransactionDataSource.CommitTransaction  r   r$   c                 0    [         R                  " U /UQ76 $ )z.RollbackTransaction(DataSource self) -> OGRErr)r   DataSource_RollbackTransactionr   s     r   RollbackTransactionDataSource.RollbackTransaction  s    224?$??r$   c                 l    [         R                  " U 5        SU l        SU l        U R	                  5         gzbOnce called, self has effectively been destroyed.  Do not access. For backwards compatibility onlyr   Nr   delete_DataSourcer   r
   r"  r   s    r   DestroyDataSource.Destroy  *    
T"dldi
r$   c                 l    [         R                  " U 5        SU l        SU l        U R	                  5         gr  r  r  s    r   ReleaseDataSource.Release  r  r$   c                 "    U R                  5       $ )!For backwards compatibility only.)	Referencer  s    r   r  DataSource.Reference  s    ^^r$   c                 $    U R                  5         gr  N)Dereferencer  s    r   r  DataSource.Dereference  s    
r$   c                 "    U R                  5       $ )z.Returns the number of layers on the datasource)r1  r  s    r   __len__DataSource.__len__  s    !!##r$   c                     U $ r/   r%   r  s    r   r^   DataSource.__enter__  s    r$   c                 $    U R                  5         g r/   )r%  r   s     r   rd   DataSource.__exit__  s    

r$   c                 $    U R                  5         g r/   )r"  r  s    r   __del__DataSource.__del__	  s    !r$   c                 
   [        U[        5      (       at  / nUR                  (       a  UR                  OSn[        UR                  UR
                  U5       H,  nU R                  U5      nUc  Us  $ UR                  U5        M.     U$ [        U[        5      (       a)  U[        U 5      S-
  :  a  [        eU R                  U5      $ [        U[        5      (       a  U R                  U5      $ [        S[        U5      -  5      e)zSupport dictionary, list, and slice -like access to the datasource.
ds[0] would return the first layer on the datasource.
ds['aname'] would return the layer named "aname".
ds[0:4] would return a list of the first four layers.r   r<  )r   slicestepr>  startstopr?  appendrB  len
IndexErrorr=  rC  r   )r   r    outputr  rD  rE  s         r   __getitem__DataSource.__getitem__  s    
 eU##F!&5::D5;;

D9mmA&;!Mc"	 :
 MeS!!s4y1}$  ==''s##==''Cd5kQRRr$   c                     [        5         [        U[        5      (       a  U R                  [        U5      5      $ [        U[        5      (       a  U R                  U5      $ [        S[        U5      -  5      e)z)Return the layer given an index or a namer<  )ry   r   r=  r`  rB  r\  rC  r   )r   iLayers     r   r?  DataSource.GetLayer#  s_     	45fc""&&s6{33$$''//Cd6lRSSr$   c                 \    [        U S5      (       a  U R                   H
  nS Ul        M     g g )N_layer_references)r   r  r
   )r   rE  s     r   r"  DataSource._invalidate_layers/  s,    4,---- . .r$   c                     U(       d  g [        U S5      (       d  SS KnUR                  5       U l        U R                  R	                  U5        g )Nr  r   )r   rg  WeakSetr  add)r   rE  rg  s      r   rR  DataSource._add_layer_ref5  s<    t011%,__%6D"""3'r$   )r  r
   r   returnOGRErr)Nr   F)r   r/   )2r   r   r:   r;   r<   r   r   rV   r   r   r   DataSource_name_getr   r  r   r%  r)  r-  r1  r6  r  rF  rJ  rN  rT  rX  r\  r`  r  rq  ru  ry  r}  r  r  r  r  r  r  r  r  r  r^   rd   r  r  r?  r"  rR  r>   r%   r$   r   r  r    s     -/IOdeG7HD,,2OPD--.8?:0684:SB
770f)X!H);VER5 .::G>@
  $"S.
T 	(r$   r  c                   `    \ rS rSrSr\" S S SS9r\rS r	\
R                  rS rS	 rS
 rSrg)
ArrowArrayiC  zProxy of C++ ArrowArray class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   ArrowArray.<lambda>F  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r  F  r   r$   r   r   c                 T    [         R                  " U [         R                  " U6 5        g)z'__init__(ArrowArray self) -> ArrowArrayN)r   ArrowArray_swiginitnew_ArrowArrayr   s     r   rV   ArrowArray.__init__I  r   r$   c                 0    [         R                  " U /UQ76 $ )z)_getPtr(ArrowArray self) -> VoidPtrAsLong)r   ArrowArray__getPtrr   s     r   _getPtrArrowArray._getPtrN      &&t3d33r$   c                 0    [         R                  " U /UQ76 $ )z,GetChildrenCount(ArrowArray self) -> GIntBig)r   ArrowArray_GetChildrenCountr   s     r   GetChildrenCountArrowArray.GetChildrenCountR  r   r$   c                 0    [         R                  " U /UQ76 $ )z%GetLength(ArrowArray self) -> GIntBig)r   ArrowArray_GetLengthr   s     r   	GetLengthArrowArray.GetLengthV      ((555r$   r%   N)r   r   r:   r;   r<   r   r   r   r   rV   r   delete_ArrowArrayr   r  r  r  r>   r%   r$   r   r  r  C  s>    )-/IOdeGHC --4=6r$   r  c                   f    \ rS rSrSr\" S S SS9r\rS r	\
R                  rS rS	 rS
 rS rSrg)ArrowSchemai\  zProxy of C++ ArrowSchema class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   ArrowSchema.<lambda>_  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r  _  r   r$   r   r   c                 T    [         R                  " U [         R                  " U6 5        g)z)__init__(ArrowSchema self) -> ArrowSchemaN)r   ArrowSchema_swiginitnew_ArrowSchemar   s     r   rV   ArrowSchema.__init__b  s    !!$(<(<d(CDr$   c                 0    [         R                  " U /UQ76 $ )z*_getPtr(ArrowSchema self) -> VoidPtrAsLong)r   ArrowSchema__getPtrr   s     r   r  ArrowSchema._getPtrg  r   r$   c                 0    [         R                  " U /UQ76 $ )z)GetName(ArrowSchema self) -> char const *)r   ArrowSchema_GetNamer   s     r   r  ArrowSchema.GetNamek  r   r$   c                 0    [         R                  " U /UQ76 $ )z-GetChildrenCount(ArrowSchema self) -> GIntBig)r   ArrowSchema_GetChildrenCountr   s     r   r  ArrowSchema.GetChildrenCounto  r   r$   c                 0    [         R                  " U /UQ76 $ )z5GetChild(ArrowSchema self, int iChild) -> ArrowSchema)r   ArrowSchema_GetChildr   s     r   GetChildArrowSchema.GetChilds  r  r$   r%   N)r   r   r:   r;   r<   r   r   r   r   rV   r   delete_ArrowSchemar   r  r  r  r  r>   r%   r$   r   r  r  \  sC    *-/IOdeGHE ..55>6r$   r  c                   Z    \ rS rSrSr\" S S SS9rS r\r	\
R                  rS rS	 rS
rg)ArrowArrayStreamiy  z$Proxy of C++ ArrowArrayStream class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   ArrowArrayStream.<lambda>|  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r  |  r   r$   r   r   c                     [        S5      er   r   r   s      r   rV   ArrowArrayStream.__init__~  r   r$   c                 0    [         R                  " U /UQ76 $ )z/GetSchema(ArrowArrayStream self) -> ArrowSchema)r   ArrowArrayStream_GetSchemar   s     r   	GetSchemaArrowArrayStream.GetSchema  r   r$   c                 0    [         R                  " U /UQ76 $ )zMGetNextRecordBatch(ArrowArrayStream self, char ** options=None) -> ArrowArray)r   #ArrowArrayStream_GetNextRecordBatchr   s     r   GetNextRecordBatch#ArrowArrayStream.GetNextRecordBatch  s    77DtDDr$   r%   N)r   r   r:   r;   r<   r   r   rV   r   r   r   delete_ArrowArrayStreamr   r  r  r>   r%   r$   r   r  r  y  s7    /-/IOdeG7H33<Er$   r  c                      \ rS rSrSr\" S S SS9rS r\r	S r
S	 rS
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS r S r!S  r"S! r#S" r$S# r%S$ r&S% r'S& r(S' r)S( r*S) r+S* r,S+ r-S, r.S- r/S. r0S/ r1S0 r2S1 r3S2 r4S3 r5S4 r6S5 r7S6 r8S7 r9S8 r:S9 r;S: r<S; r=S< r>S= r?S> r@S? rAS@ rBSA rC\CrDSB rESC rFSD rGSE rHSF rISG rJ\" \J5      rJ/ 4SH jrK/ 4SI jrL/ 4SJ jrM/ 4SK jrN/ 4SL jrOSMrPgN)OLayeri  z"Proxy of C++ OGRLayerShadow class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   Layer.<lambda>  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r    r   r$   r   r   c                     [        S5      er   r   r   s      r   rV   Layer.__init__  r   r$   c                 0    [         R                  " U /UQ76 $ )z3Rename(Layer self, char const * new_name) -> OGRErr)r   Layer_Renamer   s     r   RenameLayer.Rename  s      ---r$   c                 0    [         R                  " U /UQ76 $ )zR
GetRefCount(Layer self) -> int

For more details: :cpp:func:`OGR_L_GetRefCount`

)r   Layer_GetRefCountr   s     r   r)  Layer.GetRefCount  s     %%d2T22r$   c                 0    [         R                  " U /UQ76 $ )a  
SetSpatialFilter(Layer self, Geometry filter)
SetSpatialFilter(Layer self, int iGeomField, Geometry filter)

Set a new spatial filter.

For more details:

- :cpp:func:`OGR_L_SetSpatialFilter`
- :cpp:func:`OGR_L_SetSpatialFilterEx`

Parameters
-----------
iGeomField: int, optional
    index of the geometry field on which the spatial filter operates.
filter: Geometry
    The geometry to use as a filtering region. None may
    be passed indicating that the current spatial filter should be
    cleared, but no new one instituted.

)r   Layer_SetSpatialFilterr   s     r   SetSpatialFilterLayer.SetSpatialFilter      , **47$77r$   c                 0    [         R                  " U /UQ76 $ )a  
SetSpatialFilterRect(Layer self, double minx, double miny, double maxx, double maxy)
SetSpatialFilterRect(Layer self, int iGeomField, double minx, double miny, double maxx, double maxy)

Set a new rectangular spatial filter.

For more details:

- :cpp:func:`OGR_L_SetSpatialFilterRect`
- :cpp:func:`OGR_L_SetSpatialFilterRectEx`

Parameters
-----------
iGeomField: int, optional
    index of the geometry field on which the spatial filter operates.
minx: float
    the minimum X coordinate for the rectangular region.
miny: float
    the minimum Y coordinate for the rectangular region.
maxx: float
    the maximum X coordinate for the rectangular region.
maxy: float
    the maximum Y coordinate for the rectangular region.

)r   Layer_SetSpatialFilterRectr   s     r   SetSpatialFilterRectLayer.SetSpatialFilterRect  s    4 ..t;d;;r$   c                 0    [         R                  " U /UQ76 $ )z
GetSpatialFilter(Layer self) -> Geometry

This function returns the current spatial filter for this layer.

For more details: :cpp:func:`OGR_L_GetSpatialFilter`

Returns
--------
Geometry:
    The spatial filter geometry.

)r   Layer_GetSpatialFilterr   s     r   GetSpatialFilterLayer.GetSpatialFilter       **47$77r$   c                 0    [         R                  " U /UQ76 $ )a  
SetAttributeFilter(Layer self, char * filter_string) -> OGRErr

Set a new attribute query.

For more details: :cpp:func:`OGR_L_SetAttributeFilter`

Parameters
-----------
filter_string: str
    query in restricted SQL WHERE format, or None to clear the
    current query.

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` if successfully installed,
    or an error code if the query expression is in error,
    or some other failure occurs.

)r   Layer_SetAttributeFilterr   s     r   SetAttributeFilterLayer.SetAttributeFilter  r3  r$   c                 0    [         R                  " U /UQ76 $ )z
ResetReading(Layer self)

Reset feature reading to start on the first feature.

For more details: :cpp:func:`OGR_L_ResetReading`

)r   Layer_ResetReadingr   s     r   ResetReadingLayer.ResetReading  s     &&t3d33r$   c                 0    [         R                  " U /UQ76 $ )z
GetName(Layer self) -> char const *

Return the layer name.

For more details: :cpp:func:`OGR_L_GetName`

Returns
--------
str:
    The layer name

)r   Layer_GetNamer   s     r   r  Layer.GetName
  s     !!$...r$   c                 0    [         R                  " U /UQ76 $ )a  
GetGeomType(Layer self) -> OGRwkbGeometryType

Return the layer geometry type.

For more details: :cpp:func:`OGR_L_GetGeomType`

Returns
--------
int:
    The geometry type code. The types can be found with
    'osgeo.ogr.wkb' prefix. For example :py:const:`osgeo.ogr.wkbPolygon`.

)r   Layer_GetGeomTyper   s     r   GetGeomTypeLayer.GetGeomType  s     %%d2T22r$   c                 0    [         R                  " U /UQ76 $ )a  
GetGeometryColumn(Layer self) -> char const *

This method returns the name of the underlying database column being
used as the geometry column, or '' if not supported.

For more details: :cpp:func:`OGR_L_GetGeometryColumn`

Returns
--------
str:
    geometry column name.

)r   Layer_GetGeometryColumnr   s     r   GetGeometryColumnLayer.GetGeometryColumn+  s     ++D8488r$   c                 0    [         R                  " U /UQ76 $ )z
GetFIDColumn(Layer self) -> char const *

This method returns the name of the underlying database column being
used as the FID column, or '' if not supported.

For more details: :cpp:func:`OGR_L_GetFIDColumn`

Returns
--------
str:
    fid column name.

)r   Layer_GetFIDColumnr   s     r   GetFIDColumnLayer.GetFIDColumn<  s     &&t3d33r$   c                 0    [         R                  " U /UQ76 $ )a  
GetFeature(Layer self, GIntBig fid) -> Feature

Fetch a feature by its identifier.

For more details: :cpp:func:`OGR_L_GetFeature`

Use :py:func:`TestCapability` with (:py:const:`osgeo.ogr.OLCRandomRead`)
to establish if this layer supports efficient random access reading via
:py:func:`GetFeature`; However, the call should always work if the feature exists.

Sequential reads (with :py:func:`GetNextFeature`) are generally
considered interrupted by a :py:func:`GetFeature` call.

Parameters
-----------
fid: int
    The feature id of the feature to read.

Returns
--------
Feature:
    A new feature now owned by the caller, or None on failure.
    The returned feature should be deleted with :py:func:`Destroy`.

)r   Layer_GetFeaturer   s     r   
GetFeatureLayer.GetFeatureM  s    6 $$T1D11r$   c                 0    [         R                  " U /UQ76 $ )z
GetNextFeature(Layer self) -> Feature

Fetch the next available feature from this layer.

For more details: :cpp:func:`OGR_L_GetNextFeature`

Returns
--------
Feature:
    A feature or None if no more features are available.

)r   Layer_GetNextFeaturer   s     r   GetNextFeatureLayer.GetNextFeaturej       ((555r$   c                 0    [         R                  " U /UQ76 $ )ay  
SetNextByIndex(Layer self, GIntBig new_index) -> OGRErr

Move read cursor to the nIndex'th feature in the current resultset.

For more details: :cpp:func:`OGR_L_SetNextByIndex`

Parameters
-----------
new_index: int
    The index indicating how many steps into the result set to seek.

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success or an error code.

)r   Layer_SetNextByIndexr   s     r   SetNextByIndexLayer.SetNextByIndexz      & ((555r$   c                 0    [         R                  " U /UQ76 $ )a  
SetFeature(Layer self, Feature feature) -> OGRErr

Rewrite an existing feature.

For more details: :cpp:func:`OGR_L_SetFeature`

To set a feature, but create it if it doesn't exist see :py:meth:`.Layer.UpsertFeature`.

Parameters
-----------
feature: Feature
    The feature to write.

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` if the operation works,
    otherwise an appropriate error code
    (e.g :py:const:`osgeo.ogr.OGRERR_NON_EXISTING_FEATURE` if the
    feature does not exist).

)r   Layer_SetFeaturer   s     r   
SetFeatureLayer.SetFeature  s    0 $$T1D11r$   c                 0    [         R                  " U /UQ76 $ )a  
CreateFeature(Layer self, Feature feature) -> OGRErr

Create and write a new feature within a layer.

For more details: :cpp:func:`OGR_L_CreateFeature`

To create a feature, but set it if it exists see :py:meth:`.Layer.UpsertFeature`.

Parameters
-----------
feature: Feature
    The feature to write to disk.

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success.

)r   Layer_CreateFeaturer   s     r   CreateFeatureLayer.CreateFeature      * ''4t44r$   c                 0    [         R                  " U /UQ76 $ )aC  
UpsertFeature(Layer self, Feature feature) -> OGRErr

Rewrite an existing feature or create a new feature within a layer.

For more details: :cpp:func:`OGR_L_UpsertFeature`

Parameters
-----------
feature: Feature
    The feature to write to disk.

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success.

)r   Layer_UpsertFeaturer   s     r   UpsertFeatureLayer.UpsertFeature      & ''4t44r$   c                 0    [         R                  " U /UQ76 $ )zUpdateFeature(Layer self, Feature feature, int nUpdatedFieldsCount, int nUpdatedGeomFieldsCount, bool bUpdateStyleString) -> OGRErr)r   Layer_UpdateFeaturer   s     r   UpdateFeatureLayer.UpdateFeature  r   r$   c                 0    [         R                  " U /UQ76 $ )a  
DeleteFeature(Layer self, GIntBig fid) -> OGRErr

Delete feature from layer.

For more details: :cpp:func:`OGR_L_DeleteFeature`

Parameters
-----------
fid: int
    The feature id to be deleted from the layer

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` if the operation works,
    otherwise an appropriate error code
    (e.g :py:const:`osgeo.ogr.OGRERR_NON_EXISTING_FEATURE`)
    if the feature does not exist.

)r   Layer_DeleteFeaturer   s     r   DeleteFeatureLayer.DeleteFeature  s    , ''4t44r$   c                 0    [         R                  " U /UQ76 $ )z
SyncToDisk(Layer self) -> OGRErr

Flush pending changes to disk.

For more details: :cpp:func:`OGR_L_SyncToDisk`

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` if no error occurs
    (even if nothing is done) or an error code.

)r   Layer_SyncToDiskr   s     r   rJ  Layer.SyncToDisk  s     $$T1D11r$   c                 0    [         R                  " U /UQ76 $ )z
GetLayerDefn(Layer self) -> FeatureDefn

Fetch the schema information for this layer.

For more details: :cpp:func:`OGR_L_GetLayerDefn`

Returns
--------
FeatureDefn:
    The feature definition.

)r   Layer_GetLayerDefnr   s     r   GetLayerDefnLayer.GetLayerDefn  s     &&t3d33r$   c                 6    [         R                  " U /UQ70 UD6$ )aM  
GetFeatureCount(Layer self, int force=1) -> GIntBig

Fetch the feature count in this layer.

For more details: :cpp:func:`OGR_L_GetFeatureCount`

Parameters
-----------
force: int
    Flag indicating whether the count should be computed even if
    it is expensive.

Returns
--------
int:
    Feature count, -1 if count not known.

)r   Layer_GetFeatureCountr   s      r   GetFeatureCountLayer.GetFeatureCount  s    ( ))$@@@@r$   c                 6    [         R                  " U /UQ70 UD6$ )a  
GetExtent(Layer self, int force=1, int can_return_null=0, int geom_field=0)

Fetch the extent of this layer.

For more details:

- :cpp:func:`OGR_L_GetExtent`
- :cpp:func:`OGR_L_GetExtentEx`

.. warning:: Check the return order of the bounds.

Parameters
-----------
force: int, default=False
    Flag indicating whether the extent should be computed even if
    it is expensive.
can_return_null: int, default=False
    Whether None can be returned in the response.
geom_field: int, default=0
    Ithe index of the geometry field on which to compute the extent.
    Can be iterated over using :py:func:`range` and :py:func:`GetGeomFieldCount`.

Returns
--------
minx: float
maxx: float
miny: float
maxy: float

)r   Layer_GetExtentr   s      r   	GetExtentLayer.GetExtent(  s     @ ##D:4:6::r$   c                 0    [         R                  " U /UQ76 $ )a  
TestCapability(Layer self, char const * cap) -> bool

Test if this layer supported the named capability.

For more details: :cpp:func:`OGR_L_TestCapability`

Parameters
-----------
cap: str
    The name of the capability to test. These can
    be found in the `osgeo.ogr` namespace. For example,
    :py:const:`osgeo.ogr.OLCRandomRead`.

Returns
--------
int:
    True if the layer has the requested capability, or False otherwise.
    Will return False for any unrecognized capabilities.

)r   Layer_TestCapabilityr   s     r   r  Layer.TestCapabilityJ      , ((555r$   c                 6    [         R                  " U /UQ70 UD6$ )a  
CreateField(Layer self, FieldDefn field_def, int approx_ok=1) -> OGRErr

Create a new field on a layer.

For more details: :cpp:func:`OGR_L_CreateField`

Parameters
-----------
field_def: FieldDefn
    The field definition to write to disk.
approx_ok: bool, default=True
    If True, the field may be created in a slightly different
    form depending on the limitations of the format driver.

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success.

)r   Layer_CreateFieldr   s      r   CreateFieldLayer.CreateFieldb  s    , %%d<T<V<<r$   c                 0    [         R                  " U /UQ76 $ )a  
DeleteField(Layer self, int iField) -> OGRErr

Delete an existing field on a layer.

For more details: :cpp:func:`OGR_L_DeleteField`

Parameters
-----------
iField: int
    index of the field to delete.

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success.

)r   Layer_DeleteFieldr   s     r   DeleteFieldLayer.DeleteFieldz      & %%d2T22r$   c                 0    [         R                  " U /UQ76 $ )a  
ReorderField(Layer self, int iOldFieldPos, int iNewFieldPos) -> OGRErr

Reorder an existing field on a layer.

For more details: :cpp:func:`OGR_L_ReorderField`

Parameters
-----------
iOldFieldPos: int
    previous position of the field to move. Must be in the
    range [0,GetFieldCount()-1].
iNewFieldPos: int
    new position of the field to move. Must be in the range
    [0,GetFieldCount()-1].

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success.

)r   Layer_ReorderFieldr   s     r   ReorderFieldLayer.ReorderField      . &&t3d33r$   c                 0    [         R                  " U /UQ76 $ )ay  
ReorderFields(Layer self, int nList) -> OGRErr

Reorder all the fields of a layer.

For more details: :cpp:func:`OGR_L_ReorderFields`

Parameters
-----------
nList: list[int]
    A list of GetLayerDefn().GetFieldCount()
    elements which is a permutation of
    [0, GetLayerDefn().GetFieldCount()-1].

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success.

)r   Layer_ReorderFieldsr   s     r   ReorderFieldsLayer.ReorderFields  rN  r$   c                 0    [         R                  " U /UQ76 $ )aB  
AlterFieldDefn(Layer self, int iField, FieldDefn field_def, int nFlags) -> OGRErr

Alter the definition of an existing field on a layer.

For more details: :cpp:func:`OGR_L_AlterFieldDefn`

Parameters
-----------
iField: int
    index of the field whose definition must be altered.
field_def: FieldDefn
    new field definition
nFlags: int
    Combination of
    :py:const:`osgeo.ogr.ALTER_NAME_FLAG`,
    :py:const:`osgeo.ogr.ALTER_TYPE_FLAG`,
    :py:const:`osgeo.ogr.ALTER_WIDTH_PRECISION_FLAG`,
    :py:const:`osgeo.ogr.ALTER_NULLABLE_FLAG` and
    :py:const:`osgeo.ogr.ALTER_DEFAULT_FLAG`
    to indicate which of the name and/or type and/or width and precision
    fields and/or nullability from the new field definition must be taken
    into account.

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success.

)r   Layer_AlterFieldDefnr   s     r   AlterFieldDefnLayer.AlterFieldDefn      > ((555r$   c                 0    [         R                  " U /UQ76 $ )z]AlterGeomFieldDefn(Layer self, int iGeomField, GeomFieldDefn field_def, int nFlags) -> OGRErr)r   Layer_AlterGeomFieldDefnr   s     r   AlterGeomFieldDefnLayer.AlterGeomFieldDefn      ,,T9D99r$   c                 6    [         R                  " U /UQ70 UD6$ )a  
CreateGeomField(Layer self, GeomFieldDefn field_def, int approx_ok=1) -> OGRErr

Create a new geometry field on a layer.

For more details: :cpp:func:`OGR_L_CreateGeomField`

Parameters
-----------
field_def: GeomFieldDefn
    The geometry field definition to write to disk.
approx_ok: bool, default=True
    If True, the field may be created in a slightly different
    form depending on the limitations of the format driver.

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success.

)r   Layer_CreateGeomFieldr   s      r   CreateGeomFieldLayer.CreateGeomField  s    , ))$@@@@r$   c                 0    [         R                  " U /UQ76 $ )z
StartTransaction(Layer self) -> OGRErr

For datasources which support transactions, this creates a transaction.

For more details: :cpp:func:`OGR_L_StartTransaction`

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success.

)r   Layer_StartTransactionr   s     r   r  Layer.StartTransaction  r   r$   c                 0    [         R                  " U /UQ76 $ )z
CommitTransaction(Layer self) -> OGRErr

For datasources which support transactions, this commits a transaction.

For more details: :cpp:func:`OGR_L_CommitTransaction`

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success.

)r   Layer_CommitTransactionr   s     r   r  Layer.CommitTransaction       ++D8488r$   c                 0    [         R                  " U /UQ76 $ )a   
RollbackTransaction(Layer self) -> OGRErr

Roll back a datasource to its state before the start of the current transaction.

For more details: :cpp:func:`OGR_L_RollbackTransaction`

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success.

)r   Layer_RollbackTransactionr   s     r   r  Layer.RollbackTransaction  s     --d:T::r$   c                 0    [         R                  " U /UQ76 $ )z
FindFieldIndex(Layer self, char const * pszFieldName, int bExactMatch) -> int

Find the index of field in a layer.

For more details: :cpp:func:`OGR_L_FindFieldIndex`

Returns
--------
int:
    field index, or -1 if the field doesn't exist

)r   Layer_FindFieldIndexr   s     r   FindFieldIndexLayer.FindFieldIndex,  r@  r$   c                 0    [         R                  " U /UQ76 $ )z
GetSpatialRef(Layer self) -> SpatialReference

Fetch the spatial reference system for this layer.

For more details: :cpp:func:`OGR_L_GetSpatialRef`

Returns
--------
SpatialReference:
    spatial reference, or None if there isn't one.

)r   Layer_GetSpatialRefr   s     r   GetSpatialRefLayer.GetSpatialRef<       ''4t44r$   c                 0    [         R                  " U /UQ76 $ )z^
GetFeaturesRead(Layer self) -> GIntBig

For more details: :cpp:func:`OGR_L_GetFeaturesRead`

)r   Layer_GetFeaturesReadr   s     r   GetFeaturesReadLayer.GetFeaturesReadL  s     ))$666r$   c                 0    [         R                  " U /UQ76 $ )a  
SetIgnoredFields(Layer self, char const ** options) -> OGRErr

Set which fields can be omitted when retrieving features from the
layer.

For more details: :cpp:func:`OGR_L_SetIgnoredFields`

Parameters
-----------
options: list[str]
    A list of field names.
    If an empty list is passed, the ignored list is cleared.

Returns
-------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` if all field names have been resolved
    (even if the driver does not support this method)

)r   Layer_SetIgnoredFieldsr   s     r   SetIgnoredFieldsLayer.SetIgnoredFieldsU  r  r$   c                 6    [         R                  " U /UQ70 UD6$ )au  
Intersection(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr

Intersection of two layers.

For more details: :cpp:func:`OGR_L_Intersection`

Parameters
-----------
method_layer: Layer
    the method layer. Should not be None.
result_layer: Layer
    the layer where the features resulting from the
    operation are inserted. Should not be None.
options: list[str], optional
    List of options (empty list is allowed). For example ["PROMOTE_TO_MULTI=YES"].
callback: Callable, optional
    a GDALProgressFunc() compatible callback function for
    reporting progress or None.
callback_data:
    Argument to be passed to 'callback'. May be None.

Returns
-------
int:
    An error code if there was an error or the execution was interrupted,
    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.

)r   Layer_Intersectionr   s      r   IntersectionLayer.Intersectionm  s    < &&t=d=f==r$   c                 6    [         R                  " U /UQ70 UD6$ )a  
Union(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr

Union of two layers.

For more details: :cpp:func:`OGR_L_Union`

The first geometry field is always used.

Parameters
-----------
method_layer: Layer
    the method layer. Should not be None.
result_layer: Layer
    the layer where the features resulting from the
    operation are inserted. Should not be None.
options: list[str], optional
    List of options (empty list is allowed). For example ["PROMOTE_TO_MULTI=YES"].
callback: Callable, optional
    a GDALProgressFunc() compatible callback function for
    reporting progress or None.
callback_data:
    Argument to be passed to 'callback'. May be None.

Returns
-------
int:
    An error code if there was an error or the execution was interrupted,
    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.

)r   Layer_Unionr   s      r   UnionLayer.Union  s     @ 6t6v66r$   c                 6    [         R                  " U /UQ70 UD6$ )a  
SymDifference(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr

Symmetrical difference of two layers.

For more details: :cpp:func:`OGR_L_SymDifference`

Parameters
-----------
method_layer: Layer
    the method layer. Should not be None.
result_layer: Layer
    the layer where the features resulting from the
    operation are inserted. Should not be None.
options: list[str], optional
    List of options (empty list is allowed). For example ["PROMOTE_TO_MULTI=YES"].
callback: Callable, optional
    a GDALProgressFunc() compatible callback function for
    reporting progress or None.
callback_data:
    Argument to be passed to 'callback'. May be None.

Returns
-------
int:
    An error code if there was an error or the execution was interrupted,
    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.

)r   Layer_SymDifferencer   s      r   SymDifferenceLayer.SymDifference  s    < ''>t>v>>r$   c                 6    [         R                  " U /UQ70 UD6$ )a  
Identity(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr

Identify the features of this layer with the ones from the identity layer.

For more details: :cpp:func:`OGR_L_Identity`

Parameters
-----------
method_layer: Layer
    the method layer. Should not be None.
result_layer: Layer
    the layer where the features resulting from the
    operation are inserted. Should not be None.
options: list[str], optional
    List of options (empty list is allowed). For example ["PROMOTE_TO_MULTI=YES"].
callback: Callable, optional
    a GDALProgressFunc() compatible callback function for
    reporting progress or None.
callback_data:
    Argument to be passed to 'callback'. May be None.

Returns
-------
int:
    An error code if there was an error or the execution was interrupted,
    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.

)r   Layer_Identityr   s      r   IdentityLayer.Identity  s    < ""49$9&99r$   c                 6    [         R                  " U /UQ70 UD6$ )a  
Update(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr

Update this layer with features from the update layer.

For more details: :cpp:func:`OGR_L_Update`

Parameters
-----------
method_layer: Layer
    the method layer. Should not be None.
result_layer: Layer
    the layer where the features resulting from the
    operation are inserted. Should not be None.
options: list[str], optional
    List of options (empty list is allowed). For example ["PROMOTE_TO_MULTI=YES"].
callback: Callable, optional
    a GDALProgressFunc() compatible callback function for
    reporting progress or None.
callback_data:
    Argument to be passed to 'callback'. May be None.

Returns
-------
int:
    An error code if there was an error or the execution was interrupted,
    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.

)r   Layer_Updater   s      r   UpdateLayer.Update  s    <   7777r$   c                 6    [         R                  " U /UQ70 UD6$ )a  
Clip(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr

Clip off areas that are not covered by the method layer.

For more details: :cpp:func:`OGR_L_Clip`

Parameters
-----------
method_layer: Layer
    the method layer. Should not be None.
result_layer: Layer
    the layer where the features resulting from the
    operation are inserted. Should not be None.
options: list[str], optional
    List of options (empty list is allowed). For example ["PROMOTE_TO_MULTI=YES"].
callback: Callable, optional
    a GDALProgressFunc() compatible callback function for
    reporting progress or None.
callback_data:
    Argument to be passed to 'callback'. May be None.

Returns
-------
int:
    An error code if there was an error or the execution was interrupted,
    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.

)r   
Layer_Clipr   s      r   Clip
Layer.Clip	  s    < t5d5f55r$   c                 6    [         R                  " U /UQ70 UD6$ )a~  
Erase(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr

Remove areas that are covered by the method layer.

For more details: :cpp:func:`OGR_L_Erase`

Parameters
-----------
method_layer: Layer
    the method layer. Should not be None.
result_layer: Layer
    the layer where the features resulting from the
    operation are inserted. Should not be None.
options: list[str], optional
    List of options (empty list is allowed). For example ["PROMOTE_TO_MULTI=YES"].
callback: Callable, optional
    a GDALProgressFunc() compatible callback function for
    reporting progress or None.
callback_data:
    Argument to be passed to 'callback'. May be None.

Returns
-------
int:
    An error code if there was an error or the execution was interrupted,
    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.

)r   Layer_Eraser   s      r   EraseLayer.Erase/	  s    < 6t6v66r$   c                 0    [         R                  " U /UQ76 $ )zo
GetStyleTable(Layer self) -> StyleTable

Get style table.

For more details: :cpp:func:`OGR_L_GetStyleTable`

)r   Layer_GetStyleTabler   s     r   r}  Layer.GetStyleTableO	       ''4t44r$   c                 0    [         R                  " U /UQ76 $ )zs
SetStyleTable(Layer self, StyleTable table)

Set style table.

For more details: :cpp:func:`OGR_L_SetStyleTable`

)r   Layer_SetStyleTabler   s     r   r  Layer.SetStyleTableZ	  r  r$   c                 0    [         R                  " U /UQ76 $ )zDGetArrowStream(Layer self, char ** options=None) -> ArrowArrayStream)r   Layer_GetArrowStreamr   s     r   GetArrowStreamLayer.GetArrowStreame	  r  r$   c                 0    [         R                  " U /UQ76 $ )zLIsArrowSchemaSupported(Layer self, ArrowSchema schema, char ** options=None))r   Layer_IsArrowSchemaSupportedr   s     r   IsArrowSchemaSupportedLayer.IsArrowSchemaSupportedi	  r   r$   c                 0    [         R                  " U /UQ76 $ )zZCreateFieldFromArrowSchema(Layer self, ArrowSchema schema, char ** options=None) -> OGRErr)r    Layer_CreateFieldFromArrowSchemar   s     r   CreateFieldFromArrowSchema Layer.CreateFieldFromArrowSchemam	  s    44TADAAr$   c                 0    [         R                  " U /UQ76 $ )zaWriteArrowBatch(Layer self, ArrowSchema schema, ArrowArray array, char ** options=None) -> OGRErr)r   Layer_WriteArrowBatchr   s     r   WriteArrowBatchLayer.WriteArrowBatchq	  r	  r$   c                 6    [         R                  " U /UQ70 UD6$ )aQ  
GetGeometryTypes(Layer self, int geom_field=0, int flags=0, GDALProgressFunc callback=0, void * callback_data=None)

Get actual geometry types found in features.

For more details: :cpp:func:`OGR_L_GetGeometryTypes`

Parameters
-----------
geom_field: int, optional
    index of the geometry field
flags: int, optional
    0, or a combination of :py:const:`osgeo.ogr.GGT_COUNT_NOT_NEEDED`,
    :py:const:`osgeo.ogr.GGT_STOP_IF_MIXED` and
    :py:const:`osgeo.ogr.GGT_GEOMCOLLECTIONZ_TINZ`
callback: Callable, optional
    a GDALProgressFunc() compatible callback function for
    cancellation or None.
callback_data:
    Argument to be passed to 'callback'. May be None.

Returns
-------
dict:
    A dictionary whose keys are :py:const:`osgeo.ogr.wkbXXXX` constants and
    values the corresponding number of geometries of that type in the layer.

)r   Layer_GetGeometryTypesr   s      r   GetGeometryTypesLayer.GetGeometryTypesu	  s    : **4A$A&AAr$   c                 6    [         R                  " U /UQ70 UD6$ )z1GetSupportedSRSList(Layer self, int geom_field=0))r   Layer_GetSupportedSRSListr   s      r   GetSupportedSRSListLayer.GetSupportedSRSList	      --dDTDVDDr$   c                 0    [         R                  " U /UQ76 $ )zHSetActiveSRS(Layer self, int geom_field, SpatialReference srs) -> OGRErr)r   Layer_SetActiveSRSr   s     r   SetActiveSRSLayer.SetActiveSRS	  r  r$   c                     gr  r%   r  s    r   r  Layer.Reference	      
r$   c                     gr  r%   r  s    r   r  Layer.Dereference	  r  r$   c                 "    U R                  5       $ )z+Returns the number of features in the layer)re  r  s    r   r  Layer.__len__	  s    ##%%r$   c                     gNTr%   r  s    r   __nonzero__Layer.__nonzero__	  s    r$   c                    [        U[        5      (       a  SSKn/ nUR                  UR                  :X  a  [        U 5      S-
  nOUR                  n[        UR                  XAR                  5       H0  nU R                  U5      nU(       a  UR                  U5        M.  Us  $    U$ [        U[        5      (       a)  U[        U 5      S-
  :  a  [        eU R                  U5      $ [        S[        U5      -  5      e)zSupport list and slice -like access to the layer.
layer[0] would return the first feature on the layer.
layer[0:4] would return a list of the first four features.r   Nr   z'Input %s is not of IntType or SliceType)r   r  sysr  maxsizer  r>  r  r  r:  r  rB  r  rC  r   )r   r    r  r  r  rD  features          r   r  Layer.__getitem__	  s     eU##FzzS[[( 4y1}zz5;;jj9//!,MM'*!M : MeS!!s4y1}$  ??5))EUSTTr$   c                 8    U H  nU R                  U5        M     g)z$Create a list of fields on the LayerN)rq  )r   fieldsrD  s      r   CreateFieldsLayer.CreateFields	  s    AQ r$   c                     [        U S5      (       a(  U R                  5       U l        U R                  c   eU ?U $ [        S5      e)BMethod called when using Dataset.ExecuteSQL() as a context managerrj  z*__enter__() called in unexpected situation)r   rj  rk  r   r  s    r   r^   Layer.__enter__	  sJ    4,--'+'='='?D$++777&KDEEr$   c                 b    [        U S5      (       a  U R                  R                  U 5        U ?gg)r  rk  N)r   rk  ry  r   s     r   rd   Layer.__exit__	  s/    4.//$$55d;( 0r$   c              #   h   #    U R                  5          U R                  5       nU(       d  g Uv   M  7fr/   )r'  r>  )r   r  s     r   __iter__Layer.__iter__	  s2     ))+GM	 s   02c                     / nU R                  5       n[        UR                  5       5       H#  nUR                  UR	                  U5      5        M%     U$ r/   )ra  r>  GetFieldCountr  GetFieldDefn)r   r  defnns       r   schemaLayer.schema	  sI      "t))+,AMM$++A./ -r$   c                 |   ^ SSK m " U4S jS5      nU R                  U5      nU(       d  [        S5      eU" U5      $ )z:Return an ArrowStream as PyArrow Schema and Array objects r   Nc                   V   > \ rS rSrS rU 4S jr\" \5      rS rS rU 4S jr	S r
Srg	)
-Layer.GetArrowStreamAsPyArrow.<locals>.Streami	  c                     Xl         SU l        g NF)streamend_of_stream)r   r  s     r   rV   6Layer.GetArrowStreamAsPyArrow.<locals>.Stream.__init__	  s    $%*"r$   c                    > U R                   R                  5       nUc  [        S5      eTR                  R	                  UR                  5       5      $ )z(Return the schema as a PyArrow DataType zcannot get schema)r  r  r   DataType_import_from_cr  )r   r  pas     r   r  4Layer.GetArrowStreamAsPyArrow.<locals>.Stream.schema	  sD     ..0>#$788{{11&..2BCCr$   c                     U $ r/   r%   r  s    r   r^   7Layer.GetArrowStreamAsPyArrow.<locals>.Stream.__enter__
      r$   c                      SU l         S U l        g r  r  r  r   r   r    tbs       r   rd   6Layer.GetArrowStreamAsPyArrow.<locals>.Stream.__exit__
  s    %)""r$   c                    > U R                   R                  5       nUc  gTR                  R                  UR	                  5       U R
                  5      $ )zRReturn the next RecordBatch as a PyArrow StructArray, or None at end of iteration N)r  r  Arrayr  r  r  )r   arrayr  s     r   r  @Layer.GetArrowStreamAsPyArrow.<locals>.Stream.GetNextRecordBatch
  s@     668=xx..u}}LLr$   c              3      #    U R                   (       a  [        S5      e U R                  5       nU(       d  OUv   M  SU l         SU l        g7f)z@Return an iterator over record batches as a PyArrow StructArray %Stream has already been iterated overTNr  r   r  r  r   batchs     r   r  6Layer.GetArrowStreamAsPyArrow.<locals>.Stream.__iter__
  sL     %%#$KLL 335E K	 
 &*""s   AAr  N)r   r   r:   r;   rV   r  r   r^   rd   r  r  r>   )r  s   r   Streamr  	  s/    +D f%F#M#r$   r,  GetArrowStream() failed)pyarrowr  r   )r   optionsr,  r  r  s       @r   GetArrowStreamAsPyArrowLayer.GetArrowStreamAsPyArrow	  s>     	)	# )	#V $$W-566f~r$   c                   ^ SSK Jm   " U4S jS5      nU R                  U5      nU(       d  [        S5      eSnU H<  nUR	                  5       nUR                  S5      (       d  M+  U[        S5      S S	;   nM>     U" X45      $ )
z}Return an ArrowStream as NumPy Array objects.
A specific option to this method is USE_MASKED_ARRAYS=YES/NO (default is YES).
r   rZ   c                   :   > \ rS rSrS rS rS rU 4S jrS rSr	g)	+Layer.GetArrowStreamAsNumPy.<locals>.Streami.
  c                 T    Xl         UR                  5       U l        SU l        X l        g r  )r  r  r  r  use_masked_arrays)r   r  r6  s      r   rV   4Layer.GetArrowStreamAsNumPy.<locals>.Stream.__init__/
  s%    $$..0%*"):&r$   c                     U $ r/   r%   r  s    r   r^   5Layer.GetArrowStreamAsNumPy.<locals>.Stream.__enter__5
  r  r$   c                 .    SU l         S U l        S U l        g r  )r  r  r  r  s       r   rd   4Layer.GetArrowStreamAsNumPy.<locals>.Stream.__exit__8
  s    %)"""r$   c                   > U R                   R                  5       nUc  gTR                  UR                  5       U R                  R                  5       U5      nUc  TR                  5         U$ UR                  5        HV  u  p4[        U[        5      (       d  M  U R                  (       a"  SSK
Jn  UR                  US   US   5      X#'   MO  US   X#'   MX     U$ )zYReturn the next RecordBatch as a dictionary of Numpy arrays, or None at end of iteration Nr   datamask)r  r  _RecordBatchAsNumpyr  r  _RaiseExceptionitemsr   dictr6  numpy.mamamasked_array)r   r$  retkeyr$  rD  r[   s         r   r  >Layer.GetArrowStreamAsNumPy.<locals>.Stream.GetNextRecordBatch=
  s     668= 44U]]_59[[5H5H5J5:< ;..0J #		HC!#t,,111')s6{CK'PCH'*6{CH !, 
r$   c              3      #    U R                   (       a  [        S5      e  U R                  5       nU(       d  OUv   M  SU l         SU l        g! SU l         SU l        f = f7f)zGReturn an iterator over record batches as a dictionary of Numpy arrays r'  TNr(  r)  s     r   r  4Layer.GetArrowStreamAsNumPy.<locals>.Stream.__iter__S
  se      %%#$KLL' $ 7 7 9$!#	  *.D&"&DK *.D&"&DKs   A!A A!AA!)r  r  r  r6  N)
r   r   r:   r;   rV   r^   rd   r  r  r>   rZ   s   r   r,  r4  .
  s    ;#
,'r$   r,  r-  TzUSE_MASKED_ARRAYS=N)YESTRUEON1)osgeor[   r  r   upper
startswithr  )r   r/  r,  r  r6  optr[   s         @r   GetArrowStreamAsNumPyLayer.GetArrowStreamAsNumPy'
  s    
 	%3	' 3	'j $$W-566 C))+C~~233$',@(A(B$CGa$a! 
 f00r$   c                 ~    SSK n[        5       nUR                  UR                  5       5        U R	                  XB5      $ )zReturns whether the passed pyarrow Schema is supported by the layer, as a tuple (success: bool, errorMsg: str).

This may be used as a preliminary check before calling WritePyArrowBatch()
r   N)r.  r  _export_to_cr  r  r   	pa_schemar/  r  r  s        r   IsPyArrowSchemaSupportedLayer.IsPyArrowSchemaSupportedp
  s4     	v~~/0**6;;r$   c                 ~    SSK n[        5       nUR                  UR                  5       5        U R	                  XB5      $ )z.Create a field from the passed pyarrow Schema.r   N)r.  r  rV  r  r  rW  s        r   CreateFieldFromPyArrowSchema"Layer.CreateFieldFromPyArrowSchema|
  s4     	v~~/0..v??r$   c                    SSK n[        US5      (       a<  UR                  5        H"  nU R                  XBS9[        :w  d  M  [
        s  $    [        $ [        US5      (       aX  [        US5      (       aG  UR                  R                  UR                  UR                  R                  S9nU R                  XRS9$ [        5       n[        5       nUR                  UR                  5       UR                  5       5        U R                  XeU5      $ )zWrite the content of the passed PyArrow batch (either a pyarrow.Table, a pyarrow.RecordBatch or a pyarrow.StructArray) into the layer.r   N
to_batchesr/  columnsr  )names)r.  r   r_  WritePyArrowOGRERR_NONEOGRERR_FAILUREStructArrayfrom_arraysra  r  rb  r  r  rV  r  r  )r   pa_batchr/  r  r*  r$  r  s          r   rc  Layer.WritePyArrow
  s     	 8\**!,,.$$U$<K)) /  8Y''GHh,G,GNN..x/?/?xG\G\.]E$$U$<< emmov~~/?@##F7;;r$   )rk  N)Qr   r   r:   r;   r<   r   r   rV   r   r   r  r)  r  r  r  r#  r'  r  r.  r2  r6  r:  r>  rC  rH  rL  rQ  rV  rZ  rJ  ra  re  ri  r  rq  ru  rz  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r}  r  r  r  r  r  r  r  r  r  r  r  r  __bool__r  r  r^   rd   r  r  r0  rS  rY  r\  rc  r>   r%   r$   r   r  r    s   --/IOdeG7H.380<88 :0	4/ 3"9"4"2:6 6*245.5*5502"4 A, ;D60=03*425.6B:A08 9 ; 6 5 780>@ 7D?@:@8@6@7@	5	56>B7B>E4& HU8 
F) fF 13 3l /1 F1R ;= 	< ?A @ .0 <r$   r  c                   ,  ^  \ rS rSrSr\" S S SS9r\r\	R                  rS rS rS	 rS
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS r S r!S r"S r#S r$S  r%S! r&S" r'S# r(S$ r)S% r*S& r+S' r,S( r-S) r.S* r/S+ r0SUS, jr1S- r2S. r3S/ r4S0 r5S1 r6S2 r7S3 r8S4 r9S5 r:S6 r;S7 r<S8 r=S9 r>S: r?S; r@S< rAS= rBS> rCS? rDS@ rESA rFSB rGSC rHSD rISE rJU 4SF jrKSG rLSH rMSI rNSJ rOSK rPSL rQSM rRSN rSSO rTSP rSVSQ jrUSR rVSS rWSTrXU =rY$ )WFeaturei
  z$Proxy of C++ OGRFeatureShadow class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   Feature.<lambda>
  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   rn  
  r   r$   r   r   c                 Z    [         R                  " U [         R                  " U0 UD65        g)z:__init__(Feature self, FeatureDefn feature_def) -> FeatureN)r   Feature_swiginitnew_Featurer   s      r   rV   Feature.__init__
  s"    dD$4$4d$Ef$EFr$   c                 0    [         R                  " U /UQ76 $ )a  
GetDefnRef(Feature self) -> FeatureDefn

OGRFeatureDefnH OGR_F_GetDefnRef(OGRFeatureH hFeat)

Fetch feature definition.

This function is the same as the C++ method OGRFeature::GetDefnRef().

Parameters
-----------
hFeat:
    handle to the feature to get the feature definition from.

Returns
--------
OGRFeatureDefnH:
    a handle to the feature definition object on which feature depends.

)r   Feature_GetDefnRefr   s     r   
GetDefnRefFeature.GetDefnRef
  s    * &&t3d33r$   c                 0    [         R                  " U /UQ76 $ )a  
SetGeometry(Feature self, Geometry geom) -> OGRErr

OGRErr OGR_F_SetGeometry(OGRFeatureH hFeat, OGRGeometryH hGeom)

Set feature geometry.

This function updates the features geometry, and operate exactly as
SetGeometryDirectly(), except that this function does not assume
ownership of the passed geometry, but instead makes a copy of it.

This function is the same as the C++ OGRFeature::SetGeometry().

This method has only an effect on the in-memory feature object. If
this object comes from a layer and the modifications must be
serialized back to the datasource, OGR_L_SetFeature() must be used
afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be
used afterwards.

Parameters
-----------
hFeat:
    handle to the feature on which new geometry is applied to.
hGeom:
    handle to the new geometry to apply to feature.

Returns
--------
OGRErr:
    OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the
    geometry type is illegal for the OGRFeatureDefn (checking not yet
    implemented).

)r   Feature_SetGeometryr   s     r   SetGeometryFeature.SetGeometry
  s    F ''4t44r$   c                 h    [         R                  " X5      nU[        :X  a  U R                  U5        U$ r/   )r   Feature_SetGeometryDirectlyrd  _add_geom_ref)r   geomrF  s      r   SetGeometryDirectlyFeature.SetGeometryDirectly
  s-    ..t:+t$
r$   c                 V    [         R                  " U /UQ76 nU R                  U5        U$ )aQ  
GetGeometryRef(Feature self) -> Geometry

Return the feature geometry

The lifetime of the returned geometry is bound to the one of its belonging
feature.

For more details: :cpp:func:`OGR_F_GetGeometryRef`

The geometry() method is also available as an alias of GetGeometryRef()

Returns
--------
Geometry:
    the geometry, or None.

)r   Feature_GetGeometryRefr~  r#  s      r   GetGeometryRefFeature.GetGeometryRef
  s.    & ))$663 
r$   c                 0    [         R                  " U /UQ76 $ )a  
SetGeomField(Feature self, int iField, Geometry geom) -> OGRErr
SetGeomField(Feature self, char const * field_name, Geometry geom) -> OGRErr
OGRErr
OGR_F_SetGeomField(OGRFeatureH hFeat, int iField, OGRGeometryH hGeom)

Set feature geometry of a specified geometry field.

This function updates the features geometry, and operate exactly as
SetGeometryDirectly(), except that this function does not assume
ownership of the passed geometry, but instead makes a copy of it.

This function is the same as the C++ OGRFeature::SetGeomField().

Parameters
-----------
hFeat:
    handle to the feature on which new geometry is applied to.
iField:
    geometry field to set.
hGeom:
    handle to the new geometry to apply to feature.

Returns
--------
OGRErr:
    OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the
    geometry type is illegal for the OGRFeatureDefn (checking not yet
    implemented).

)r   Feature_SetGeomFieldr   s     r   SetGeomFieldFeature.SetGeomField
  s    @ ((555r$   c                 j    [         R                  " XU5      nU[        :X  a  U R                  U5        U$ r/   )r   Feature_SetGeomFieldDirectlyrd  r~  )r   fieldr  rF  s       r   SetGeomFieldDirectlyFeature.SetGeomFieldDirectly,  s/    //TB+t$
r$   c                 V    [         R                  " U /UQ76 nU R                  U5        U$ )a  
GetGeomFieldRef(Feature self, int iField) -> Geometry
GetGeomFieldRef(Feature self, char const * field_name) -> Geometry
OGRGeometryH
OGR_F_GetGeomFieldRef(OGRFeatureH hFeat, int iField)

Fetch a handle to feature geometry.

This function is the same as the C++ method
OGRFeature::GetGeomFieldRef().

Parameters
-----------
hFeat:
    handle to the feature to get geometry from.
iField:
    geometry field to get.

a handle to internal feature geometry. This object should not be
modified.

GDAL 1.11 
)r   Feature_GetGeomFieldRefr~  r#  s      r   GetGeomFieldRefFeature.GetGeomFieldRef4  s.    0 **47$73 
r$   c                 0    [         R                  " U /UQ76 $ )a  
Clone(Feature self) -> Feature

OGRFeatureH OGR_F_Clone(OGRFeatureH hFeat)

Duplicate feature.

The newly created feature is owned by the caller, and will have its
own reference to the OGRFeatureDefn.

This function is the same as the C++ method OGRFeature::Clone().

Parameters
-----------
hFeat:
    handle to the feature to clone.

Returns
--------
OGRFeatureH:
    a handle to the new feature, exactly matching this feature.

)r   Feature_Cloner   s     r   CloneFeature.CloneT  s    0 !!$...r$   c                 0    [         R                  " U /UQ76 $ )af  
Equal(Feature self, Feature feature) -> bool
int OGR_F_Equal(OGRFeatureH hFeat,
OGRFeatureH hOtherFeat)

Test if two features are the same.

Two features are considered equal if the share them (handle equality)
same OGRFeatureDefn, have the same field values, and the same geometry
(as tested by OGR_G_Equal()) as well as the same feature id.

This function is the same as the C++ method OGRFeature::Equal().

Parameters
-----------
hFeat:
    handle to one of the feature.
hOtherFeat:
    handle to the other feature to test this one against.

Returns
--------
int:
    TRUE if they are equal, otherwise FALSE.

)r   Feature_Equalr   s     r   EqualFeature.Equaln  s    6 !!$...r$   c                 0    [         R                  " U /UQ76 $ )a  
GetFieldCount(Feature self) -> int

int OGR_F_GetFieldCount(OGRFeatureH hFeat)

Fetch number of fields on this feature This will always be the same as
the field count for the OGRFeatureDefn.

This function is the same as the C++ method
OGRFeature::GetFieldCount().

Parameters
-----------
hFeat:
    handle to the feature to get the fields count from.

Returns
--------
int:
    count of fields.

)r   Feature_GetFieldCountr   s     r   r  Feature.GetFieldCount  s    . ))$666r$   c                 0    [         R                  " U /UQ76 $ )a_  
GetFieldDefnRef(Feature self, int id) -> FieldDefn
GetFieldDefnRef(Feature self, char const * field_name) -> FieldDefn

OGRFieldDefnH OGR_F_GetFieldDefnRef(OGRFeatureH hFeat, int i)

Fetch definition for this field.

This function is the same as the C++ method
OGRFeature::GetFieldDefnRef().

Parameters
-----------
hFeat:
    handle to the feature on which the field is found.
i:
    the field to fetch, from 0 to GetFieldCount()-1.

Returns
--------
OGRFieldDefnH:
    a handle to the field definition (from the OGRFeatureDefn). This is an
    internal reference, and should not be deleted or modified.

)r   Feature_GetFieldDefnRefr   s     r   GetFieldDefnRefFeature.GetFieldDefnRef  s    4 ++D8488r$   c                 0    [         R                  " U /UQ76 $ )a  
GetGeomFieldCount(Feature self) -> int

int OGR_F_GetGeomFieldCount(OGRFeatureH hFeat)

Fetch number of geometry fields on this feature This will always be
the same as the geometry field count for the OGRFeatureDefn.

This function is the same as the C++ method
OGRFeature::GetGeomFieldCount().

.. versionadded:: 1.11

Parameters
-----------
hFeat:
    handle to the feature to get the geometry fields count from.


Returns
--------
int:
    count of geometry fields.

)r   Feature_GetGeomFieldCountr   s     r   GetGeomFieldCountFeature.GetGeomFieldCount  s    4 --d:T::r$   c                 0    [         R                  " U /UQ76 $ )a  
GetGeomFieldDefnRef(Feature self, int id) -> GeomFieldDefn
GetGeomFieldDefnRef(Feature self, char const * field_name) -> GeomFieldDefn

OGRGeomFieldDefnH OGR_F_GetGeomFieldDefnRef(OGRFeatureH hFeat, int i)

Fetch definition for this geometry field.

This function is the same as the C++ method
OGRFeature::GetGeomFieldDefnRef().

.. versionadded:: 1.11

Parameters
-----------
hFeat:
    handle to the feature on which the field is found.
i:
    the field to fetch, from 0 to GetGeomFieldCount()-1.


Returns
--------
OGRGeomFieldDefnH:
    a handle to the field definition (from the OGRFeatureDefn). This is an
    internal reference, and should not be deleted or modified.

)r   Feature_GetGeomFieldDefnRefr   s     r   GetGeomFieldDefnRefFeature.GetGeomFieldDefnRef  s    : //<t<<r$   c                 0    [         R                  " U /UQ76 $ )a  
GetFieldAsString(Feature self, int id) -> char const
GetFieldAsString(Feature self, char const * field_name) -> char const *

const char\* OGR_F_GetFieldAsString(OGRFeatureH hFeat, int iField)

Fetch field value as a string.

OFTReal and OFTInteger fields will be translated to string using
sprintf(), but not necessarily using the established formatting rules.
Other field types, or errors will result in a return value of zero.

This function is the same as the C++ method
OGRFeature::GetFieldAsString().

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to fetch, from 0 to GetFieldCount()-1.

Returns
--------
str:
    the field value. This string is internal, and should not be modified,
    or freed. Its lifetime may be very brief.

)r   Feature_GetFieldAsStringr   s     r   GetFieldAsStringFeature.GetFieldAsString  s    < ,,T9D99r$   c                 0    [         R                  " U /UQ76 $ )z
GetFieldAsISO8601DateTime(Feature self, int id, char ** options=None) -> char const
GetFieldAsISO8601DateTime(Feature self, char const * field_name, char ** options=None) -> char const *
)r   !Feature_GetFieldAsISO8601DateTimer   s     r   GetFieldAsISO8601DateTime!Feature.GetFieldAsISO8601DateTime  s    
 55dBTBBr$   c                 0    [         R                  " U /UQ76 $ )as  
GetFieldAsInteger(Feature self, int id) -> int
GetFieldAsInteger(Feature self, char const * field_name) -> int

int OGR_F_GetFieldAsInteger(OGRFeatureH hFeat, int iField)

Fetch field value as integer.

OFTString features will be translated using atoi(). OFTReal fields
will be cast to integer. Other field types, or errors will result in a
return value of zero.

This function is the same as the C++ method
OGRFeature::GetFieldAsInteger().

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to fetch, from 0 to GetFieldCount()-1.

Returns
--------
int:
    the field value.

)r   Feature_GetFieldAsIntegerr   s     r   GetFieldAsIntegerFeature.GetFieldAsInteger"      : --d:T::r$   c                 0    [         R                  " U /UQ76 $ )a  
GetFieldAsInteger64(Feature self, int id) -> GIntBig
GetFieldAsInteger64(Feature self, char const * field_name) -> GIntBig

GIntBig OGR_F_GetFieldAsInteger64(OGRFeatureH hFeat, int iField)

Fetch field value as integer 64 bit.

OFTInteger are promoted to 64 bit. OFTString features will be
translated using CPLAtoGIntBig(). OFTReal fields will be cast to
integer. Other field types, or errors will result in a return value of
zero.

This function is the same as the C++ method
OGRFeature::GetFieldAsInteger64().

.. versionadded:: 2.0

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to fetch, from 0 to GetFieldCount()-1.

Returns
--------
int:
    the field value.

)r   Feature_GetFieldAsInteger64r   s     r   GetFieldAsInteger64Feature.GetFieldAsInteger64A      @ //<t<<r$   c                 0    [         R                  " U /UQ76 $ )a  
GetFieldAsDouble(Feature self, int id) -> double
GetFieldAsDouble(Feature self, char const * field_name) -> double

double OGR_F_GetFieldAsDouble(OGRFeatureH hFeat, int iField)

Fetch field value as a double.

OFTString features will be translated using CPLAtof(). OFTInteger
fields will be cast to double. Other field types, or errors will
result in a return value of zero.

This function is the same as the C++ method
OGRFeature::GetFieldAsDouble().

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to fetch, from 0 to GetFieldCount()-1.

Returns
--------
float:
    the field value.

)r   Feature_GetFieldAsDoubler   s     r   GetFieldAsDoubleFeature.GetFieldAsDoublec  s    : ,,T9D99r$   c                 0    [         R                  " U /UQ76 $ )a  
GetFieldAsDateTime(Feature self, int id)
GetFieldAsDateTime(Feature self, char const * field_name)
int
OGR_F_GetFieldAsDateTime(OGRFeatureH hFeat, int iField, int \*pnYear,
int \*pnMonth, int \*pnDay, int \*pnHour, int \*pnMinute, int \*pnSecond,
int \*pnTZFlag)

Fetch field value as date and time.

Currently this method only works for OFTDate, OFTTime and OFTDateTime
fields.

This function is the same as the C++ method
OGRFeature::GetFieldAsDateTime().

.. note:: Use OGR_F_GetFieldAsDateTimeEx() for second with millisecond accuracy.

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to fetch, from 0 to GetFieldCount()-1.
pnYear:
    (including century)
pnMonth:
    (1-12)
pnDay:
    (1-31)
pnHour:
    (0-23)
pnMinute:
    (0-59)
pnSecond:
    (0-59)
pnTZFlag:
    (0=unknown, 1=localtime, 100=GMT, see data model for
details)

Returns
--------
int:
    TRUE on success or FALSE on failure.

)r   Feature_GetFieldAsDateTimer   s     r   GetFieldAsDateTimeFeature.GetFieldAsDateTime  s    ^ ..t;d;;r$   c                 0    [         R                  " U /UQ76 $ )a6  
GetFieldAsIntegerList(Feature self, int id)
GetFieldAsIntegerList(Feature self, char const * field_name)

const int\* OGR_F_GetFieldAsIntegerList(OGRFeatureH hFeat, int iField, int
\*pnCount)

Fetch field value as a list of integers.

Currently this function only works for OFTIntegerList fields.

This function is the same as the C++ method
OGRFeature::GetFieldAsIntegerList().

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to fetch, from 0 to GetFieldCount()-1.
pnCount:
    an integer to put the list count (number of integers) into.

Returns
--------
list[int]:
    the field value. This list is internal, and should not be modified, or
    freed. Its lifetime may be very brief. If \*pnCount is zero on return
    the returned pointer may be NULL or non-NULL.

)r   Feature_GetFieldAsIntegerListr   s     r   GetFieldAsIntegerListFeature.GetFieldAsIntegerList  s    @ 11$>>>r$   c                 0    [         R                  " U /UQ76 $ )a"  
GetFieldAsInteger64List(Feature self, int id)
const GIntBig\*
OGR_F_GetFieldAsInteger64List(OGRFeatureH hFeat, int iField, int
\*pnCount)

Fetch field value as a list of 64 bit integers.

Currently this function only works for OFTInteger64List fields.

This function is the same as the C++ method
OGRFeature::GetFieldAsInteger64List().

.. versionadded:: 2.0

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to fetch, from 0 to GetFieldCount()-1.
pnCount:
    an integer to put the list count (number of integers) into.

Returns
--------
list[int]:
    the field value. This list is internal, and should not be modified, or
    freed. Its lifetime may be very brief. If \*pnCount is zero on return
    the returned pointer may be NULL or non-NULL.

)r   Feature_GetFieldAsInteger64Listr   s     r   GetFieldAsInteger64ListFeature.GetFieldAsInteger64List      B 33D@4@@r$   c                 0    [         R                  " U /UQ76 $ )a1  
GetFieldAsDoubleList(Feature self, int id)
GetFieldAsDoubleList(Feature self, char const * field_name)
const double\*
OGR_F_GetFieldAsDoubleList(OGRFeatureH hFeat, int iField, int
\*pnCount)

Fetch field value as a list of doubles.

Currently this function only works for OFTRealList fields.

This function is the same as the C++ method
OGRFeature::GetFieldAsDoubleList().

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to fetch, from 0 to GetFieldCount()-1.
pnCount:
    an integer to put the list count (number of doubles) into.

Returns
--------
list[float]:
    the field value. This list is internal, and should not be modified, or
    freed. Its lifetime may be very brief. If \*pnCount is zero on return
    the returned pointer may be NULL or non-NULL.

)r   Feature_GetFieldAsDoubleListr   s     r   GetFieldAsDoubleListFeature.GetFieldAsDoubleList  s    @ 00===r$   c                 0    [         R                  " U /UQ76 $ )a  
GetFieldAsStringList(Feature self, int id) -> char **
char\*\*
OGR_F_GetFieldAsStringList(OGRFeatureH hFeat, int iField)

Fetch field value as a list of strings.

Currently this method only works for OFTStringList fields.

The returned list is terminated by a NULL pointer. The number of
elements can also be calculated using CSLCount().

This function is the same as the C++ method
OGRFeature::GetFieldAsStringList().

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to fetch, from 0 to GetFieldCount()-1.

Returns
--------
list[str]:
    the field value. This list is internal, and should not be modified, or
    freed. Its lifetime may be very brief.

)r   Feature_GetFieldAsStringListr   s     r   GetFieldAsStringListFeature.GetFieldAsStringList      < 00===r$   c                 0    [         R                  " U /UQ76 $ )a  
GetFieldAsBinary(Feature self, int id) -> OGRErr
GetFieldAsBinary(Feature self, char const * field_name) -> OGRErr
GByte\*
OGR_F_GetFieldAsBinary(OGRFeatureH hFeat, int iField, int \*pnBytes)

Fetch field value as binary.

This method only works for OFTBinary and OFTString fields.

This function is the same as the C++ method
OGRFeature::GetFieldAsBinary().

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to fetch, from 0 to GetFieldCount()-1.
pnBytes:
    location to place count of bytes returned.


Returns
--------
list:
    the field value. This list is internal, and should not be modified, or
    freed. Its lifetime may be very brief.

)r   Feature_GetFieldAsBinaryr   s     r   GetFieldAsBinaryFeature.GetFieldAsBinary:  s    > ,,T9D99r$   c                 0    [         R                  " U /UQ76 $ )a  
IsFieldSet(Feature self, int id) -> bool
IsFieldSet(Feature self, char const * field_name) -> bool

int OGR_F_IsFieldSet(OGRFeatureH hFeat, int iField)

Test if a field has ever been assigned a value or not.

This function is the same as the C++ method OGRFeature::IsFieldSet().

Parameters
-----------
hFeat:
    handle to the feature on which the field is.
iField:
    the field to test.

Returns
--------
int:
    TRUE if the field has been set, otherwise false.

)r   Feature_IsFieldSetr   s     r   
IsFieldSetFeature.IsFieldSet[  s    0 &&t3d33r$   c                 0    [         R                  " U /UQ76 $ )a  
IsFieldNull(Feature self, int id) -> bool
IsFieldNull(Feature self, char const * field_name) -> bool

int OGR_F_IsFieldNull(OGRFeatureH hFeat, int iField)

Test if a field is null.

This function is the same as the C++ method OGRFeature::IsFieldNull().

.. versionadded:: 2.2

Parameters
-----------
hFeat:
    handle to the feature on which the field is.
iField:
    the field to test.

Returns
--------
int:
    TRUE if the field is null, otherwise false.

)r   Feature_IsFieldNullr   s     r   IsFieldNullFeature.IsFieldNullu  s    4 ''4t44r$   c                 0    [         R                  " U /UQ76 $ )a  
IsFieldSetAndNotNull(Feature self, int id) -> bool
IsFieldSetAndNotNull(Feature self, char const * field_name) -> bool

int OGR_F_IsFieldSetAndNotNull(OGRFeatureH hFeat, int iField)

Test if a field is set and not null.

This function is the same as the C++ method
OGRFeature::IsFieldSetAndNotNull().

.. versionadded:: 2.2

Parameters
-----------
hFeat:
    handle to the feature on which the field is.
iField:
    the field to test.

Returns
--------
int:
    TRUE if the field is set and not null, otherwise false.

)r   Feature_IsFieldSetAndNotNullr   s     r   IsFieldSetAndNotNullFeature.IsFieldSetAndNotNull      6 00===r$   c                 0    [         R                  " U /UQ76 $ )a  
GetFieldIndex(Feature self, char const * field_name) -> int

int OGR_F_GetFieldIndex(OGRFeatureH hFeat, const char \*pszName)

Fetch the field index given field name.

This is a cover for the OGRFeatureDefn::GetFieldIndex() method.

This function is the same as the C++ method
OGRFeature::GetFieldIndex().

Parameters
-----------
hFeat:
    handle to the feature on which the field is found.
pszName:
    the name of the field to search for.

Returns
--------
int:
    the field index, or -1 if no matching field is found.

)r   Feature_GetFieldIndexr   s     r   GetFieldIndexFeature.GetFieldIndex      4 ))$666r$   c                 0    [         R                  " U /UQ76 $ )al  
GetGeomFieldIndex(Feature self, char const * field_name) -> int

int OGR_F_GetGeomFieldIndex(OGRFeatureH hFeat, const char \*pszName)

Fetch the geometry field index given geometry field name.

This is a cover for the OGRFeatureDefn::GetGeomFieldIndex() method.

This function is the same as the C++ method
OGRFeature::GetGeomFieldIndex().

.. versionadded:: 1.11

Parameters
-----------
hFeat:
    handle to the feature on which the geometry field is found.
pszName:
    the name of the geometry field to search for.


Returns
--------
int:
    the geometry field index, or -1 if no matching geometry field is found.

)r   Feature_GetGeomFieldIndexr   s     r   GetGeomFieldIndexFeature.GetGeomFieldIndex  r  r$   c                 0    [         R                  " U /UQ76 $ )a  
GetFID(Feature self) -> GIntBig
GIntBig OGR_F_GetFID(OGRFeatureH
hFeat)

Get feature identifier.

This function is the same as the C++ method OGRFeature::GetFID().
Note: since GDAL 2.0, this method returns a GIntBig (previously a
long)

Parameters
-----------
hFeat:
    handle to the feature from which to get the feature
identifier.

Returns
-------
int:
    feature id or OGRNullFID if none has been assigned.

)r   Feature_GetFIDr   s     r   GetFIDFeature.GetFID  s    0 ""4/$//r$   c                 0    [         R                  " U /UQ76 $ )a  
SetFID(Feature self, GIntBig fid) -> OGRErr
OGRErr OGR_F_SetFID(OGRFeatureH hFeat,
GIntBig nFID)

Set the feature identifier.

For specific types of features this operation may fail on illegal
features ids. Generally it always succeeds. Feature ids should be
greater than or equal to zero, with the exception of OGRNullFID (-1)
indicating that the feature id is unknown.

This function is the same as the C++ method OGRFeature::SetFID().

Parameters
-----------
hFeat:
    handle to the feature to set the feature id to.
nFID:
    the new feature identifier value to assign.

Returns
--------
OGRErr:
    On success OGRERR_NONE, or on failure some other value.

)r   Feature_SetFIDr   s     r   SetFIDFeature.SetFID  s    8 ""4/$//r$   c                 0    [         R                  " U /UQ76 $ )a  
DumpReadable(Feature self)
void
OGR_F_DumpReadable(OGRFeatureH hFeat, FILE \*fpOut)

Dump this feature in a human readable form.

This dumps the attributes, and geometry; however, it doesn't
definition information (other than field types and names), nor does it
report the geometry spatial reference system.

This function is the same as the C++ method
OGRFeature::DumpReadable().

Parameters
-----------
hFeat:
    handle to the feature to dump.
fpOut:
    the stream to write to, such as strout.

)r   Feature_DumpReadabler   s     r   DumpReadableFeature.DumpReadable!  s    . ((555r$   c                 0    [         R                  " U /UQ76 $ )zQDumpReadableAsString(Feature self, char ** options=None) -> retStringAndCPLFree *)r   Feature_DumpReadableAsStringr   s     r   DumpReadableAsStringFeature.DumpReadableAsString:  r   r$   c                 0    [         R                  " U /UQ76 $ )ag  
UnsetField(Feature self, int id)
UnsetField(Feature self, char const * field_name)

void OGR_F_UnsetField(OGRFeatureH hFeat, int iField)

Clear a field, marking it as unset.

This function is the same as the C++ method OGRFeature::UnsetField().

Parameters
-----------
hFeat:
    handle to the feature on which the field is.
iField:
    the field to unset.

)r   Feature_UnsetFieldr   s     r   
UnsetFieldFeature.UnsetField>  s    & &&t3d33r$   c                 0    [         R                  " U /UQ76 $ )a  
SetFieldNull(Feature self, int id)
SetFieldNull(Feature self, char const * field_name)

void OGR_F_SetFieldNull(OGRFeatureH hFeat, int iField)

Clear a field, marking it as null.

This function is the same as the C++ method
OGRFeature::SetFieldNull().

.. versionadded:: 2.2

Parameters
-----------
hFeat:
    handle to the feature on which the field is.
iField:
    the field to set to null.

)r   Feature_SetFieldNullr   s     r   SetFieldNullFeature.SetFieldNullS  rn  r$   c                 0    [         R                  " U /UQ76 $ )a  
SetFieldInteger64(Feature self, int id, GIntBig value)
void
OGR_F_SetFieldInteger64(OGRFeatureH hFeat, int iField, GIntBig nValue)

Set field to 64 bit integer value.

OFTInteger, OFTInteger64 and OFTReal fields will be set directly.
OFTString fields will be assigned a string representation of the
value, but not necessarily taking into account formatting constraints
on this field. Other field types may be unaffected.

This function is the same as the C++ method OGRFeature::SetField().

This method has only an effect on the in-memory feature object. If
this object comes from a layer and the modifications must be
serialized back to the datasource, OGR_L_SetFeature() must be used
afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be
used afterwards.

.. versionadded:: 2.0

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to fetch, from 0 to GetFieldCount()-1.
nValue:
    the value to assign.

)r   Feature_SetFieldInteger64r   s     r   SetFieldInteger64Feature.SetFieldInteger64k  s    B --d:T::r$   c                 P   [        U5      S:X  a  US   c  [        R                  " XS   5      $ [        U5      S:X  a]  [        US   [        5      (       aE  US   n[        U[
        5      (       a  U R                  U5      n[        R                  " XUS   5      $ [        U5      S:X  a]  [        US   [
        5      (       aE  US   n[        U[
        5      (       a  U R                  U5      n[        R                  " XUS   5      $ [        U5      S:X  a{  [        US   [        [        [        45      (       aX  US   n[        U[
        5      (       a  U R                  U5      nU R                  U5      [        :X  a  U R                  X!S   5      $ [        R                  " U /UQ76 $ )a  
SetField(self, fld_index, value: str)
SetField(self, fld_name, value: str)
SetField(self, fld_index, value: int)
SetField(self, fld_name, value: int)
SetField(self, fld_index, value: float)
SetField(self, fld_name, value: float)
SetField(self, fld_index, year: int, month: int, day: int, hour: int, minute: int, second: int|float, tzflag: int)
SetField(self, fld_name, year: int, month: int, day: int, hour: int, minute: int, second: int|float, tzflag: int)
SetField(self, fld_index, value: bytes)
SetField(self, fld_name, value: bytes)
   r   r   )r  r   r  r   rB  r=  _getfieldindexr	  Feature_SetFieldStringbytes	bytearray
memoryviewGetFieldType	OFTBinary_SetFieldBinaryFeature_SetField)r   rB   	fld_indexs      r   SetFieldFeature.SetField  sb    t9>d1go,,T7;;t9>ja#66QI)S)) //	:	11$47KKt9>ja#66QI)S)) //	:	..tQHHt9>ja5)Z2PQQQI)S)) //	:	  +y8++IAw??$$T1D11r$   c                 0    [         R                  " U /UQ76 $ )aq  
SetFieldIntegerList(Feature self, int id, int nList)
void
OGR_F_SetFieldIntegerList(OGRFeatureH hFeat, int iField, int nCount,
const int \*panValues)

Set field to list of integers value.

This function currently on has an effect of OFTIntegerList,
OFTInteger64List and OFTRealList fields.

This function is the same as the C++ method OGRFeature::SetField().

This method has only an effect on the in-memory feature object. If
this object comes from a layer and the modifications must be
serialized back to the datasource, OGR_L_SetFeature() must be used
afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be
used afterwards.

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to set, from 0 to GetFieldCount()-1.
nCount:
    the number of values in the list being assigned.
panValues:
    the values to assign.

)r   Feature_SetFieldIntegerListr   s     r   SetFieldIntegerListFeature.SetFieldIntegerList  r  r$   c                 0    [         R                  " U /UQ76 $ )a  
SetFieldInteger64List(Feature self, int id, int nList)
void
OGR_F_SetFieldInteger64List(OGRFeatureH hFeat, int iField, int nCount,
const GIntBig \*panValues)

Set field to list of 64 bit integers value.

This function currently on has an effect of OFTIntegerList,
OFTInteger64List and OFTRealList fields.

This function is the same as the C++ method OGRFeature::SetField().

This method has only an effect on the in-memory feature object. If
this object comes from a layer and the modifications must be
serialized back to the datasource, OGR_L_SetFeature() must be used
afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be
used afterwards.

.. versionadded:: 2.0

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to set, from 0 to GetFieldCount()-1.
nCount:
    the number of values in the list being assigned.
panValues:
    the values to assign.

)r   Feature_SetFieldInteger64Listr   s     r   SetFieldInteger64ListFeature.SetFieldInteger64List  s    D 11$>>>r$   c                 0    [         R                  " U /UQ76 $ )ap  
SetFieldDoubleList(Feature self, int id, int nList)
void
OGR_F_SetFieldDoubleList(OGRFeatureH hFeat, int iField, int nCount,
const double \*padfValues)

Set field to list of doubles value.

This function currently on has an effect of OFTIntegerList,
OFTInteger64List, OFTRealList fields.

This function is the same as the C++ method OGRFeature::SetField().

This method has only an effect on the in-memory feature object. If
this object comes from a layer and the modifications must be
serialized back to the datasource, OGR_L_SetFeature() must be used
afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be
used afterwards.

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to set, from 0 to GetFieldCount()-1.
nCount:
    the number of values in the list being assigned.
padfValues:
    the values to assign.

)r   Feature_SetFieldDoubleListr   s     r   SetFieldDoubleListFeature.SetFieldDoubleList      @ ..t;d;;r$   c                 0    [         R                  " U /UQ76 $ )aF  
SetFieldStringList(Feature self, int id, char ** pList)
void
OGR_F_SetFieldStringList(OGRFeatureH hFeat, int iField, CSLConstList
papszValues)

Set field to list of strings value.

This function currently on has an effect of OFTStringList fields.

This function is the same as the C++ method OGRFeature::SetField().

This method has only an effect on the in-memory feature object. If
this object comes from a layer and the modifications must be
serialized back to the datasource, OGR_L_SetFeature() must be used
afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be
used afterwards.

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to set, from 0 to GetFieldCount()-1.
papszValues:
    the values to assign. List of NUL-terminated string,
ending with a NULL pointer.

)r   Feature_SetFieldStringListr   s     r   SetFieldStringListFeature.SetFieldStringList       < ..t;d;;r$   c                 0    [         R                  " U /UQ76 $ )z/_SetFieldBinary(Feature self, int id, int nLen))r   Feature__SetFieldBinaryr   s     r   r  Feature._SetFieldBinary@  r   r$   c                 0    [         R                  " U /UQ76 $ )z
SetFieldBinaryFromHexString(Feature self, int id, char const * pszValue)
SetFieldBinaryFromHexString(Feature self, char const * field_name, char const * pszValue)
)r   #Feature_SetFieldBinaryFromHexStringr   s     r   SetFieldBinaryFromHexString#Feature.SetFieldBinaryFromHexStringD  s    
 77DtDDr$   c                 6    [         R                  " U /UQ70 UD6$ )a  
SetFrom(Feature self, Feature other, int forgiving=1) -> OGRErr
OGRErr OGR_F_SetFrom(OGRFeatureH
hFeat, OGRFeatureH hOtherFeat, int bForgiving)

Set one feature from another.

Overwrite the contents of this feature from the geometry and
attributes of another. The hOtherFeature does not need to have the
same OGRFeatureDefn. Field values are copied by corresponding field
names. Field types do not have to exactly match. OGR_F_SetField\*()
function conversion rules will be applied as needed.

This function is the same as the C++ method OGRFeature::SetFrom().

Parameters
-----------
hFeat:
    handle to the feature to set to.
hOtherFeat:
    handle to the feature from which geometry, and field
    values will be copied.
bForgiving:
    TRUE if the operation should continue despite lacking
    output fields matching some of the source fields.

Returns
--------
OGRErr:
    OGRERR_NONE if the operation succeeds, even if some values are not
    transferred, otherwise an error code.

)r   Feature_SetFromr   s      r   SetFromFeature.SetFromK  s     D ##D:4:6::r$   c                 0    [         R                  " U /UQ76 $ )a  
SetFromWithMap(Feature self, Feature other, int forgiving, int nList) -> OGRErr
OGRErr
OGR_F_SetFromWithMap(OGRFeatureH hFeat, OGRFeatureH hOtherFeat, int
bForgiving, const int \*panMap)

Set one feature from another.

Overwrite the contents of this feature from the geometry and
attributes of another. The hOtherFeature does not need to have the
same OGRFeatureDefn. Field values are copied according to the provided
indices map. Field types do not have to exactly match.
OGR_F_SetField\*() function conversion rules will be applied as needed.
This is more efficient than OGR_F_SetFrom() in that this doesn't
lookup the fields by their names. Particularly useful when the field
names don't match.

This function is the same as the C++ method OGRFeature::SetFrom().

Parameters
-----------
hFeat:
    handle to the feature to set to.
hOtherFeat:
    handle to the feature from which geometry, and field
    values will be copied.
panMap:
    Array of the indices of the destination feature's fields
    stored at the corresponding index of the source feature's fields. A
    value of -1 should be used to ignore the source's field. The array
    should not be NULL and be as long as the number of fields in the
    source feature.
bForgiving:
    TRUE if the operation should continue despite lacking
    output fields matching some of the source fields.

Returns
--------
OGRErr:
    OGRERR_NONE if the operation succeeds, even if some values are not
    transferred, otherwise an error code.

)r   Feature_SetFromWithMapr   s     r   SetFromWithMapFeature.SetFromWithMapo  s    X **47$77r$   c                 0    [         R                  " U /UQ76 $ )a   
GetStyleString(Feature self) -> char const *
const char\*
OGR_F_GetStyleString(OGRFeatureH hFeat)

Fetch style string for this feature.

Set the OGR Feature Style Specification for details on the format of
this string, and ogr_featurestyle.h for services available to parse
it.

This function is the same as the C++ method
OGRFeature::GetStyleString().

Parameters
-----------
hFeat:
    handle to the feature to get the style from.

Returns
--------
str:
    a reference to a representation in string format, or NULL if there
    isn't one.

)r   Feature_GetStyleStringr   s     r   GetStyleStringFeature.GetStyleString  s    6 **47$77r$   c                 0    [         R                  " U /UQ76 $ )a  
SetStyleString(Feature self, char const * the_string)
void
OGR_F_SetStyleString(OGRFeatureH hFeat, const char \*pszStyle)

Set feature style string.

This method operate exactly as OGR_F_SetStyleStringDirectly() except
that it does not assume ownership of the passed string, but instead
makes a copy of it.

This function is the same as the C++ method
OGRFeature::SetStyleString().

Parameters
-----------
hFeat:
    handle to the feature to set style to.
pszStyle:
    the style string to apply to this feature, cannot be NULL.

)r   Feature_SetStyleStringr   s     r   SetStyleStringFeature.SetStyleString  s    . **47$77r$   c                 0    [         R                  " U /UQ76 $ )zx
GetFieldType(Feature self, int id) -> OGRFieldType
GetFieldType(Feature self, char const * field_name) -> OGRFieldType
)r   Feature_GetFieldTyper   s     r   r  Feature.GetFieldType  s    
 ((555r$   c                 0    [         R                  " U /UQ76 $ )a  
Validate(Feature self, int flags=OGR_F_VAL_ALL, int bEmitError=TRUE) -> int
int OGR_F_Validate(OGRFeatureH
hFeat, int nValidateFlags, int bEmitError)

Validate that a feature meets constraints of its schema.

The scope of test is specified with the nValidateFlags parameter.

Regarding OGR_F_VAL_WIDTH, the test is done assuming the string width
must be interpreted as the number of UTF-8 characters. Some drivers
might interpret the width as the number of bytes instead. So this test
is rather conservative (if it fails, then it will fail for all
interpretations).

This function is the same as the C++ method OGRFeature::Validate().

.. versionadded:: 2.0

Parameters
-----------
hFeat:
    handle to the feature to validate.
nValidateFlags:
    OGR_F_VAL_ALL or combination of OGR_F_VAL_NULL,
    OGR_F_VAL_GEOM_TYPE, OGR_F_VAL_WIDTH and
    OGR_F_VAL_ALLOW_NULL_WHEN_DEFAULT with '|' operator
bEmitError:
    TRUE if a CPLError() must be emitted when a check fails

Returns
-------
int:
    TRUE if all enabled validation tests pass.

)r   Feature_Validater   s     r   ValidateFeature.Validate  s    J $$T1D11r$   c                 0    [         R                  " U /UQ76 $ )a*  
FillUnsetWithDefault(Feature self, int bNotNullableOnly=FALSE, char ** options=None)
void
OGR_F_FillUnsetWithDefault(OGRFeatureH hFeat, int bNotNullableOnly,
char \*\*papszOptions)

Fill unset fields with default values that might be defined.

This function is the same as the C++ method
OGRFeature::FillUnsetWithDefault().

.. versionadded:: 2.0

Parameters
-----------
hFeat:
    handle to the feature.
bNotNullableOnly:
    if we should fill only unset fields with a not-null
    constraint.
papszOptions:
    unused currently. Must be set to NULL.

)r   Feature_FillUnsetWithDefaultr   s     r   FillUnsetWithDefaultFeature.FillUnsetWithDefault  s    2 00===r$   c                 0    [         R                  " U /UQ76 $ )a  
GetNativeData(Feature self) -> char const *
const char\*
OGR_F_GetNativeData(OGRFeatureH hFeat)

Returns the native data for the feature.

The native data is the representation in a "natural" form that comes
from the driver that created this feature, or that is aimed at an
output driver. The native data may be in different format, which is
indicated by OGR_F_GetNativeMediaType().

Note that most drivers do not support storing the native data in the
feature object, and if they do, generally the NATIVE_DATA open option
must be passed at dataset opening.

The "native data" does not imply it is something more performant or
powerful than what can be obtained with the rest of the API, but it
may be useful in round-tripping scenarios where some characteristics
of the underlying format are not captured otherwise by the OGR
abstraction.

This function is the same as the C++ method
OGRFeature::GetNativeData().

.. note:: See https://trac.osgeo.org/gdal/wiki/rfc60_improved_roundtripping_in_ogr

.. versionadded:: 2.1

Parameters
-----------
hFeat:
    handle to the feature.

Returns
-------
str:
    a string with the native data, or NULL if there is none.

)r   Feature_GetNativeDatar   s     r   GetNativeDataFeature.GetNativeData  s    R ))$666r$   c                 0    [         R                  " U /UQ76 $ )a  
GetNativeMediaType(Feature self) -> char const *
const char\*
OGR_F_GetNativeMediaType(OGRFeatureH hFeat)

Returns the native media type for the feature.

The native media type is the identifier for the format of the native
data. It follows the IANA RFC 2045
(seehttps://en.wikipedia.org/wiki/Media_type), e.g.
"application/vnd.geo+json" for JSon.

This function is the same as the C function
OGR_F_GetNativeMediaType().

.. note:: See https://trac.osgeo.org/gdal/wiki/rfc60_improved_roundtripping_in_ogr

.. versionadded:: 2.1

Parameters
-----------
hFeat:
    handle to the feature.


Returns
--------
str:
    a string with the native media type, or NULL if there is none.

)r   Feature_GetNativeMediaTyper   s     r   GetNativeMediaTypeFeature.GetNativeMediaTypeG  r&  r$   c                 0    [         R                  " U /UQ76 $ )a  
SetNativeData(Feature self, char const * nativeData)
void
OGR_F_SetNativeData(OGRFeatureH hFeat, const char \*pszNativeData)

Sets the native data for the feature.

The native data is the representation in a "natural" form that comes
from the driver that created this feature, or that is aimed at an
output driver. The native data may be in different format, which is
indicated by OGR_F_GetNativeMediaType().

This function is the same as the C++ method
OGRFeature::SetNativeData().

.. note:: See https://trac.osgeo.org/gdal/wiki/rfc60_improved_roundtripping_in_ogr

.. versionadded:: 2.1

Parameters
-----------
hFeat:
    handle to the feature.
pszNativeData:
    a string with the native data, or NULL if there is none.

)r   Feature_SetNativeDatar   s     r   SetNativeDataFeature.SetNativeDatai  s    8 ))$666r$   c                 0    [         R                  " U /UQ76 $ )a  
SetNativeMediaType(Feature self, char const * nativeMediaType)
void
OGR_F_SetNativeMediaType(OGRFeatureH hFeat, const char
\*pszNativeMediaType)

Sets the native media type for the feature.

The native media type is the identifier for the format of the native
data. It follows the IANA RFC 2045
(seehttps://en.wikipedia.org/wiki/Media_type), e.g.
"application/vnd.geo+json" for JSon.

This function is the same as the C++ method
OGRFeature::SetNativeMediaType().

.. note:: See https://trac.osgeo.org/gdal/wiki/rfc60_improved_roundtripping_in_ogr

.. versionadded:: 2.1


Parameters
-----------
hFeat:
    handle to the feature.
pszNativeMediaType:
    a string with the native media type, or NULL if there is none.

)r   Feature_SetNativeMediaTyper   s     r   SetNativeMediaTypeFeature.SetNativeMediaType  r+  r$   c                 0    [         R                  " U /UQ76 $ )a  
SetFieldString(Feature self, int id, char const * value)
void
OGR_F_SetFieldString(OGRFeatureH hFeat, int iField, const char
\*pszValue)

Set field to string value.

OFTInteger fields will be set based on an atoi() conversion of the
string. OFTInteger64 fields will be set based on an CPLAtoGIntBig()
conversion of the string. OFTReal fields will be set based on an
CPLAtof() conversion of the string. Other field types may be
unaffected.

This function is the same as the C++ method OGRFeature::SetField().

This method has only an effect on the in-memory feature object. If
this object comes from a layer and the modifications must be
serialized back to the datasource, OGR_L_SetFeature() must be used
afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be
used afterwards.

Parameters
-----------
hFeat:
    handle to the feature that owned the field.
iField:
    the field to fetch, from 0 to GetFieldCount()-1.
pszValue:
    the value to assign.

)r   r  r   s     r   SetFieldStringFeature.SetFieldString  s    B **47$77r$   c                     g r/   r%   r  s    r   r  Feature.Reference      
r$   c                     g r/   r%   r  s    r   r  Feature.Dereference  rc  r$   c                 l    [         R                  " U 5        U R                  5         SU l        SU l        gr  )r   delete_Feature_invalidate_geom_refsr   r
   r  s    r   r  Feature.Destroy  s*    
$
  "dldir$   c                 $    U R                  U5      $ )z*Compares a feature to another for equality)r  )r   others     r   __cmp__Feature.__cmp__  s    zz%  r$   c                 "    U R                  5       $ r/   r  r  s    r   __copy__Feature.__copy__  s    zz|r$   c                 "   Sn[         R                  " U 5      n[        UR                  5       5       HY  nUR	                  U5      R                  5       nXQ:X  a  Us  $ US:  d  M3  UR                  5       UR                  5       :X  d  MW  UnM[     U$ )Nr   )r   ru  r>  r  r  r  lower)r   	fieldnamecase_insensitive_idxfdefnrD  r   s         r   r  Feature._getfieldindex  s~    !''-u**,-A%%a(002D %)djjlioo>O.O'($ . $#r$   c                     US;   a  U R                  U5      $ U R                  U5      nUS:  a3  U R                  U5      nUS:  a  [        U5      eU R	                  U5      $ U R                  U5      $ )z.Returns the values of fields by the given namer
   r   _geom_referencesr   )__getattribute__r  r  r   r  GetField)r   rG  idxs      r   __getattr__Feature.__getattr__  su    99((--!!#&7((-CQw$S))++C00==%%r$   c                    > US;   a  [         TU ]  X5        gU R                  U5      nUS:w  a  U R                  X25        gU R	                  U5      nUS:w  a  U R                  X25        gX R                  U'   g)z*Set the values of fields by the given namerz  rs  N)superr=   r  
_SetField2r  r  r1   )r   rG  r    r~  r   s       r   r=   Feature.__setattr__  sm    99G+%%c*Cby+,,S1"9%%c1).MM#&r$   c                 D   [        U[        5      (       a  U R                  U5      nOUnXR                  5       :X  a  [        eUS:  aH  [        U[        5      (       a  U R                  U5      nUS:  a  [        S5      eU R                  U5      $ U R                  U5      $ )z<Returns the values of fields by the given name / field_indexr   %Illegal field requested in GetField())	r   r=  r  r  r  r  KeyErrorr  r}  )r   rG  r  s      r   r  Feature.__getitem__  s    c3++C0II((**  q=#s## 2237	1}FGG++I66==++r$   c                 D   [        U[        5      (       a  U R                  U5      nOUnXR                  5       :X  a  [        eUS:  aH  [        U[        5      (       a  U R                  U5      nUS:  a  [        S5      eU R                  X25      $ U R                  X25      $ )z2Returns the value of a field by field name / indexr   z%Illegal field requested in SetField())	r   r=  r  r  r  r  r  r  r  )r   rG  r    r  s       r   __setitem__Feature.__setitem__  s    c3++C0II((**  q=#s## 2237	1}FGG((::??944r$   c                    [        U[        5      (       a  U R                  U5      nUS:  d  XR                  5       :  a  [	        S5      eU R                  U5      (       a  U R                  U5      (       a  g U R                  U5      nU[        :X  aR  U R                  U5      R                  5       [        :X  a  [        U R                  U5      5      $ U R                  U5      $ U[        :X  a  U R                  U5      $ U[         :X  a  U R#                  U5      $ U[$        :X  a  U R'                  U5      $ U[(        :X  aU  U R+                  U5      nU R                  U5      R                  5       [        :X  a  U Vs/ s H  n[        U5      PM     nnU$ U[,        :X  a  U R/                  U5      $ U[0        :X  a  U R3                  U5      $  U R5                  U5      $ s  snf !   U R7                  U5      s $ = f)Nr   r  )r   r=  r  r  r  r  r  r  
OFTIntegerr  
GetSubTypeOFSTBooleanboolr  OFTInteger64r  OFTRealr  OFTStringListr  OFTIntegerListr  OFTInteger64Listr  OFTRealListr  r  r  )r   r  fld_typerF  r   s        r   r}  Feature.GetField1  s   i%%++I6IMy+=+=+??BCC	**t/?/?	/J/J$$Y/z!##I.99;{JD229=>>)))44|#++I66w((33}$,,Y77~%,,Y7C##I.99;{J),-AQ-J''//	::{",,Y77	4((33 .	4((33s   <GG" "G7c                 x    [        U[        5      (       a  U R                  U5      nOUnU R                  X25        g)a|  
SetFieldBinary(Feature self, field_index_or_name: int | str, value: bytes)

Set field to binary data.
This function currently only has an effect on OFTBinary fields.
This function is the same as the C++ method OGRFeature::SetField().

Parameters
-----------
field_index_or_name:
    the field to set, from 0 to GetFieldCount()-1. Or the field name
values:
    the data to apply.
N)r   r=  r  r  )r   field_index_or_namer    r  s       r   SetFieldBinaryFeature.SetFieldBinaryU  s6      )3//++,?@I+IY.r$   c           	         [        U[        5      (       a  U R                  U5      nUS:  d  XR                  5       :  a  [	        S5      eUc  U R                  U5        g [        U[        5      (       a  U(       d  U R                  U5        g [        US   [        S5      5      (       d  [        US   [        S5      5      (       a  U R                  X5        g [        US   [        5      (       a  U R                  X5        g [        US   [        5      (       a  U R                  X5        g [        S[        [        US   5      5      -  5      e[        U[        [        [        45      (       a+  U R!                  U5      ["        :X  a  U R%                  X5        g  U R'                  X5        g !   U R'                  U[        U5      5         g = f)Nr   z'Illegal field requested in _SetField2()r   l   /g,z?Unsupported type of list in _SetField2(). Type of element is %s)r   r=  r  r  r  r  listr   r   floatr$  r)  rC  r  r  r  r  r  r  r  )r   r  r    s      r   r  Feature._SetField2k  s   i%%++I6IMy+=+=+??DEE=i(eT""!!),%(DG,,
58T.EY0Z0Z**9<E!He,,''	9E!Hc**''	9 adghlmrstmuhvdw wxxeeY
;<<ARARS\A]ajAj  2	1MM)+ 		1MM)SZ0s   F/ /Gc                     / n[        U R                  5       5       H3  nU R                  U5      R                  5       nUR	                  U5        M5     U$ )z8Return the list of field names (of the layer definition))r>  r  r  r  r  )r   rb  rD  ru  s       r   keysFeature.keys  sK    t))+,A,,Q/779ILL# - r$   c                 b    U R                  5       n0 nU H  nU R                  U5      X#'   M     U$ )zOReturn a dictionary with the field names as key, and their value in the feature)r  r}  )r   r  r  rG  s       r   rA  Feature.items  s1    yy{C--,FK r$   c                 "    U R                  5       $ )a%  Return the feature geometry

The lifetime of the returned geometry is bound to the one of its belonging
feature.

For more details: :cpp:func:`OGR_F_GetGeometryRef`

The GetGeometryRef() method is also available as an alias of geometry()

Returns
--------
Geometry:
    the geometry, or None.
)r  r  s    r   geometryFeature.geometry  s      ""$$r$   c                 $    U R                  5         g r/   )rh  r  s    r   r  Feature.__del__  s    ""$r$   c                 "    U R                  5       $ r/   )r  r  s    r   r   Feature.__repr__  s    ((**r$   c                     SSK nU R                  5       nUb&  Uc  / nUR	                  US9nUR                  U5      nOSnSU0 S.nU R                  5       nU[        :w  a  XS'   U R                  5        H  n	U R                  U R                  U	5      5      n
U
R                  5       [        R                  :X  aD  U
R                  5       [        R                  :X  a"  [!        U R#                  U	5      5      US   U	'   M  U R#                  U	5      US   U	'   M     U(       d  UR%                  U5      nU$ ! [         a"     SSKn GN?! [         a    [        S5      ef = ff = f)	zExports a GeoJSON object which represents the Feature. The
as_object parameter determines whether the returned value
should be a Python object instead of a string. Defaults to False.
The options parameter is passed to Geometry.ExportToJson()r   Nz=Unable to import simplejson or json, needed for ExportToJson.r`  rl  )r   r  
propertiesidr  )
simplejsonr]   jsonr  ExportToJsonloadsr  NullFIDr  r  r  GetTyper   r  r  r  r  r}  dumps)r   	as_objectr/  r  r  geom_json_stringgeom_json_objectr  fidrG  fld_defns              r   r  Feature.ExportToJson  sb   	c ""$#000A)//0@A#"/!#
 kkm'>4L99;C++D,>,>s,CDH!T__49L9L9NRVRbRb9b,0s1C,D|$S),0MM#,>|$S)  %%f-FE  	cc) c!"abbc	cs   D3 3
E>EEEc                     Uc  g [        U S5      (       d  SS KnUR                  5       U l        U R                  R	                  U5        g )Nr{  r   )r   rg  r  r{  r  )r   r  rg  s      r   r~  Feature._add_geom_ref  s>    <t/00$+OO$5D!!!$'r$   c                 \    [        U S5      (       a  U R                   H
  nS Ul        M     g g )Nr{  )r   r{  r
   )r   r  s     r   rh  Feature._invalidate_geom_refs  s,    4+,,-- 	 . -r$   )r{  r
   r   r  )FN)Zr   r   r:   r;   r<   r   r   r   r   r   rg  r   rV   rv  rz  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r
  r  r  r   r$  r)  r  r1  r5  r9  r=  rA  r  rH  rL  rP  rT  rX  r\  r_  r  r  r  rl  rp  r  r  r=   r  r  r}  r  r  r  rA  r  r  r  r~  rh  r>   __classcell__)r   s   @r   rl  rl  
  s   /-/IOdeGH**G4.#5J6 6D@/4/:7298;8=>:@C;> =D:>/<b ?D!AF >D>@:B4458>:78;>040<62>4*60!;J$2P =D"?H <D<@9E";H,8\8:826%2N>6)7V <D7<<@!8F!	$&"/ ,&5$"4H/,"H%$%+*Z	(! !r$   rl  c                       \ rS rSrSr\" S S SS9r\r\	R                  rS rS rS	 rS
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rSr g)FeatureDefni  z(Proxy of C++ OGRFeatureDefnShadow class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   FeatureDefn.<lambda>  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r    r   r$   r   r   c                 Z    [         R                  " U [         R                  " U0 UD65        g)zI__init__(FeatureDefn self, char const * name_null_ok=None) -> FeatureDefnN)r   FeatureDefn_swiginitnew_FeatureDefnr   s      r   rV   FeatureDefn.__init__  s"    !!$(<(<d(Mf(MNr$   c                 0    [         R                  " U /UQ76 $ )a  
GetName(FeatureDefn self) -> char const *
const char\*
OGR_FD_GetName(OGRFeatureDefnH hDefn)

Get name of the OGRFeatureDefn passed as an argument.

This function is the same as the C++ method OGRFeatureDefn::GetName().

Parameters
-----------
hDefn:
    handle to the feature definition to get the name from.

Returns
--------
str:
    the name. This name is internal and should not be modified, or freed.

)r   FeatureDefn_GetNamer   s     r   r  FeatureDefn.GetName  rN  r$   c                 0    [         R                  " U /UQ76 $ )ah  
GetFieldCount(FeatureDefn self) -> int
int
OGR_FD_GetFieldCount(OGRFeatureDefnH hDefn)

Fetch number of fields on the passed feature definition.

This function is the same as the C++ OGRFeatureDefn::GetFieldCount().

Parameters
-----------
hDefn:
    handle to the feature definition to get the fields count from.

Returns
--------
int:
    count of fields.

)r   FeatureDefn_GetFieldCountr   s     r   r  FeatureDefn.GetFieldCount  s    * --d:T::r$   c                 0    [         R                  " U /UQ76 $ )a[  
GetFieldDefn(FeatureDefn self, int i) -> FieldDefn
OGRFieldDefnH
OGR_FD_GetFieldDefn(OGRFeatureDefnH hDefn, int iField)

Fetch field definition of the passed feature definition.

This function is the same as the C++ method
OGRFeatureDefn::GetFieldDefn().

Parameters
-----------
hDefn:
    handle to the feature definition to get the field definition from.
iField:
    the field to fetch, between 0 and GetFieldCount()-1.

Returns
--------
OGRFieldDefnH:
    a handle to an internal field definition object or NULL if invalid
    index. This object should not be modified or freed by the application.

)r   FeatureDefn_GetFieldDefnr   s     r   r  FeatureDefn.GetFieldDefn3  s    2 ,,T9D99r$   c                 0    [         R                  " U /UQ76 $ )a%  
GetFieldIndex(FeatureDefn self, char const * field_name) -> int
int
OGR_FD_GetFieldIndex(OGRFeatureDefnH hDefn, const char \*pszFieldName)

Find field by name.

The field index of the first field matching the passed field name
(case insensitively) is returned.

This function is the same as the C++ method
OGRFeatureDefn::GetFieldIndex.

Parameters
-----------
hDefn:
    handle to the feature definition to get field index from.
pszFieldName:
    the field name to search for.

Returns
--------
int:
    the field index, or -1 if no match found.

)r   FeatureDefn_GetFieldIndexr   s     r   r  FeatureDefn.GetFieldIndexN  s    6 --d:T::r$   c                 0    [         R                  " U /UQ76 $ )a  
AddFieldDefn(FeatureDefn self, FieldDefn defn)
void
OGR_FD_AddFieldDefn(OGRFeatureDefnH hDefn, OGRFieldDefnH hNewField)

Add a new field definition to the passed feature definition.

To add a new field definition to a layer definition, do not use this
function directly, but use OGR_L_CreateField() instead.

This function should only be called while there are no OGRFeature
objects in existence based on this OGRFeatureDefn. The OGRFieldDefn
passed in is copied, and remains the responsibility of the caller.

This function is the same as the C++ method
OGRFeatureDefn::AddFieldDefn().

Parameters
-----------
hDefn:
    handle to the feature definition to add the field definition to.
hNewField:
    handle to the new field definition.

)r   FeatureDefn_AddFieldDefnr   s     r   AddFieldDefnFeatureDefn.AddFieldDefnk  s    4 ,,T9D99r$   c                 0    [         R                  " U /UQ76 $ )a  
GetGeomFieldCount(FeatureDefn self) -> int
int
OGR_FD_GetGeomFieldCount(OGRFeatureDefnH hDefn)

Fetch number of geometry fields on the passed feature definition.

This function is the same as the C++
OGRFeatureDefn::GetGeomFieldCount().

.. versionadded:: 1.11

Parameters
-----------
hDefn:
    handle to the feature definition to get the fields count from.

Returns
--------
int:
    count of geometry fields.

)r   FeatureDefn_GetGeomFieldCountr   s     r   r  FeatureDefn.GetGeomFieldCount  s    0 11$>>>r$   c                 0    [         R                  " U /UQ76 $ )a  
GetGeomFieldDefn(FeatureDefn self, int i) -> GeomFieldDefn
OGRGeomFieldDefnH
OGR_FD_GetGeomFieldDefn(OGRFeatureDefnH hDefn, int iGeomField)

Fetch geometry field definition of the passed feature definition.

This function is the same as the C++ method
OGRFeatureDefn::GetGeomFieldDefn().

.. versionadded:: 1.11

Parameters
-----------
hDefn:
    handle to the feature definition to get the field definition from.
iGeomField:
    the geometry field to fetch, between 0 and GetGeomFieldCount() - 1.

Returns
--------
OGRGeomFieldDefnH:
    a handle to an internal field definition object or NULL if invalid
    index. This object should not be modified or freed by the application.

)r   FeatureDefn_GetGeomFieldDefnr   s     r   GetGeomFieldDefnFeatureDefn.GetGeomFieldDefn  r  r$   c                 0    [         R                  " U /UQ76 $ )af  
GetGeomFieldIndex(FeatureDefn self, char const * field_name) -> int
int
OGR_FD_GetGeomFieldIndex(OGRFeatureDefnH hDefn, const char
\*pszGeomFieldName)

Find geometry field by name.

The geometry field index of the first geometry field matching the
passed field name (case insensitively) is returned.

This function is the same as the C++ method
OGRFeatureDefn::GetGeomFieldIndex.

Parameters
-----------
hDefn:
    handle to the feature definition to get field index from.
pszGeomFieldName:
    the geometry field name to search for.

Returns
--------
int:
    the geometry field index, or -1 if no match found.

)r   FeatureDefn_GetGeomFieldIndexr   s     r   r  FeatureDefn.GetGeomFieldIndex  s    8 11$>>>r$   c                 0    [         R                  " U /UQ76 $ )a-  
AddGeomFieldDefn(FeatureDefn self, GeomFieldDefn defn)
void
OGR_FD_AddGeomFieldDefn(OGRFeatureDefnH hDefn, OGRGeomFieldDefnH
hNewGeomField)

Add a new field definition to the passed feature definition.

To add a new field definition to a layer definition, do not use this
function directly, but use OGR_L_CreateGeomField() instead.

This function should only be called while there are no OGRFeature
objects in existence based on this OGRFeatureDefn. The
OGRGeomFieldDefn passed in is copied, and remains the responsibility
of the caller.

This function is the same as the C++ method
OGRFeatureDefn::AddGeomFieldDefn().

.. versionadded:: 1.11

Parameters
-----------
hDefn:
    handle to the feature definition to add the geometry field
    definition to.
hNewGeomField:
    handle to the new field definition.

)r   FeatureDefn_AddGeomFieldDefnr   s     r   AddGeomFieldDefnFeatureDefn.AddGeomFieldDefn  s    > 00===r$   c                 0    [         R                  " U /UQ76 $ )a  
DeleteGeomFieldDefn(FeatureDefn self, int idx) -> OGRErr
OGRErr
OGR_FD_DeleteGeomFieldDefn(OGRFeatureDefnH hDefn, int iGeomField)

Delete an existing geometry field definition.

To delete an existing geometry field definition from a layer
definition, do not use this function directly, but use
OGR_L_DeleteGeomField() instead ( not implemented yet).

This method should only be called while there are no OGRFeature
objects in existence based on this OGRFeatureDefn.

This method is the same as the C++ method
OGRFeatureDefn::DeleteGeomFieldDefn().

.. versionadded:: 1.11

Parameters
-----------
hDefn:
    handle to the feature definition.
iGeomField:
    the index of the geometry field definition.

Returns
--------
OGRErr:
    OGRERR_NONE in case of success.

)r   FeatureDefn_DeleteGeomFieldDefnr   s     r   DeleteGeomFieldDefnFeatureDefn.DeleteGeomFieldDefn  r  r$   c                 0    [         R                  " U /UQ76 $ )a  
GetGeomType(FeatureDefn self) -> OGRwkbGeometryType
OGRwkbGeometryType
OGR_FD_GetGeomType(OGRFeatureDefnH hDefn)

Fetch the geometry base type of the passed feature definition.

This function is the same as the C++ method
OGRFeatureDefn::GetGeomType().

Starting with GDAL 1.11, this method returns
GetGeomFieldDefn(0)->GetType().

Parameters
-----------
hDefn:
    handle to the feature definition to get the geometry type from.

Returns
--------
OGRwkbGeometryType:
    the base type for all geometry related to this definition.

)r   FeatureDefn_GetGeomTyper   s     r   r.  FeatureDefn.GetGeomType   s    2 ++D8488r$   c                 0    [         R                  " U /UQ76 $ )a  
SetGeomType(FeatureDefn self, OGRwkbGeometryType geom_type)
void
OGR_FD_SetGeomType(OGRFeatureDefnH hDefn, OGRwkbGeometryType eType)

Assign the base geometry type for the passed layer (the same as the
feature definition).

All geometry objects using this type must be of the defined type or a
derived type. The default upon creation is wkbUnknown which allows for
any geometry type. The geometry type should generally not be changed
after any OGRFeatures have been created against this definition.

This function is the same as the C++ method
OGRFeatureDefn::SetGeomType().

Starting with GDAL 1.11, this method calls
GetGeomFieldDefn(0)->SetType().

Parameters
-----------
hDefn:
    handle to the layer or feature definition to set the geometry type to.
eType:
    the new type to assign.

)r   FeatureDefn_SetGeomTyper   s     r   SetGeomTypeFeatureDefn.SetGeomType;  s    8 ++D8488r$   c                 0    [         R                  " U /UQ76 $ )aq  
GetReferenceCount(FeatureDefn self) -> int
int
OGR_FD_GetReferenceCount(OGRFeatureDefnH hDefn)

Fetch current reference count.

This function is the same as the C++ method
OGRFeatureDefn::GetReferenceCount().

Parameters
-----------
hDefn:
    handle to the feature definition on witch OGRFeature are based on.

Returns
--------
int:
    the current reference count.

)r   FeatureDefn_GetReferenceCountr   s     r   GetReferenceCountFeatureDefn.GetReferenceCountY  s    , 11$>>>r$   c                 0    [         R                  " U /UQ76 $ )a  
IsGeometryIgnored(FeatureDefn self) -> int
int
OGR_FD_IsGeometryIgnored(OGRFeatureDefnH hDefn)

Determine whether the geometry can be omitted when fetching features.

This function is the same as the C++ method
OGRFeatureDefn::IsGeometryIgnored().

Starting with GDAL 1.11, this method returns
GetGeomFieldDefn(0)->IsIgnored().

Parameters
-----------
hDefn:
    handle to the feature definition on witch OGRFeature are based on.

Returns
--------
int:
    ignore state

)r   FeatureDefn_IsGeometryIgnoredr   s     r   IsGeometryIgnoredFeatureDefn.IsGeometryIgnoredq  s    2 11$>>>r$   c                 0    [         R                  " U /UQ76 $ )a  
SetGeometryIgnored(FeatureDefn self, int bIgnored)
void
OGR_FD_SetGeometryIgnored(OGRFeatureDefnH hDefn, int bIgnore)

Set whether the geometry can be omitted when fetching features.

This function is the same as the C++ method
OGRFeatureDefn::SetGeometryIgnored().

Starting with GDAL 1.11, this method calls
GetGeomFieldDefn(0)->SetIgnored().

Parameters
-----------
hDefn:
    handle to the feature definition on witch OGRFeature are based on.
bIgnore:
    ignore state

)r   FeatureDefn_SetGeometryIgnoredr   s     r   SetGeometryIgnoredFeatureDefn.SetGeometryIgnored  s    , 224?$??r$   c                 0    [         R                  " U /UQ76 $ )a|  
IsStyleIgnored(FeatureDefn self) -> int
int
OGR_FD_IsStyleIgnored(OGRFeatureDefnH hDefn)

Determine whether the style can be omitted when fetching features.

This function is the same as the C++ method
OGRFeatureDefn::IsStyleIgnored().

Parameters
-----------
hDefn:
    handle to the feature definition on which OGRFeature are based on.

Returns
--------
int:
    ignore state

)r   FeatureDefn_IsStyleIgnoredr   s     r   IsStyleIgnoredFeatureDefn.IsStyleIgnored  s    , ..t;d;;r$   c                 0    [         R                  " U /UQ76 $ )a  
SetStyleIgnored(FeatureDefn self, int bIgnored)
void
OGR_FD_SetStyleIgnored(OGRFeatureDefnH hDefn, int bIgnore)

Set whether the style can be omitted when fetching features.

This function is the same as the C++ method
OGRFeatureDefn::SetStyleIgnored().

Parameters
-----------
hDefn:
    handle to the feature definition on witch OGRFeature are based on.
bIgnore:
    ignore state

)r   FeatureDefn_SetStyleIgnoredr   s     r   SetStyleIgnoredFeatureDefn.SetStyleIgnored  s    & //<t<<r$   c                 0    [         R                  " U /UQ76 $ )a  
IsSame(FeatureDefn self, FeatureDefn other_defn) -> int
int OGR_FD_IsSame(OGRFeatureDefnH
hFDefn, OGRFeatureDefnH hOtherFDefn)

Test if the feature definition is identical to the other one.

.. versionadded:: 1.11

Parameters
-----------
hFDefn:
    handle to the feature definition on witch OGRFeature are based on.
hOtherFDefn:
    handle to the other feature definition to compare to.

Returns
--------
int:
    TRUE if the feature definition is identical to the other one.

)r   FeatureDefn_IsSamer   s     r   IsSameFeatureDefn.IsSame  r|  r$   c                 >    [         R                  " U 5        SU l        gr  )r   delete_FeatureDefnr   r  s    r   r  FeatureDefn.Destroy  s    
d#dlr$   r   N)!r   r   r:   r;   r<   r   r   r   r   r   r  r   rV   r  r  r  r  r  r  r  r  r  r  r.  r  r  r  r  r  r  r
  r  r>   r%   r$   r   r  r    s    3-/IOdeGH..O5.;.:6;::8?4>:?<>B!AF969<?0?6@0<0=*42r$   r  c                   t   \ rS rSrSr\" S S SS9r\r\	R                  rS rS rS	 rS
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS r S r!S r"S r#S r$S  r%S! r&S" r'S# r(S$ r)S% r*S& r+S' r,S( r-\" \\5      r.\" \\5      r/\" \\5      r0\" \\5      r1\" \\5      r2S) r3S*r4g+),	FieldDefni  z&Proxy of C++ OGRFieldDefnShadow class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   FieldDefn.<lambda>  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r    r   r$   r   r   c                 Z    [         R                  " U [         R                  " U0 UD65        g)zm__init__(FieldDefn self, char const * name_null_ok="unnamed", OGRFieldType field_type=OFTString) -> FieldDefnN)r   FieldDefn_swiginitnew_FieldDefnr   s      r   rV   FieldDefn.__init__  s"    d&8&8$&I&&IJr$   c                 0    [         R                  " U /UQ76 $ )z'GetName(FieldDefn self) -> char const *)r   FieldDefn_GetNamer   s     r   r  FieldDefn.GetName  r  r$   c                 0    [         R                  " U /UQ76 $ )aF  
GetNameRef(FieldDefn self) -> char const *
const char\*
OGR_Fld_GetNameRef(OGRFieldDefnH hDefn)

Fetch name of this field.

This function is the same as the CPP method
OGRFieldDefn::GetNameRef().

Parameters
-----------
hDefn:
    handle to the field definition.

Returns
--------
str:
    the name of the field definition.

)r   FieldDefn_GetNameRefr   s     r   
GetNameRefFieldDefn.GetNameRef  rn  r$   c                 0    [         R                  " U /UQ76 $ )aR  
SetName(FieldDefn self, char const * name)
void OGR_Fld_SetName(OGRFieldDefnH
hDefn, const char \*pszName)

Reset the name of this field.

This function is the same as the CPP method OGRFieldDefn::SetName().

Parameters
-----------
hDefn:
    handle to the field definition to apply the new name to.
pszName:
    the new name to apply.

)r   FieldDefn_SetNamer   s     r   SetNameFieldDefn.SetName  s    $ %%d2T22r$   c                 0    [         R                  " U /UQ76 $ )z2GetAlternativeName(FieldDefn self) -> char const *)r   FieldDefn_GetAlternativeNamer   s     r   GetAlternativeNameFieldDefn.GetAlternativeName.  r   r$   c                 0    [         R                  " U /UQ76 $ )a&  
GetAlternativeNameRef(FieldDefn self) -> char const *
const char\*
OGR_Fld_GetAlternativeNameRef(OGRFieldDefnH hDefn)

Fetch the alternative name (or "alias") for this field.

The alternative name is an optional attribute for a field which can
provide a more user-friendly, descriptive name of a field which is not
subject to the usual naming constraints defined by the data provider.

This is a metadata style attribute only: the alternative name cannot
be used in place of the actual field name during SQL queries or other
field name dependent API calls.

This function is the same as the CPP method
OGRFieldDefn::GetAlternativeNameRef().

.. versionadded:: 3.2

Parameters
-----------
hDefn:
    handle to the field definition.

Returns
--------
str:
    the alternative name of the field definition.

)r   FieldDefn_GetAlternativeNameRefr   s     r   GetAlternativeNameRefFieldDefn.GetAlternativeNameRef2  s    @ 33D@4@@r$   c                 0    [         R                  " U /UQ76 $ )a[  
SetAlternativeName(FieldDefn self, char const * alternativeName)
void
OGR_Fld_SetAlternativeName(OGRFieldDefnH hDefn, const char
\*pszAlternativeName)

Reset the alternative name (or "alias") for this field.

The alternative name is an optional attribute for a field which can
provide a more user-friendly, descriptive name of a field which is not
subject to the usual naming constraints defined by the data provider.

This is a metadata style attribute only: the alternative name cannot
be used in place of the actual field name during SQL queries or other
field name dependent API calls.

This function is the same as the CPP method
OGRFieldDefn::SetAlternativeName().

.. versionadded:: 3.2

Parameters
-----------
hDefn:
    handle to the field definition to apply the new alternative name to.
pszAlternativeName:
    the new alternative name to apply.

)r   FieldDefn_SetAlternativeNamer   s     r   SetAlternativeNameFieldDefn.SetAlternativeNameT  r  r$   c                 0    [         R                  " U /UQ76 $ )aA  
GetType(FieldDefn self) -> OGRFieldType
OGRFieldType
OGR_Fld_GetType(OGRFieldDefnH hDefn)

Fetch type of this field.

This function is the same as the CPP method OGRFieldDefn::GetType().

Parameters
-----------
hDefn:
    handle to the field definition to get type from.

Returns
--------
OGRFieldType:
    field type.

)r   FieldDefn_GetTyper   s     r   r  FieldDefn.GetTypet      * %%d2T22r$   c                 0    [         R                  " U /UQ76 $ )a  
SetType(FieldDefn self, OGRFieldType type)
void OGR_Fld_SetType(OGRFieldDefnH
hDefn, OGRFieldType eType)

Set the type of this field.

This should never be done to an OGRFieldDefn that is already part of
an OGRFeatureDefn.

This function is the same as the CPP method OGRFieldDefn::SetType().

Parameters
-----------
hDefn:
    handle to the field definition to set type to.
eType:
    the new field type.

)r   FieldDefn_SetTyper   s     r   SetTypeFieldDefn.SetType  r3  r$   c                 0    [         R                  " U /UQ76 $ )as  
GetSubType(FieldDefn self) -> OGRFieldSubType
OGRFieldSubType
OGR_Fld_GetSubType(OGRFieldDefnH hDefn)

Fetch subtype of this field.

This function is the same as the CPP method
OGRFieldDefn::GetSubType().

.. versionadded:: 2.0

Parameters
-----------
hDefn:
    handle to the field definition to get subtype from.

Returns
--------
OGRFieldSubType:
    field subtype.

)r   FieldDefn_GetSubTyper   s     r   r  FieldDefn.GetSubType      0 ((555r$   c                 0    [         R                  " U /UQ76 $ )a  
SetSubType(FieldDefn self, OGRFieldSubType type)
void
OGR_Fld_SetSubType(OGRFieldDefnH hDefn, OGRFieldSubType eSubType)

Set the subtype of this field.

This should never be done to an OGRFieldDefn that is already part of
an OGRFeatureDefn.

This function is the same as the CPP method
OGRFieldDefn::SetSubType().

.. versionadded:: 2.0

Parameters
-----------
hDefn:
    handle to the field definition to set type to.
eSubType:
    the new field subtype.

)r   FieldDefn_SetSubTyper   s     r   
SetSubTypeFieldDefn.SetSubType  r;  r$   c                 0    [         R                  " U /UQ76 $ )a  
GetJustify(FieldDefn self) -> OGRJustification
OGRJustification
OGR_Fld_GetJustify(OGRFieldDefnH hDefn)

Get the justification for this field.

This function is the same as the CPP method
OGRFieldDefn::GetJustify().

Note: no driver is know to use the concept of field justification.

Parameters
-----------
hDefn:
    handle to the field definition to get justification from.

Returns
--------
OGRJustification:
    the justification.

)r   FieldDefn_GetJustifyr   s     r   
GetJustifyFieldDefn.GetJustify  r;  r$   c                 0    [         R                  " U /UQ76 $ )a  
SetJustify(FieldDefn self, OGRJustification justify)
void
OGR_Fld_SetJustify(OGRFieldDefnH hDefn, OGRJustification eJustify)

Set the justification for this field.

Note: no driver is know to use the concept of field justification.

This function is the same as the CPP method
OGRFieldDefn::SetJustify().

Parameters
-----------
hDefn:
    handle to the field definition to set justification to.
eJustify:
    the new justification.

)r   FieldDefn_SetJustifyr   s     r   
SetJustifyFieldDefn.SetJustify  s    * ((555r$   c                 0    [         R                  " U /UQ76 $ )aX  
GetWidth(FieldDefn self) -> int
int OGR_Fld_GetWidth(OGRFieldDefnH
hDefn)

Get the formatting width for this field.

This function is the same as the CPP method OGRFieldDefn::GetWidth().

Parameters
-----------
hDefn:
    handle to the field definition to get width from.


Returns
--------
int:
    the width, zero means no specified width.

)r   FieldDefn_GetWidthr   s     r   GetWidthFieldDefn.GetWidth  s    , &&t3d33r$   c                 0    [         R                  " U /UQ76 $ )aP  
SetWidth(FieldDefn self, int width)
void OGR_Fld_SetWidth(OGRFieldDefnH
hDefn, int nNewWidth)

Set the formatting width for this field in characters.

This function is the same as the CPP method OGRFieldDefn::SetWidth().

Parameters
-----------
hDefn:
    handle to the field definition to set width to.
nNewWidth:
    the new width.

)r   FieldDefn_SetWidthr   s     r   SetWidthFieldDefn.SetWidth  s    $ &&t3d33r$   c                 0    [         R                  " U /UQ76 $ )a  
GetPrecision(FieldDefn self) -> int
int
OGR_Fld_GetPrecision(OGRFieldDefnH hDefn)

Get the formatting precision for this field.

This should normally be zero for fields of types other than OFTReal.

This function is the same as the CPP method
OGRFieldDefn::GetPrecision().

Parameters
-----------
hDefn:
    handle to the field definition to get precision from.

Returns
--------
int:
    the precision.

)r   FieldDefn_GetPrecisionr   s     r   GetPrecisionFieldDefn.GetPrecision3  s    0 **47$77r$   c                 0    [         R                  " U /UQ76 $ )a  
SetPrecision(FieldDefn self, int precision)
void
OGR_Fld_SetPrecision(OGRFieldDefnH hDefn, int nPrecision)

Set the formatting precision for this field in characters.

This should normally be zero for fields of types other than OFTReal.

This function is the same as the CPP method
OGRFieldDefn::SetPrecision().

Parameters
-----------
hDefn:
    handle to the field definition to set precision to.
nPrecision:
    the new precision.

)r   FieldDefn_SetPrecisionr   s     r   SetPrecisionFieldDefn.SetPrecisionM      * **47$77r$   c                 0    [         R                  " U /UQ76 $ )z GetTZFlag(FieldDefn self) -> int)r   FieldDefn_GetTZFlagr   s     r   	GetTZFlagFieldDefn.GetTZFlagd  r   r$   c                 0    [         R                  " U /UQ76 $ )z%SetTZFlag(FieldDefn self, int tzflag))r   FieldDefn_SetTZFlagr   s     r   	SetTZFlagFieldDefn.SetTZFlagh  r   r$   c                 0    [         R                  " U /UQ76 $ )z+GetTypeName(FieldDefn self) -> char const *)r   FieldDefn_GetTypeNamer   s     r   GetTypeNameFieldDefn.GetTypeNamel  r	  r$   c                 0    [         R                  " U /UQ76 $ )zCGetFieldTypeName(FieldDefn self, OGRFieldType type) -> char const *)r   FieldDefn_GetFieldTypeNamer   s     r   GetFieldTypeNameFieldDefn.GetFieldTypeNamep  r   r$   c                 0    [         R                  " U /UQ76 $ )aC  
IsIgnored(FieldDefn self) -> int
int OGR_Fld_IsIgnored(OGRFieldDefnH
hDefn)

Return whether this field should be omitted when fetching features.

This method is the same as the C++ method OGRFieldDefn::IsIgnored().

Parameters
-----------
hDefn:
    handle to the field definition

Returns
--------
int:
    ignore state

)r   FieldDefn_IsIgnoredr   s     r   	IsIgnoredFieldDefn.IsIgnoredt  rN  r$   c                 0    [         R                  " U /UQ76 $ )aH  
SetIgnored(FieldDefn self, int bIgnored)
void
OGR_Fld_SetIgnored(OGRFieldDefnH hDefn, int ignore)

Set whether this field should be omitted when fetching features.

This method is the same as the C++ method OGRFieldDefn::SetIgnored().

Parameters
-----------
hDefn:
    handle to the field definition
ignore:
    ignore state

)r   FieldDefn_SetIgnoredr   s     r   
SetIgnoredFieldDefn.SetIgnored  s    $ ((555r$   c                 0    [         R                  " U /UQ76 $ )a  
IsNullable(FieldDefn self) -> int
int
OGR_Fld_IsNullable(OGRFieldDefnH hDefn)

Return whether this field can receive null values.

By default, fields are nullable.

Even if this method returns FALSE (i.e not-nullable field), it doesn't
mean that OGRFeature::IsFieldSet() will necessary return TRUE, as
fields can be temporary unset and null/not-null validation is usually
done when OGRLayer::CreateFeature()/SetFeature() is called.

This method is the same as the C++ method OGRFieldDefn::IsNullable().

.. versionadded:: 2.0

Parameters
-----------
hDefn:
    handle to the field definition


Returns
--------
int:
    TRUE if the field is authorized to be null.

)r   FieldDefn_IsNullabler   s     r   
IsNullableFieldDefn.IsNullable  r  r$   c                 0    [         R                  " U /UQ76 $ )ae  
SetNullable(FieldDefn self, int bNullable)
void
OGR_Fld_SetNullable(OGRFieldDefnH hDefn, int bNullableIn)

Set whether this field can receive null values.

By default, fields are nullable, so this method is generally called
with FALSE to set a not-null constraint.

Drivers that support writing not-null constraint will advertise the
GDAL_DCAP_NOTNULL_FIELDS driver metadata item.

This method is the same as the C++ method OGRFieldDefn::SetNullable().

.. versionadded:: 2.0

Parameters
-----------
hDefn:
    handle to the field definition
bNullableIn:
    FALSE if the field must have a not-null constraint.

)r   FieldDefn_SetNullabler   s     r   SetNullableFieldDefn.SetNullable  r  r$   c                 0    [         R                  " U /UQ76 $ )a  
IsUnique(FieldDefn self) -> int
int OGR_Fld_IsUnique(OGRFieldDefnH
hDefn)

Return whether this field has a unique constraint.

By default, fields have no unique constraint.

This method is the same as the C++ method OGRFieldDefn::IsUnique().

.. versionadded:: 3.2

Parameters
-----------
hDefn:
    handle to the field definition


Returns
--------
int:
    TRUE if the field has a unique constraint.

)r   FieldDefn_IsUniquer   s     r   IsUniqueFieldDefn.IsUnique  s    4 &&t3d33r$   c                 0    [         R                  " U /UQ76 $ )a|  
SetUnique(FieldDefn self, int bUnique)
void
OGR_Fld_SetUnique(OGRFieldDefnH hDefn, int bUniqueIn)

Set whether this field has a unique constraint.

By default, fields have no unique constraint, so this method is
generally called with TRUE to set a unique constraint.

Drivers that support writing unique constraint will advertise the
GDAL_DCAP_UNIQUE_FIELDS driver metadata item. field can receive null
values.

This method is the same as the C++ method OGRFieldDefn::SetUnique().

.. versionadded:: 3.2

Parameters
-----------
hDefn:
    handle to the field definition
bUniqueIn:
    TRUE if the field must have a unique constraint.

)r   FieldDefn_SetUniquer   s     r   	SetUniqueFieldDefn.SetUnique  s    6 ''4t44r$   c                 0    [         R                  " U /UQ76 $ )aW  
GetDefault(FieldDefn self) -> char const *
const char\*
OGR_Fld_GetDefault(OGRFieldDefnH hDefn)

Get default field value.

This function is the same as the C++ method
OGRFieldDefn::GetDefault().

.. versionadded:: 2.0

Parameters
-----------
hDefn:
    handle to the field definition.

Returns
--------
str:
    default field value or NULL.

)r   FieldDefn_GetDefaultr   s     r   
GetDefaultFieldDefn.GetDefault  r;  r$   c                 0    [         R                  " U /UQ76 $ )a  
SetDefault(FieldDefn self, char const * pszValue)
void
OGR_Fld_SetDefault(OGRFieldDefnH hDefn, const char \*pszDefault)

Set default field value.

The default field value is taken into account by drivers (generally
those with a SQL interface) that support it at field creation time.
OGR will generally not automatically set the default field value to
null fields by itself when calling OGRFeature::CreateFeature() /
OGRFeature::SetFeature(), but will let the low-level layers to do the
job. So retrieving the feature from the layer is recommended.

The accepted values are NULL, a numeric value, a literal value
enclosed between single quote characters (and inner single quote
characters escaped by repetition of the single quote character),
CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE or a driver specific
expression (that might be ignored by other drivers). For a datetime
literal value, format should be 'YYYY/MM/DD HH:MM:SS[.sss]'
(considered as UTC time).

Drivers that support writing DEFAULT clauses will advertise the
GDAL_DCAP_DEFAULT_FIELDS driver metadata item.

This function is the same as the C++ method
OGRFieldDefn::SetDefault().

.. versionadded:: 2.0

Parameters
-----------
hDefn:
    handle to the field definition.
pszDefault:
    new default field value or NULL pointer.

)r   FieldDefn_SetDefaultr   s     r   
SetDefaultFieldDefn.SetDefault/  s    N ((555r$   c                 0    [         R                  " U /UQ76 $ )ak  
IsDefaultDriverSpecific(FieldDefn self) -> int
int
OGR_Fld_IsDefaultDriverSpecific(OGRFieldDefnH hDefn)

Returns whether the default value is driver specific.

Driver specific default values are those that are not NULL, a numeric
value, a literal value enclosed between single quote characters,
CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE or datetime literal
value.

This function is the same as the C++ method
OGRFieldDefn::IsDefaultDriverSpecific().

.. versionadded:: 2.0

Parameters
-----------
hDefn:
    handle to the field definition


Returns
--------
int:
    TRUE if the default value is driver specific.

)r   !FieldDefn_IsDefaultDriverSpecificr   s     r   IsDefaultDriverSpecific!FieldDefn.IsDefaultDriverSpecificX  s    < 55dBTBBr$   c                 0    [         R                  " U /UQ76 $ )aL  
GetDomainName(FieldDefn self) -> char const *
const char\*
OGR_Fld_GetDomainName(OGRFieldDefnH hDefn)

Return the name of the field domain for this field.

By default, none (empty string) is returned.

Field domains ( OGRFieldDomain class) are attached at the GDALDataset
level and should be retrieved with GDALDatasetGetFieldDomain().

This method is the same as the C++ method
OGRFieldDefn::GetDomainName().

.. versionadded:: 3.3

Parameters
-----------
hDefn:
    handle to the field definition

Returns
--------
str:
    the field domain name, or an empty string if there is none.

)r   FieldDefn_GetDomainNamer   s     r   GetDomainNameFieldDefn.GetDomainNamex  s    : ++D8488r$   c                 0    [         R                  " U /UQ76 $ )a  
SetDomainName(FieldDefn self, char const * name)
void
OGR_Fld_SetDomainName(OGRFieldDefnH hDefn, const char \*pszFieldName)

Set the name of the field domain for this field.

Field domains ( OGRFieldDomain) are attached at the GDALDataset level.

This method is the same as the C++ method
OGRFieldDefn::SetDomainName().

.. versionadded:: 3.3

Parameters
-----------
hDefn:
    handle to the field definition
pszFieldName:
    Field domain name.

)r   FieldDefn_SetDomainNamer   s     r   SetDomainNameFieldDefn.SetDomainName  s    . ++D8488r$   c                 0    [         R                  " U /UQ76 $ )z*GetComment(FieldDefn self) -> char const *)r   FieldDefn_GetCommentr   s     r   
GetCommentFieldDefn.GetComment  r  r$   c                 0    [         R                  " U /UQ76 $ )z0SetComment(FieldDefn self, char const * comment))r   FieldDefn_SetCommentr   s     r   
SetCommentFieldDefn.SetComment  r  r$   c                 >    [         R                  " U 5        SU l        gr  )r   delete_FieldDefnr   r  s    r   r  FieldDefn.Destroy  s    
D!dlr$   r  N)5r   r   r:   r;   r<   r   r   r   r   r   r  r   rV   r  r  r"  r&  r*  r.  r  r6  r  r>  rB  rF  rJ  rN  rR  rV  r[  r_  rc  rg  rk  ro  rs  rw  r{  r  r  r  r  r  r  r  r  widthr   	precisionr   justifyr  r>   r%   r$   r   r  r    s   1-/IOdeGH,,K3603(> AD>@3.3.6464646.404(848.557<5.6(6B78485:64'6RC@9>9266 Xx(EGW%D|4IGW%Dz:.Gr$   r  c                       \ rS rSrSr\" S S SS9r\r\	R                  rS rS rS	 rS
 rS rS rS rS rS rS rS rS r\" \\5      r\" \\5      r\" \\5      rSrg)GeomFieldDefni  z*Proxy of C++ OGRGeomFieldDefnShadow class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   GeomFieldDefn.<lambda>  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r    r   r$   r   r   c                 Z    [         R                  " U [         R                  " U0 UD65        g)zu__init__(GeomFieldDefn self, char const * name_null_ok="", OGRwkbGeometryType field_type=wkbUnknown) -> GeomFieldDefnN)r   GeomFieldDefn_swiginitnew_GeomFieldDefnr   s      r   rV   GeomFieldDefn.__init__  s"    ##D$*@*@$*Q&*QRr$   c                 0    [         R                  " U /UQ76 $ )z+GetName(GeomFieldDefn self) -> char const *)r   GeomFieldDefn_GetNamer   s     r   r  GeomFieldDefn.GetName  r	  r$   c                 0    [         R                  " U /UQ76 $ )z.GetNameRef(GeomFieldDefn self) -> char const *)r   GeomFieldDefn_GetNameRefr   s     r   r  GeomFieldDefn.GetNameRef  r  r$   c                 0    [         R                  " U /UQ76 $ )z.SetName(GeomFieldDefn self, char const * name))r   GeomFieldDefn_SetNamer   s     r   r"  GeomFieldDefn.SetName  r	  r$   c                 0    [         R                  " U /UQ76 $ )z1GetType(GeomFieldDefn self) -> OGRwkbGeometryType)r   GeomFieldDefn_GetTyper   s     r   r  GeomFieldDefn.GetType  r	  r$   c                 0    [         R                  " U /UQ76 $ )z4SetType(GeomFieldDefn self, OGRwkbGeometryType type))r   GeomFieldDefn_SetTyper   s     r   r6  GeomFieldDefn.SetType  r	  r$   c                 0    [         R                  " U /UQ76 $ )z5GetSpatialRef(GeomFieldDefn self) -> SpatialReference)r   GeomFieldDefn_GetSpatialRefr   s     r   r  GeomFieldDefn.GetSpatialRef  r   r$   c                 0    [         R                  " U /UQ76 $ )z7SetSpatialRef(GeomFieldDefn self, SpatialReference srs))r   GeomFieldDefn_SetSpatialRefr   s     r   SetSpatialRefGeomFieldDefn.SetSpatialRef  r   r$   c                 0    [         R                  " U /UQ76 $ )z$IsIgnored(GeomFieldDefn self) -> int)r   GeomFieldDefn_IsIgnoredr   s     r   rk  GeomFieldDefn.IsIgnored  r   r$   c                 0    [         R                  " U /UQ76 $ )z,SetIgnored(GeomFieldDefn self, int bIgnored))r   GeomFieldDefn_SetIgnoredr   s     r   ro  GeomFieldDefn.SetIgnored  r  r$   c                 0    [         R                  " U /UQ76 $ )z%IsNullable(GeomFieldDefn self) -> int)r   GeomFieldDefn_IsNullabler   s     r   rs  GeomFieldDefn.IsNullable  r  r$   c                 0    [         R                  " U /UQ76 $ )z.SetNullable(GeomFieldDefn self, int bNullable))r   GeomFieldDefn_SetNullabler   s     r   rw  GeomFieldDefn.SetNullable  r   r$   r%   N)r   r   r:   r;   r<   r   r   r   r   r   delete_GeomFieldDefnr   rV   r  r  r"  r  r6  r  r  rk  ro  rs  rw  r   r   srsr>   r%   r$   r   r  r    s    5-/IOdeGH00S7:777==9::; GW%DGW%D
=-
0Cr$   r  c                  .    [         R                  " U 0 UD6$ )zNCreateGeometryFromWkb(size_t len, SpatialReference reference=None) -> Geometry)r   CreateGeometryFromWkbrB   r   s     r   r  r        %%t6v66r$   c                  .    [         R                  " U 0 UD6$ )zOCreateGeometryFromWkt(char ** val, SpatialReference reference=None) -> Geometry)r   CreateGeometryFromWktr  s     r   r  r  
  r  r$   c                  (    [         R                  " U 6 $ )z<CreateGeometryFromGML(char const * input_string) -> Geometry)r   CreateGeometryFromGMLrA   s    r   r  r        %%t,,r$   c                  (    [         R                  " U 6 $ )z=CreateGeometryFromJson(char const * input_string) -> Geometry)r   CreateGeometryFromJsonrA   s    r   r  r        &&--r$   c                  (    [         R                  " U 6 $ )zACreateGeometryFromEsriJson(char const * input_string) -> Geometry)r   CreateGeometryFromEsriJsonrA   s    r   r  r    s    **D11r$   c                  .    [         R                  " U 0 UD6$ )zvBuildPolygonFromEdges(Geometry hLineCollection, int bBestEffort=0, int bAutoClose=0, double dfTolerance=0) -> Geometry)r   BuildPolygonFromEdgesr  s     r   r  r    r  r$   c                  .    [         R                  " U 0 UD6$ )zApproximateArcAngles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation, double dfStartAngle, double dfEndAngle, double dfMaxAngleStepSizeDegrees) -> Geometry)r   ApproximateArcAnglesr  s     r   r  r    s    $$d5f55r$   c                  (    [         R                  " U 6 $ )z,ForceToPolygon(Geometry geom_in) -> Geometry)r   ForceToPolygonrA   s    r   r  r  "  rK   r$   c                  (    [         R                  " U 6 $ )z/ForceToLineString(Geometry geom_in) -> Geometry)r   ForceToLineStringrA   s    r   r  r  &      !!4((r$   c                  (    [         R                  " U 6 $ )z1ForceToMultiPolygon(Geometry geom_in) -> Geometry)r   ForceToMultiPolygonrA   s    r   r  r  *  rF   r$   c                  (    [         R                  " U 6 $ )z/ForceToMultiPoint(Geometry geom_in) -> Geometry)r   ForceToMultiPointrA   s    r   r  r  .  r  r$   c                  (    [         R                  " U 6 $ )z4ForceToMultiLineString(Geometry geom_in) -> Geometry)r   ForceToMultiLineStringrA   s    r   r  r  2  r  r$   c                  (    [         R                  " U 6 $ )z[ForceTo(Geometry geom_in, OGRwkbGeometryType eTargetType, char ** options=None) -> Geometry)r   ForceTorA   s    r   r  r  6      <<r$   c                      \ rS rSrSr\" S S SS9r\r\	R                  rS rS rS	 rS
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS r S r!S r"S r#S r$S  r%S! r&S" r'S# r(S$ r)S% r*S& r+S' r,S( r-S) r.S* r/S+ r0S, r1S- r2S. r3S/ r4S0 r5S1 r6S2 r7S3 r8S4 r9S5 r:S6 r;S7 r<S8 r=S9 r>S: r?S; r@S< rAS= rBS> rCS? rDS@ rESA rFSB rGSC rHSD rISE rJSF rKSG rLSH rMSI rNSJ rOSK rPSL rQSM rRSN rSSO rTSP rUSQ rVSR rWSS rXST rYSU rZSV r[SW r\SX r]SY r^SZ r_S[ r`S\ raS] rbS^ rcS_ rdS` reSa rfSb rgSc rhSd riSe rjSf rkSg rlSh rmSi rnSj roSk rpSl rqSm rrSn rsSo rtSprugq)rGeometryi9  z%Proxy of C++ OGRGeometryShadow class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   Geometry.<lambda><  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r  <  r   r$   r   r   c                 Z    [         R                  " U [         R                  " U0 UD65        g)zt__init__(Geometry self, OGRwkbGeometryType type=wkbUnknown, char * wkt=None, int wkb=0, char * gml=None) -> GeometryN)r   Geometry_swiginitnew_Geometryr   s      r   rV   Geometry.__init__@  s"    tT%6%6%G%GHr$   c                 0    [         R                  " U /UQ76 $ )z
ExportToWkt(Geometry self) -> OGRErr

Convert a geometry into well known text format.

For more details: :cpp:func:`OGR_G_ExportToWkt`

Returns
--------
str

)r   Geometry_ExportToWktr   s     r   ExportToWktGeometry.ExportToWktD       ((555r$   c                 0    [         R                  " U /UQ76 $ )z
ExportToIsoWkt(Geometry self) -> OGRErr

Convert a geometry into SFSQL 1.2 / ISO SQL/MM Part 3 well known text
format.

For more details: :cpp:func:`OGR_G_ExportToIsoWkt`

.. versionadded:: 2.0

Returns
--------
str

)r   Geometry_ExportToIsoWktr   s     r   ExportToIsoWktGeometry.ExportToIsoWktS  s      ++D8488r$   c                 6    [         R                  " U /UQ70 UD6$ )an  
ExportToWkb(Geometry self, OGRwkbByteOrder byte_order=wkbNDR) -> OGRErr

Convert a geometry well known binary format.

For more details: :cpp:func:`OGR_G_ExportToWkb`

Parameters
-----------
byte_order: osgeo.ogr.wkbXDR | osgeo.ogr.wkbNDR, default=osgeo.ogr.wkbNDR
    One of wkbXDR or wkbNDR indicating MSB or LSB byte order respectively.

Returns
--------
bytes

)r   Geometry_ExportToWkbr   s      r   ExportToWkbGeometry.ExportToWkbe  s    $ ((????r$   c                 6    [         R                  " U /UQ70 UD6$ )a  
ExportToIsoWkb(Geometry self, OGRwkbByteOrder byte_order=wkbNDR) -> OGRErr

Convert a geometry into SFSQL 1.2 / ISO SQL/MM Part 3 well known
binary format.

For more details: :cpp:func:`OGR_G_ExportToIsoWkb`

.. versionadded:: 2.0

Parameters
-----------
byte_order: osgeo.ogr.wkbXDR | osgeo.ogr.wkbNDR, default=osgeo.ogr.wkbNDR
    One of wkbXDR or wkbNDR indicating MSB or LSB byte order respectively.

Returns
--------
bytes

)r   Geometry_ExportToIsoWkbr   s      r   ExportToIsoWkbGeometry.ExportToIsoWkby  s    * ++DB4B6BBr$   c                 6    [         R                  " U /UQ70 UD6$ )zIExportToGML(Geometry self, char ** options=None) -> retStringAndCPLFree *)r   Geometry_ExportToGMLr   s      r   ExportToGMLGeometry.ExportToGML      ((????r$   c                 0    [         R                  " U /UQ76 $ )zTExportToKML(Geometry self, char const * altitude_mode=None) -> retStringAndCPLFree *)r   Geometry_ExportToKMLr   s     r   ExportToKMLGeometry.ExportToKML  r  r$   c                 6    [         R                  " U /UQ70 UD6$ )zJExportToJson(Geometry self, char ** options=None) -> retStringAndCPLFree *)r   Geometry_ExportToJsonr   s      r   r  Geometry.ExportToJson  r   r$   c                 6    [         R                  " U /UQ70 UD6$ )z7AddPoint(Geometry self, double x, double y, double z=0))r   Geometry_AddPointr   s      r   AddPointGeometry.AddPoint      %%d<T<V<<r$   c                 6    [         R                  " U /UQ70 UD6$ )z6AddPointM(Geometry self, double x, double y, double m))r   Geometry_AddPointMr   s      r   	AddPointMGeometry.AddPointM      &&t=d=f==r$   c                 6    [         R                  " U /UQ70 UD6$ )zAAddPointZM(Geometry self, double x, double y, double z, double m))r   Geometry_AddPointZMr   s      r   
AddPointZMGeometry.AddPointZM      ''>t>v>>r$   c                 0    [         R                  " U /UQ76 $ )z.AddPoint_2D(Geometry self, double x, double y))r   Geometry_AddPoint_2Dr   s     r   AddPoint_2DGeometry.AddPoint_2D  r  r$   c                 0    [         R                  " U /UQ76 $ )zCAddGeometryDirectly(Geometry self, Geometry other_disown) -> OGRErr)r   Geometry_AddGeometryDirectlyr   s     r   AddGeometryDirectlyGeometry.AddGeometryDirectly  r   r$   c                 0    [         R                  " U /UQ76 $ )z4AddGeometry(Geometry self, Geometry other) -> OGRErr)r   Geometry_AddGeometryr   s     r   AddGeometryGeometry.AddGeometry  r  r$   c                 0    [         R                  " U /UQ76 $ )z5RemoveGeometry(Geometry self, int iSubGeom) -> OGRErr)r   Geometry_RemoveGeometryr   s     r   RemoveGeometryGeometry.RemoveGeometry  r   r$   c                 0    [         R                  " U /UQ76 $ )z
Clone(Geometry self) -> Geometry

Make a copy of this object.

For more details: :cpp:func:`OGR_G_Clone`

Returns
--------
Geometry:
    The copy of the geometry with the same spatial reference system
    as the original.

)r   Geometry_Cloner   s     r   r  Geometry.Clone  s     ""4/$//r$   c                 0    [         R                  " U /UQ76 $ )a  
GetGeometryType(Geometry self) -> OGRwkbGeometryType

Fetch geometry type.

For more details: :cpp:func:`OGR_G_GetGeometryType`

Returns
--------
int:
    The geometry type code. The types can be found with
    'osgeo.ogr.wkb' prefix. For example :py:const:`osgeo.ogr.wkbPolygon`.

)r   Geometry_GetGeometryTyper   s     r   GetGeometryTypeGeometry.GetGeometryType       ,,T9D99r$   c                 0    [         R                  " U /UQ76 $ )z
GetGeometryName(Geometry self) -> char const *

Fetch WKT name for geometry type.

For more details: :cpp:func:`OGR_G_GetGeometryName`

geometry to get name from.

Returns
--------
str

)r   Geometry_GetGeometryNamer   s     r   GetGeometryNameGeometry.GetGeometryName  r<  r$   c                 0    [         R                  " U /UQ76 $ )zLength(Geometry self) -> double)r   Geometry_Lengthr   s     r   LengthGeometry.Length  r   r$   c                 0    [         R                  " U /UQ76 $ )zArea(Geometry self) -> double)r   Geometry_Arear   s     r   AreaGeometry.Area  s    !!$...r$   c                 0    [         R                  " U /UQ76 $ )z"IsClockwise(Geometry self) -> bool)r   Geometry_IsClockwiser   s     r   IsClockwiseGeometry.IsClockwise  r  r$   c                 0    [         R                  " U /UQ76 $ )z GetArea(Geometry self) -> double)r   Geometry_GetArear   s     r   GetAreaGeometry.GetArea  s    $$T1D11r$   c                 0    [         R                  " U /UQ76 $ )z#GetPointCount(Geometry self) -> int)r   Geometry_GetPointCountr   s     r   GetPointCountGeometry.GetPointCount  s    **47$77r$   c                 6    [         R                  " U /UQ70 UD6$ )z/GetPoints(Geometry self, int nCoordDimension=0))r   Geometry_GetPointsr   s      r   	GetPointsGeometry.GetPoints  r  r$   c                 6    [         R                  " U /UQ70 UD6$ )z*GetX(Geometry self, int point=0) -> double)r   Geometry_GetXr   s      r   GetXGeometry.GetX      !!$8888r$   c                 6    [         R                  " U /UQ70 UD6$ )z*GetY(Geometry self, int point=0) -> double)r   Geometry_GetYr   s      r   GetYGeometry.GetY  r]  r$   c                 6    [         R                  " U /UQ70 UD6$ )z*GetZ(Geometry self, int point=0) -> double)r   Geometry_GetZr   s      r   GetZGeometry.GetZ  r]  r$   c                 6    [         R                  " U /UQ70 UD6$ )z*GetM(Geometry self, int point=0) -> double)r   Geometry_GetMr   s      r   GetMGeometry.GetM  r]  r$   c                 0    [         R                  " U /UQ76 $ )z%GetPoint(Geometry self, int iPoint=0))r   Geometry_GetPointr   s     r   GetPointGeometry.GetPoint  r  r$   c                 0    [         R                  " U /UQ76 $ )z'GetPointZM(Geometry self, int iPoint=0))r   Geometry_GetPointZMr   s     r   
GetPointZMGeometry.GetPointZM  r   r$   c                 0    [         R                  " U /UQ76 $ )z(GetPoint_2D(Geometry self, int iPoint=0))r   Geometry_GetPoint_2Dr   s     r   GetPoint_2DGeometry.GetPoint_2D  r  r$   c                 0    [         R                  " U /UQ76 $ )z&GetGeometryCount(Geometry self) -> int)r   Geometry_GetGeometryCountr   s     r   GetGeometryCountGeometry.GetGeometryCount  r   r$   c                 6    [         R                  " U /UQ70 UD6$ )zBSetPoint(Geometry self, int point, double x, double y, double z=0))r   Geometry_SetPointr   s      r   SetPointGeometry.SetPoint#  r  r$   c                 6    [         R                  " U /UQ70 UD6$ )zASetPointM(Geometry self, int point, double x, double y, double m))r   Geometry_SetPointMr   s      r   	SetPointMGeometry.SetPointM'  r  r$   c                 6    [         R                  " U /UQ70 UD6$ )zLSetPointZM(Geometry self, int point, double x, double y, double z, double m))r   Geometry_SetPointZMr   s      r   
SetPointZMGeometry.SetPointZM+  r$  r$   c                 6    [         R                  " U /UQ70 UD6$ )z9SetPoint_2D(Geometry self, int point, double x, double y))r   Geometry_SetPoint_2Dr   s      r   SetPoint_2DGeometry.SetPoint_2D/  r  r$   c                 0    [         R                  " U /UQ76 $ )zy
SwapXY(Geometry self)

Swap x and y coordinates.

For more details: :cpp:func:`OGR_G_SwapXY`

.. versionadded:: 2.3.0


)r   Geometry_SwapXYr   s     r   SwapXYGeometry.SwapXY3  s     ##D0400r$   c                 0    [         R                  " U /UQ76 $ )z3GetGeometryRef(Geometry self, int geom) -> Geometry)r   Geometry_GetGeometryRefr   s     r   r  Geometry.GetGeometryRefA  r   r$   c                 0    [         R                  " U /UQ76 $ )a6  
Simplify(Geometry self, double tolerance) -> Geometry

Compute a simplified geometry.

For more details: :cpp:func:`OGR_G_Simplify`

Parameters
-----------
tolerance: float
    The distance tolerance for the simplification.

Returns
--------
Geometry:
    The simplified geometry or None if an error occurs.

)r   Geometry_Simplifyr   s     r   SimplifyGeometry.SimplifyE  rw  r$   c                 0    [         R                  " U /UQ76 $ )ah  
SimplifyPreserveTopology(Geometry self, double tolerance) -> Geometry

Simplify the geometry while preserving topology.

For more details: :cpp:func:`OGR_G_SimplifyPreserveTopology`

Parameters
-----------
tolerance: float
    The distance tolerance for the simplification.

Returns
--------
Geometry:
    The simplified geometry or None if an error occurs.

)r   !Geometry_SimplifyPreserveTopologyr   s     r   SimplifyPreserveTopology!Geometry.SimplifyPreserveTopologyZ  s    & 55dBTBBr$   c                 6    [         R                  " U /UQ70 UD6$ )ae  
DelaunayTriangulation(Geometry self, double dfTolerance=0.0, int bOnlyEdges=FALSE) -> Geometry

Return a Delaunay triangulation of the vertices of the geometry.

For more details: :cpp:func:`OGR_G_DelaunayTriangulation`

.. versionadded:: 2.1

Parameters
-----------
dfTolerance: float
    optional snapping tolerance to use for improved robustness
bOnlyEdges: bool
    If True, will return a MULTILINESTRING, otherwise it will
    return a GEOMETRYCOLLECTION containing triangular POLYGONs.

Returns
--------
Geometry:
    The geometry resulting from the Delaunay triangulation or None if an
    error occurs.

)r   Geometry_DelaunayTriangulationr   s      r   DelaunayTriangulationGeometry.DelaunayTriangulationo  s    2 224I$I&IIr$   c                 0    [         R                  " U /UQ76 $ )z
Polygonize(Geometry self) -> Geometry

Polygonizes a set of sparse edges.

For more details: :cpp:func:`OGR_G_Polygonize`

Returns
--------
Geometry:
    A new geometry or None on failure.

)r   Geometry_Polygonizer   s     r   
PolygonizeGeometry.Polygonize  r  r$   c                 0    [         R                  " U /UQ76 $ )z
Boundary(Geometry self) -> Geometry

Compute boundary.

For more details: :cpp:func:`OGR_G_Boundary`

Returns
--------
Geometry:
    A new geometry or None on failure.

)r   Geometry_Boundaryr   s     r   BoundaryGeometry.Boundary       %%d2T22r$   c                 0    [         R                  " U /UQ76 $ )z
GetBoundary(Geometry self) -> Geometry

Compute boundary (deprecated)

For more details: :cpp:func:`OGR_G_GetBoundary`

..warning:: Deprecated

See: :cpp:func:`OGR_G_Boundary`

)r   Geometry_GetBoundaryr   s     r   GetBoundaryGeometry.GetBoundary  r  r$   c                 0    [         R                  " U /UQ76 $ )z
ConvexHull(Geometry self) -> Geometry

Compute convex hull.

For more details: :cpp:func:`OGR_G_ConvexHull`

Returns
--------
Geometry:
    a handle to A newly allocated geometry now owned by the caller, or
    None on failure.

)r   Geometry_ConvexHullr   s     r   
ConvexHullGeometry.ConvexHull       ''4t44r$   c                 0    [         R                  " U /UQ76 $ )zEConcaveHull(Geometry self, double ratio, bool allowHoles) -> Geometry)r   Geometry_ConcaveHullr   s     r   ConcaveHullGeometry.ConcaveHull  r  r$   c                 0    [         R                  " U /UQ76 $ )a  
MakeValid(Geometry self, char ** options=None) -> Geometry

Attempts to make an invalid geometry valid without losing vertices.

For more details: :cpp:func:`OGR_G_MakeValidEx`

.. versionadded:: 3.0
.. versionadded:: 3.4 options

Parameters
-----------
options: list[str], optional
    papszOptions to be passed in. For example: ["METHOD=STRUCTURE"].

Returns
--------
Geometry:
    A newly allocated geometry now owned by the caller, or None on
    failure.

)r   Geometry_MakeValidr   s     r   	MakeValidGeometry.MakeValid  r|  r$   c                 0    [         R                  " U /UQ76 $ )a  
Normalize(Geometry self) -> Geometry

Attempts to bring geometry into normalized/canonical form.

For more details: :cpp:func:`OGR_G_Normalize`

.. versionadded:: 3.3

Returns
--------
Geometry:
    A newly allocated geometry now owned by the caller, or None on
    failure.

)r   Geometry_Normalizer   s     r   	NormalizeGeometry.Normalize  s    " &&t3d33r$   c                 0    [         R                  " U /UQ76 $ )z7RemoveLowerDimensionSubGeoms(Geometry self) -> Geometry)r   %Geometry_RemoveLowerDimensionSubGeomsr   s     r   RemoveLowerDimensionSubGeoms%Geometry.RemoveLowerDimensionSubGeoms  s    99$FFFr$   c                 6    [         R                  " U /UQ70 UD6$ )a  
Buffer(Geometry self, double distance, int quadsecs=30) -> Geometry

Compute buffer of geometry.

For more details: :cpp:func:`OGR_G_Buffer`

Parameters
-----------
distance: float
    The buffer distance to be applied. Should be expressed into
    the same unit as the coordinates of the geometry.
quadsecs: int, default=30
    The number of segments used to approximate a 90 degree
    (quadrant) of curvature.

Returns
--------
Geometry:
    The newly created geometry or None if an error occurs.

)r   Geometry_Bufferr   s      r   BufferGeometry.Buffer  s    . ##D:4:6::r$   c                 0    [         R                  " U /UQ76 $ )aL  
Intersection(Geometry self, Geometry other) -> Geometry

Compute intersection.

For more details: :cpp:func:`OGR_G_Intersection`

Parameters
-----------
other: Geometry
    The other geometry.

Returns
--------
Geometry:
    A new geometry representing the intersection or None if there is no
    intersection or an error occurs.

)r   Geometry_Intersectionr   s     r   r  Geometry.Intersection  s    ( ))$666r$   c                 0    [         R                  " U /UQ76 $ )a  
Union(Geometry self, Geometry other) -> Geometry

Compute union.

For more details: :cpp:func:`OGR_G_Union`

Parameters
-----------
other: Geometry
    The other geometry.

Returns
--------
Geometry:
    A new geometry representing the union or None if an error occurs.

)r   Geometry_Unionr   s     r   r  Geometry.Union-  s    & ""4/$//r$   c                 0    [         R                  " U /UQ76 $ )z
UnionCascaded(Geometry self) -> Geometry

Compute union using cascading.

For more deails: :cpp:func:`OGR_G_UnionCascaded`

Returns
--------
Geometry:
    A new geometry representing the union or None if an error occurs.

)r   Geometry_UnionCascadedr   s     r   UnionCascadedGeometry.UnionCascadedB  r   r$   c                 0    [         R                  " U /UQ76 $ )aC  
Difference(Geometry self, Geometry other) -> Geometry

Compute difference.

For more details: :cpp:func:`OGR_G_Difference`

Parameters
-----------
other: Geometry
    The other geometry.

Returns
--------
Geometry:
    A new geometry representing the difference or None if the difference
    is empty or an error occurs.

)r   Geometry_Differencer   s     r   
DifferenceGeometry.DifferenceR  s    ( ''4t44r$   c                 0    [         R                  " U /UQ76 $ )aT  
SymDifference(Geometry self, Geometry other) -> Geometry

Compute symmetric difference.

For more details: :cpp:func:`OGR_G_SymDifference`

Parameters
-----------
other:
    the other geometry.

Returns
--------
Geometry:
    A new geometry representing the symmetric difference or None if the
    difference is empty or an error occurs.

)r   Geometry_SymDifferencer   s     r   r  Geometry.SymDifferenceh  s    ( **47$77r$   c                 0    [         R                  " U /UQ76 $ )z
SymmetricDifference(Geometry self, Geometry other) -> Geometry

Compute symmetric difference (deprecated)

For more details: :cpp:func:`OGR_G_SymmetricDifference`

.. warning:: Deprecated


)r   Geometry_SymmetricDifferencer   s     r   SymmetricDifferenceGeometry.SymmetricDifference~  s     00===r$   c                 0    [         R                  " U /UQ76 $ )a:  
Distance(Geometry self, Geometry other) -> double

Compute distance between two geometries.

For more details: :cpp:func:`OGR_G_Distance`

Parameters
-----------
other: Geometry
    The other geometry to compare against.

Returns
--------
float:
    The distance between the geometries or -1 if an error occurs.

)r   Geometry_Distancer   s     r   DistanceGeometry.Distance  rw  r$   c                 0    [         R                  " U /UQ76 $ )a\  
Distance3D(Geometry self, Geometry other) -> double

Returns the 3D distance between two geometries.

For more details: :cpp:func:`OGR_G_Distance3D`

.. versionadded:: 2.2

Parameters
-----------
other: Geometry
    The other geometry to compare against.

Returns
--------
float:
    The distance between the geometries or -1 if an error occurs.

)r   Geometry_Distance3Dr   s     r   
Distance3DGeometry.Distance3D  rN  r$   c                 0    [         R                  " U /UQ76 $ )z_
Empty(Geometry self)

Clear geometry information.

For more details: :cpp:func:`OGR_G_Empty`

)r   Geometry_Emptyr   s     r   EmptyGeometry.Empty  s     ""4/$//r$   c                 0    [         R                  " U /UQ76 $ )z
IsEmpty(Geometry self) -> bool

Test if the geometry is empty.

For more details: :cpp:func:`OGR_G_IsEmpty`

Returns
--------
int:
    True if the geometry has no points, otherwise False.

)r   Geometry_IsEmptyr   s     r   IsEmptyGeometry.IsEmpty       $$T1D11r$   c                 0    [         R                  " U /UQ76 $ )z
IsValid(Geometry self) -> bool

Test if the geometry is valid.

For more details: :cpp:func:`OGR_G_IsValid`

Returns
--------
int:
    True if the geometry has no points, otherwise False.

)r   Geometry_IsValidr   s     r   IsValidGeometry.IsValid  r  r$   c                 0    [         R                  " U /UQ76 $ )z
IsSimple(Geometry self) -> bool

Returns True if the geometry is simple.

For more details: :cpp:func:`OGR_G_IsSimple`

Returns
--------
int:
    True if object is simple, otherwise False.

)r   Geometry_IsSimpler   s     r   IsSimpleGeometry.IsSimple  r  r$   c                 0    [         R                  " U /UQ76 $ )z
IsRing(Geometry self) -> bool

Test if the geometry is a ring.

For more details: :cpp:func:`OGR_G_IsRing`

Returns
--------
int:
    True if the geometry has no points, otherwise False.

)r   Geometry_IsRingr   s     r   IsRingGeometry.IsRing  s     ##D0400r$   c                 0    [         R                  " U /UQ76 $ )a0  
Intersects(Geometry self, Geometry other) -> bool

Determines whether two geometries intersect.

For more details: :cpp:func:`OGR_G_Intersects`

Parameters
-----------
other: Geometry
    The other geometry to test against.

Returns
--------
int:
    True if the geometries intersect, otherwise False.

)r   Geometry_Intersectsr   s     r   
IntersectsGeometry.Intersects  rS  r$   c                 0    [         R                  " U /UQ76 $ )z0Intersect(Geometry self, Geometry other) -> bool)r   Geometry_Intersectr   s     r   	IntersectGeometry.Intersect  r  r$   c                 0    [         R                  " U /UQ76 $ )a  
Equals(Geometry self, Geometry other) -> bool

Returns True if two geometries are equivalent.

For more details: :cpp:func:`OGR_G_Equals`

Parameters
-----------
other: Geometry
    The other geometry to test against.

Returns
--------
int:
    True if equivalent or False otherwise.

)r   Geometry_Equalsr   s     r   EqualsGeometry.Equals      & ##D0400r$   c                 0    [         R                  " U /UQ76 $ )z,Equal(Geometry self, Geometry other) -> bool)r   Geometry_Equalr   s     r   r  Geometry.Equal1  r  r$   c                 0    [         R                  " U /UQ76 $ )a
  
Disjoint(Geometry self, Geometry other) -> bool

Test for disjointness.

For more details: :cpp:func:`OGR_G_Disjoint`

Parameters
-----------
other: Geometry
    The other geometry to compare.

Returns
--------
int:
    True if they are disjoint, otherwise False.

)r   Geometry_Disjointr   s     r   DisjointGeometry.Disjoint5  rw  r$   c                 0    [         R                  " U /UQ76 $ )z
Touches(Geometry self, Geometry other) -> bool

Test for touching.

For more details: :cpp:func:`OGR_G_Touches`

Parameters
-----------
other:
    the other geometry to compare.

Returns
--------
int:
    True if they are touching, otherwise False.

)r   Geometry_Touchesr   s     r   TouchesGeometry.TouchesJ      & $$T1D11r$   c                 0    [         R                  " U /UQ76 $ )a  
Crosses(Geometry self, Geometry other) -> bool

Test for crossing.

For more details: :cpp:func:`OGR_G_Crosses`

Parameters
-----------
other: Geometry
    the other geometry to compare.

Returns
--------
int:
    True if they are crossing, otherwise False.

)r   Geometry_Crossesr   s     r   CrossesGeometry.Crosses_  r  r$   c                 0    [         R                  " U /UQ76 $ )a  
Within(Geometry self, Geometry other) -> bool

Test for containment.

For more details: :cpp:func:`OGR_G_Within`

Parameters
-----------
other: Geometry
    the other geometry to compare.

Returns
--------
int:
    True if this is within other, otherwise False.

)r   Geometry_Withinr   s     r   WithinGeometry.Withint  r  r$   c                 0    [         R                  " U /UQ76 $ )a  
Contains(Geometry self, Geometry other) -> bool

Test for containment.

For more details: :cpp:func:`OGR_G_Contains`

Parameters
-----------
other: Geometry
    the other geometry to compare.

Returns
--------
int:
    True if this contains the other geometry, otherwise False.

)r   Geometry_Containsr   s     r   ContainsGeometry.Contains  rw  r$   c                 0    [         R                  " U /UQ76 $ )a  
Overlaps(Geometry self, Geometry other) -> bool

Test for overlap.

For more details: :cpp:func:`OGR_G_Overlaps`

Parameters
-----------
other: Geometry
    the other geometry to compare.

Returns
--------
int:
    True if they are overlapping, otherwise False.

)r   Geometry_Overlapsr   s     r   OverlapsGeometry.Overlaps  rw  r$   c                 0    [         R                  " U /UQ76 $ )ab  
TransformTo(Geometry self, SpatialReference reference) -> OGRErr

Transform geometry to new spatial reference system.

For more details: :cpp:func:`OGR_G_TransformTo`

Parameters
-----------
reference: SpatialReference
   The spatial reference system to apply.

Returns
--------
int:
    :py:const:`osgeo.ogr.OGRERR_NONE` on success, or an error code.

)r   Geometry_TransformTor   s     r   TransformToGeometry.TransformTo  rE  r$   c                 0    [         R                  " U /UQ76 $ )z
GetSpatialReference(Geometry self) -> SpatialReference

For more details: :cpp:func:`OGR_G_GetSpatialReference`

Returns spatial reference system for geometry.

Returns
--------
SpatialReference

)r   Geometry_GetSpatialReferencer   s     r   GetSpatialReferenceGeometry.GetSpatialReference  s     00===r$   c                 0    [         R                  " U /UQ76 $ )a  
AssignSpatialReference(Geometry self, SpatialReference reference)

Assign spatial reference to this object.

For more details: :cpp:func:`OGR_G_AssignSpatialReference`

Parameters
-----------
reference: SpatialReference
    The new spatial reference system to apply.

)r   Geometry_AssignSpatialReferencer   s     r   AssignSpatialReferenceGeometry.AssignSpatialReference  s     33D@4@@r$   c                 0    [         R                  " U /UQ76 $ )zg
CloseRings(Geometry self)

Force rings to be closed.

For more details: :cpp:func:`OGR_G_CloseRings`

)r   Geometry_CloseRingsr   s     r   
CloseRingsGeometry.CloseRings  r  r$   c                 0    [         R                  " U /UQ76 $ )zp
FlattenTo2D(Geometry self)

Convert geometry to strictly 2D.

For more details: :cpp:func:`OGR_G_FlattenTo2D`

)r   Geometry_FlattenTo2Dr   s     r   FlattenTo2DGeometry.FlattenTo2D  s     ((555r$   c                 0    [         R                  " U /UQ76 $ )a  
Segmentize(Geometry self, double dfMaxLength)

Modify the geometry such it has no segment longer then the given
distance.

For more details: :cpp:func:`OGR_G_Segmentize`

Parameters
-----------
dfMaxLength: float
    the maximum distance between 2 points after segmentization

)r   Geometry_Segmentizer   s     r   
SegmentizeGeometry.Segmentize  r  r$   c                 0    [         R                  " U /UQ76 $ )a&  
GetEnvelope(Geometry self)

Computes and returns the bounding envelope for this geometry in the
passed psEnvelope structure.

For more details: :cpp:func:`OGR_G_GetEnvelope`

.. warning:: Check the return order of the bounds.

Returns
--------
minx: float
maxx: float
miny: float
maxy: float

)r   Geometry_GetEnveloper   s     r   GetEnvelopeGeometry.GetEnvelope  rE  r$   c                 0    [         R                  " U /UQ76 $ )aG  
GetEnvelope3D(Geometry self)

Computes and returns the bounding envelope (3D) for this geometry in
the passed psEnvelope structure.

For more details: :cpp:func:`OGR_G_GetEnvelope3D`

.. warning:: Check the return order of the bounds.

Returns
--------
minx: float
maxx: float
miny: float
maxy: float
minz: float
maxz: float

)r   Geometry_GetEnvelope3Dr   s     r   GetEnvelope3DGeometry.GetEnvelope3D#  rX  r$   c                 0    [         R                  " U /UQ76 $ )z
Centroid(Geometry self) -> Geometry

Compute the geometry centroid.

For more details: :cpp:func:`OGR_G_Centroid`

Returns
--------
Geometry

)r   Geometry_Centroidr   s     r   CentroidGeometry.Centroid:  s     %%d2T22r$   c                 0    [         R                  " U /UQ76 $ )z
PointOnSurface(Geometry self) -> Geometry

Returns a point guaranteed to lie on the surface.

For more details: :cpp:func:`OGR_G_PointOnSurface`

Returns
--------
Geometry:
    A point guaranteed to lie on the surface or None if an error occurred.

)r   Geometry_PointOnSurfacer   s     r   PointOnSurfaceGeometry.PointOnSurfaceI  r  r$   c                 0    [         R                  " U /UQ76 $ )z
WkbSize(Geometry self) -> size_t

Returns size of related binary representation.

For more details: :cpp:func:`OGR_G_WkbSize`

Returns
--------
int

)r   Geometry_WkbSizer   s     r   WkbSizeGeometry.WkbSizeY  s     $$T1D11r$   c                 0    [         R                  " U /UQ76 $ )aD  
GetCoordinateDimension(Geometry self) -> int

Get the dimension of the coordinates in this geometry.

For more details: :cpp:func:`OGR_G_GetCoordinateDimension`

.. warning:: Deprecated. Use :py:func:`CoordinateDimension`,
    :py:func:`Is3D`, or :py:func:`IsMeasured`.

Returns
--------
int:
    This will return 2 or 3.

)r   Geometry_GetCoordinateDimensionr   s     r   GetCoordinateDimensionGeometry.GetCoordinateDimensionh  s    " 33D@4@@r$   c                 0    [         R                  " U /UQ76 $ )a  
CoordinateDimension(Geometry self) -> int

Get the dimension of the coordinates in this geometry.

For more details: :cpp:func:`OGR_G_CoordinateDimension`

.. versionadded:: 2.1

Returns
--------
int:
    This will return 2 for XY, 3 for XYZ and XYM, and 4 for XYZM data.

)r   Geometry_CoordinateDimensionr   s     r   CoordinateDimensionGeometry.CoordinateDimension{  s      00===r$   c                 0    [         R                  " U /UQ76 $ )z
Is3D(Geometry self) -> int

See whether this geometry has Z coordinates.

For more details: :cpp:func:`OGR_G_Is3D`

.. versionadded:: 2.1

Returns
--------
int:
    True if the geometry has Z coordinates.

)r   Geometry_Is3Dr   s     r   Is3DGeometry.Is3D  s      !!$...r$   c                 0    [         R                  " U /UQ76 $ )z
IsMeasured(Geometry self) -> int

See whether this geometry is measured.

For more details: :cpp:func:`OGR_G_IsMeasured`

.. versionadded:: 2.1

Returns
--------
int:
    True if the geometry has M coordinates.

)r   Geometry_IsMeasuredr   s     r   
IsMeasuredGeometry.IsMeasured  s      ''4t44r$   c                 0    [         R                  " U /UQ76 $ )a6  
SetCoordinateDimension(Geometry self, int dimension)

Set the coordinate dimension.

For more details: :cpp:func:`OGR_G_SetCoordinateDimension`

.. warning:: Deprecated. Use :py:func:`Set3D` or :py:func:`SetMeasured`.

Parameters
-----------
dimension: int
    New coordinate dimension value, either 2 or 3.

)r   Geometry_SetCoordinateDimensionr   s     r   SetCoordinateDimensionGeometry.SetCoordinateDimension  s      33D@4@@r$   c                 0    [         R                  " U /UQ76 $ )z
Set3D(Geometry self, int b3D)

Add or remove the Z coordinate dimension.

For more details: :cpp:func:`OGR_G_Set3D`

.. versionadded:: 2.1

Parameters
-----------
bIs3D: bool
    Should the geometry have a Z dimension, either True or False.

)r   Geometry_Set3Dr   s     r   Set3DGeometry.Set3D  s      ""4/$//r$   c                 0    [         R                  " U /UQ76 $ )a  
SetMeasured(Geometry self, int bMeasured)

Add or remove the M coordinate dimension.

For more details: :cpp:func:`OGR_G_SetMeasured`

.. versionadded:: 2.1

Parameters
-----------
bIsMeasured: bool
    Should the geometry have a M dimension, either True or False.

)r   Geometry_SetMeasuredr   s     r   SetMeasuredGeometry.SetMeasured  s      ((555r$   c                 0    [         R                  " U /UQ76 $ )z
GetDimension(Geometry self) -> int

Get the dimension of this geometry.

For more details: :cpp:func:`OGR_G_GetDimension`

Returns
--------
int:
    0 for points, 1 for lines, and 2 for surfaces.

)r   Geometry_GetDimensionr   s     r   GetDimensionGeometry.GetDimension  s     ))$666r$   c                 0    [         R                  " U /UQ76 $ )zBHasCurveGeometry(Geometry self, int bLookForCircular=FALSE) -> int)r   Geometry_HasCurveGeometryr   s     r   HasCurveGeometryGeometry.HasCurveGeometry  r   r$   c                 6    [         R                  " U /UQ70 UD6$ )zhGetLinearGeometry(Geometry self, double dfMaxAngleStepSizeDegrees=0.0, char ** options=None) -> Geometry)r   Geometry_GetLinearGeometryr   s      r   GetLinearGeometryGeometry.GetLinearGeometry  s    ..tEdEfEEr$   c                 6    [         R                  " U /UQ70 UD6$ )zAGetCurveGeometry(Geometry self, char ** options=None) -> Geometry)r   Geometry_GetCurveGeometryr   s      r   GetCurveGeometryGeometry.GetCurveGeometry  r  r$   c                 0    [         R                  " U /UQ76 $ )z3Value(Geometry self, double dfDistance) -> Geometry)r   Geometry_Valuer   s     r   ValueGeometry.Value  r  r$   c                 0    [         R                  " U /UQ76 $ )a|  
Transform(Geometry self, CoordinateTransformation trans) -> OGRErr
Transform(Geometry self, GeomTransformer transformer) -> Geometry

Apply arbitrary coordinate transformation to geometry.

For more details: :cpp:func:`OGR_G_Transform`

Parameters
-----------
trans: CoordinateTransform
    The transformation to apply.

Returns
--------
Geometry:
    The transformed geometry.

)r   Geometry_Transformr   s     r   	TransformGeometry.Transform  s    ( &&t3d33r$   c                 0    [         R                  " U /UQ76 $ )z9CreatePreparedGeometry(Geometry self) -> PreparedGeometry)r   Geometry_CreatePreparedGeometryr   s     r   CreatePreparedGeometryGeometry.CreatePreparedGeometry  s    33D@4@@r$   c                 4    U R                  U 5        SU l        g )Nr   )r   r   r  s    r   r  Geometry.Destroy!  s    
D!dlr$   c                 "    U R                  5       $ r/   )r   r  s    r   __str__Geometry.__str__%  s      ""r$   c                 "    U R                  5       $ r/   ro  r  s    r   rp  Geometry.__copy__(  s    ZZ\r$   c                     U R                  5       nU R                  5       nU(       a  UR                  UR                  5       5        U$ r/   )r  r$  r(  )r   memogr  s       r   __deepcopy__Geometry.__deepcopy__+  s7    
**,a$$&c	

"
"399;
/hr$   c                 <    U R                   SU R                  5       4$ )Nr%   )r   r  r  s    r   
__reduce__Geometry.__reduce__2  s    nnb$"2"2"455r$   c                 <    [        U5      nUR                  U l        g r/   )r  r
   )r   stateresults      r   __setstate__Geometry.__setstate__5  s    &u-KK	r$   c              #   r   #    [        U R                  5       5       H  nU R                  U5      v   M     g 7fr/   )r>  rx  r  )r   rD  s     r   r  Geometry.__iter__9  s.     t,,./A%%a(( 0s   57)r
   r   N)vr   r   r:   r;   r<   r   r   r   r   r   delete_Geometryr   rV   r  r   r  r  r  r  r  r  r  r"  r'  r+  r/  r3  r  r:  r?  rC  rG  rK  rO  rS  rW  r[  r`  rd  rh  rl  rp  rt  rx  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r$  r(  r,  r0  r4  r8  r<  r@  rD  rH  rL  rP  rT  rX  r\  r`  rd  rh  rl  rp  rt  rx  r|  r  r  r  rp  r  r  r  r  r>   r%   r$   r   r  r  9  sC   0-/IOdeGH++I69$@(C.@6A=>?6>690":":"1/628>9999356;=>?@193*C*J65 3 65"6424&G;27,0*8 5,8,>3*5.	02 2 3 1 5*41*03*2*2*1*3*3*6*>A 	5	65"6*8.39 2A&>$/$5$A$0$6$7 ;FE04,A#6 )r$   r  c                   Z    \ rS rSrSr\" S S SS9rS r\r	\
R                  rS rS	 rS
rg)PreparedGeometryiA  z-Proxy of C++ OGRPreparedGeometryShadow class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   PreparedGeometry.<lambda>D  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r  D  r   r$   r   r   c                     [        S5      er   r   r   s      r   rV   PreparedGeometry.__init__F  r   r$   c                 0    [         R                  " U /UQ76 $ )z=Intersects(PreparedGeometry self, Geometry otherGeom) -> bool)r   PreparedGeometry_Intersectsr   s     r   r  PreparedGeometry.IntersectsK  r   r$   c                 0    [         R                  " U /UQ76 $ )z;Contains(PreparedGeometry self, Geometry otherGeom) -> bool)r   PreparedGeometry_Containsr   s     r   r  PreparedGeometry.ContainsO  r   r$   r%   N)r   r   r:   r;   r<   r   r   rV   r   r   r   delete_PreparedGeometryr   r  r  r>   r%   r$   r   r  r  A  s6    8-/IOdeG7H33=;r$   r  c                   T    \ rS rSrSr\" S S SS9r\rS r	\
R                  rS rS	rg
)GeomTransformeriU  z,Proxy of C++ OGRGeomTransformerShadow class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   GeomTransformer.<lambda>X  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r  X  r   r$   r   r   c                 T    [         R                  " U [         R                  " U6 5        g)zd__init__(GeomTransformer self, CoordinateTransformation ct, char ** options=None) -> GeomTransformerN)r   GeomTransformer_swiginitnew_GeomTransformerr   s     r   rV   GeomTransformer.__init__[  s    %%dD,D,Dd,KLr$   c                 0    [         R                  " U /UQ76 $ )z>Transform(GeomTransformer self, Geometry src_geom) -> Geometry)r   GeomTransformer_Transformr   s     r   r|  GeomTransformer.Transform`  r   r$   r%   N)r   r   r:   r;   r<   r   r   r   r   rV   r   delete_GeomTransformerr   r|  r>   r%   r$   r   r  r  U  s4    7-/IOdeGHM 22;r$   r  c                       \ rS rSrSr\" S S SS9rS r\r	\
R                  rS rS	 rS
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rSrg)FieldDomainif  z(Proxy of C++ OGRFieldDomainShadow class.c                 6    U R                   R                  5       $ r/   r}   r~   s    r   r   FieldDomain.<lambda>i  r   r$   c                 8    U R                   R                  U5      $ r/   r}   r   s     r   r   r  i  r   r$   r   r   c                     [        S5      er   r   r   s      r   rV   FieldDomain.__init__k  r   r$   c                 0    [         R                  " U /UQ76 $ )z)GetName(FieldDomain self) -> char const *)r   FieldDomain_GetNamer   s     r   r  FieldDomain.GetNamep  r   r$   c                 0    [         R                  " U /UQ76 $ )z0GetDescription(FieldDomain self) -> char const *)r   FieldDomain_GetDescriptionr   s     r   r   FieldDomain.GetDescriptiont  r   r$   c                 0    [         R                  " U /UQ76 $ )z.GetFieldType(FieldDomain self) -> OGRFieldType)r   FieldDomain_GetFieldTyper   s     r   r  FieldDomain.GetFieldTypex  r  r$   c                 0    [         R                  " U /UQ76 $ )z4GetFieldSubType(FieldDomain self) -> OGRFieldSubType)r   FieldDomain_GetFieldSubTyper   s     r   GetFieldSubTypeFieldDomain.GetFieldSubType|  r   r$   c                 0    [         R                  " U /UQ76 $ )z5GetDomainType(FieldDomain self) -> OGRFieldDomainType)r   FieldDomain_GetDomainTyper   s     r   GetDomainTypeFieldDomain.GetDomainType  r   r$   c                 0    [         R                  " U /UQ76 $ )z=GetSplitPolicy(FieldDomain self) -> OGRFieldDomainSplitPolicy)r   FieldDomain_GetSplitPolicyr   s     r   GetSplitPolicyFieldDomain.GetSplitPolicy  r   r$   c                 0    [         R                  " U /UQ76 $ )zBSetSplitPolicy(FieldDomain self, OGRFieldDomainSplitPolicy policy))r   FieldDomain_SetSplitPolicyr   s     r   SetSplitPolicyFieldDomain.SetSplitPolicy  r   r$   c                 0    [         R                  " U /UQ76 $ )z=GetMergePolicy(FieldDomain self) -> OGRFieldDomainMergePolicy)r   FieldDomain_GetMergePolicyr   s     r   GetMergePolicyFieldDomain.GetMergePolicy  r   r$   c                 0    [         R                  " U /UQ76 $ )zBSetMergePolicy(FieldDomain self, OGRFieldDomainMergePolicy policy))r   FieldDomain_SetMergePolicyr   s     r   SetMergePolicyFieldDomain.SetMergePolicy  r   r$   c                 0    [         R                  " U /UQ76 $ )z9GetEnumeration(FieldDomain self) -> OGRCodedValue const *)r   FieldDomain_GetEnumerationr   s     r   GetEnumerationFieldDomain.GetEnumeration  r   r$   c                 0    [         R                  " U /UQ76 $ )z*GetMinAsDouble(FieldDomain self) -> double)r   FieldDomain_GetMinAsDoubler   s     r   GetMinAsDoubleFieldDomain.GetMinAsDouble  r   r$   c                 0    [         R                  " U /UQ76 $ )z0GetMinAsString(FieldDomain self) -> char const *)r   FieldDomain_GetMinAsStringr   s     r   GetMinAsStringFieldDomain.GetMinAsString  r   r$   c                 0    [         R                  " U /UQ76 $ )z(IsMinInclusive(FieldDomain self) -> bool)r   FieldDomain_IsMinInclusiver   s     r   IsMinInclusiveFieldDomain.IsMinInclusive  r   r$   c                 0    [         R                  " U /UQ76 $ )z*GetMaxAsDouble(FieldDomain self) -> double)r   FieldDomain_GetMaxAsDoubler   s     r   GetMaxAsDoubleFieldDomain.GetMaxAsDouble  r   r$   c                 0    [         R                  " U /UQ76 $ )z0GetMaxAsString(FieldDomain self) -> char const *)r   FieldDomain_GetMaxAsStringr   s     r   GetMaxAsStringFieldDomain.GetMaxAsString  r   r$   c                 0    [         R                  " U /UQ76 $ )z(IsMaxInclusive(FieldDomain self) -> bool)r   FieldDomain_IsMaxInclusiver   s     r   IsMaxInclusiveFieldDomain.IsMaxInclusive  r   r$   c                 0    [         R                  " U /UQ76 $ )z)GetGlob(FieldDomain self) -> char const *)r   FieldDomain_GetGlobr   s     r   GetGlobFieldDomain.GetGlob  r   r$   r%   N)r   r   r:   r;   r<   r   r   rV   r   r   r   delete_FieldDomainr   r  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r>   r%   r$   r   r  r  f  s    3-/IOdeG7H..5<:=;<<<<<<<<<<<5r$   r  c                  (    [         R                  " U 6 $ )zCreateCodedFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, OGRCodedValue const * enumeration) -> FieldDomain)r   CreateCodedFieldDomainrA   s    r   r  r    r  r$   c                  (    [         R                  " U 6 $ )zCreateRangeFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, double min, bool minIsInclusive, double max, double maxIsInclusive) -> FieldDomain)r   CreateRangeFieldDomainrA   s    r   r   r     r  r$   c                  (    [         R                  " U 6 $ )zCreateRangeFieldDomainDateTime(char const * name, char const * description, char const * min, bool minIsInclusive, char const * max, double maxIsInclusive) -> FieldDomain)r   CreateRangeFieldDomainDateTimerA   s    r   r  r        ..55r$   c                  (    [         R                  " U 6 $ )zCreateGlobFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, char const * glob) -> FieldDomain)r   CreateGlobFieldDomainrA   s    r   r  r    r  r$   c                  (    [         R                  " U 6 $ )zGetDriverCount() -> int)r   GetDriverCountrA   s    r   r  r    rK   r$   c                  (    [         R                  " U 6 $ )zGetOpenDSCount() -> int)r   GetOpenDSCountrA   s    r   r	  r	    rK   r$   c                  (    [         R                  " U 6 $ )zJSetGenerate_DB2_V72_BYTE_ORDER(int bGenerate_DB2_V72_BYTE_ORDER) -> OGRErr)r   SetGenerate_DB2_V72_BYTE_ORDERrA   s    r   r  r    r  r$   c                  (    [         R                  " U 6 $ )zRegisterAll())r   RegisterAllrA   s    r   r  r        T""r$   c                  (    [         R                  " U 6 $ )z<GeometryTypeToName(OGRwkbGeometryType eType) -> char const *)r   GeometryTypeToNamerA   s    r   r  r    rN   r$   c                  (    [         R                  " U 6 $ )z3GetFieldTypeName(OGRFieldType type) -> char const *)r   rg  rA   s    r   rg  rg    rC   r$   c                  (    [         R                  " U 6 $ )z9GetFieldSubTypeName(OGRFieldSubType type) -> char const *)r   GetFieldSubTypeNamerA   s    r   r  r    rF   r$   c                  (    [         R                  " U 6 $ )z:GT_Flatten(OGRwkbGeometryType eType) -> OGRwkbGeometryType)r   
GT_FlattenrA   s    r   r  r        ??D!!r$   c                  (    [         R                  " U 6 $ )z7GT_SetZ(OGRwkbGeometryType eType) -> OGRwkbGeometryType)r   GT_SetZrA   s    r   r  r    r  r$   c                  (    [         R                  " U 6 $ )z7GT_SetM(OGRwkbGeometryType eType) -> OGRwkbGeometryType)r   GT_SetMrA   s    r   r  r    r  r$   c                  (    [         R                  " U 6 $ )zZGT_SetModifier(OGRwkbGeometryType eType, int bSetZ, int bSetM=FALSE) -> OGRwkbGeometryType)r   GT_SetModifierrA   s    r   r  r    rK   r$   c                  (    [         R                  " U 6 $ )z(GT_HasZ(OGRwkbGeometryType eType) -> int)r   GT_HasZrA   s    r   r  r    r  r$   c                  (    [         R                  " U 6 $ )z(GT_HasM(OGRwkbGeometryType eType) -> int)r   GT_HasMrA   s    r   r   r     r  r$   c                  (    [         R                  " U 6 $ )zOGT_IsSubClassOf(OGRwkbGeometryType eType, OGRwkbGeometryType eSuperType) -> int)r   GT_IsSubClassOfrA   s    r   r"  r"        &&r$   c                  (    [         R                  " U 6 $ )z*GT_IsCurve(OGRwkbGeometryType arg1) -> int)r   
GT_IsCurverA   s    r   r%  r%    r  r$   c                  (    [         R                  " U 6 $ )z,GT_IsSurface(OGRwkbGeometryType arg1) -> int)r   GT_IsSurfacerA   s    r   r'  r'        d##r$   c                  (    [         R                  " U 6 $ )z.GT_IsNonLinear(OGRwkbGeometryType arg1) -> int)r   GT_IsNonLinearrA   s    r   r*  r*    rK   r$   c                  (    [         R                  " U 6 $ )z@GT_GetCollection(OGRwkbGeometryType eType) -> OGRwkbGeometryType)r   GT_GetCollectionrA   s    r   r,  r,    rC   r$   c                  (    [         R                  " U 6 $ )z;GT_GetCurve(OGRwkbGeometryType eType) -> OGRwkbGeometryType)r   GT_GetCurverA   s    r   r.  r.    r  r$   c                  (    [         R                  " U 6 $ )z<GT_GetLinear(OGRwkbGeometryType eType) -> OGRwkbGeometryType)r   GT_GetLinearrA   s    r   r0  r0    r(  r$   c                  (    [         R                  " U 6 $ )z,SetNonLinearGeometriesEnabledFlag(int bFlag))r   !SetNonLinearGeometriesEnabledFlagrA   s    r   r2  r2        11488r$   c                  (    [         R                  " U 6 $ )z*GetNonLinearGeometriesEnabledFlag() -> int)r   !GetNonLinearGeometriesEnabledFlagrA   s    r   r5  r5    r3  r$   c                  (    [         R                  " U 6 $ )z&GetOpenDS(int ds_number) -> DataSource)r   	GetOpenDSrA   s    r   r7  r7        >>4  r$   c                  B    [        5         [        R                  " U 0 UD6$ )z8Open(char const * utf8_path, int update=0) -> DataSource)ry   r   r   r  s     r   r   r   #  s      01 99d%f%%r$   c                  .    [         R                  " U 0 UD6$ )z>OpenShared(char const * utf8_path, int update=0) -> DataSource)r   
OpenSharedr  s     r   r;  r;  +  s    ??D+F++r$   c                  (    [         R                  " U 6 $ )z,GetDriverByName(char const * name) -> Driver)r   GetDriverByNamerA   s    r   r=  r=  /  r#  r$   c                  (    [         R                  " U 6 $ )z&GetDriver(int driver_number) -> Driver)r   r6  rA   s    r   r6  r6  3  r8  r$   c                  (    [         R                  " U 6 $ )zEGeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **)r   GeneralCmdLineProcessorrA   s    r   r@  r@  7  s    ''..r$   c                  .    [         R                  " U 0 UD6$ )z\TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int)r   TermProgress_nocbr  s     r   rB  rB  ;  s    !!42622r$   (*  r  r   _swig_python_version_info__package__r   r   r   builtinsr   r]   r   r&   r,   r6   r   r8   	wkb25DBitwkb25Bit
wkbUnknownwkbPointwkbLineString
wkbPolygonwkbMultiPointwkbMultiLineStringwkbMultiPolygonwkbGeometryCollectionwkbCircularStringwkbCompoundCurvewkbCurvePolygonwkbMultiCurvewkbMultiSurfacewkbCurve
wkbSurfacewkbPolyhedralSurfacewkbTINwkbTrianglewkbNonewkbLinearRingwkbCircularStringZwkbCompoundCurveZwkbCurvePolygonZwkbMultiCurveZwkbMultiSurfaceZ	wkbCurveZwkbSurfaceZwkbPolyhedralSurfaceZwkbTINZwkbTriangleZ	wkbPointMwkbLineStringMwkbPolygonMwkbMultiPointMwkbMultiLineStringMwkbMultiPolygonMwkbGeometryCollectionMwkbCircularStringMwkbCompoundCurveMwkbCurvePolygonMwkbMultiCurveMwkbMultiSurfaceM	wkbCurveMwkbSurfaceMwkbPolyhedralSurfaceMwkbTINMwkbTriangleM
wkbPointZMwkbLineStringZMwkbPolygonZMwkbMultiPointZMwkbMultiLineStringZMwkbMultiPolygonZMwkbGeometryCollectionZMwkbCircularStringZMwkbCompoundCurveZMwkbCurvePolygonZMwkbMultiCurveZMwkbMultiSurfaceZM
wkbCurveZMwkbSurfaceZMwkbPolyhedralSurfaceZMwkbTINZMwkbTriangleZMwkbPoint25DwkbLineString25DwkbPolygon25DwkbMultiPoint25DwkbMultiLineString25DwkbMultiPolygon25DwkbGeometryCollection25Dr  r  r  r  	OFTStringr  OFTWideStringOFTWideStringListr  OFTDateOFTTimeOFTDateTimer  r  OFSTNoner  	OFSTInt16OFSTFloat32OFSTJSONOFSTUUIDOJUndefinedOJLeftOJRight
OFDT_CODED
OFDT_RANGE	OFDT_GLOBOFDSP_DEFAULT_VALUEOFDSP_DUPLICATEOFDSP_GEOMETRY_RATIOOFDMP_DEFAULT_VALUE	OFDMP_SUMOFDMP_GEOMETRY_WEIGHTEDwkbXDRwkbNDRr  ALTER_NAME_FLAGALTER_TYPE_FLAGALTER_WIDTH_PRECISION_FLAGALTER_NULLABLE_FLAGALTER__FLAGALTER_DEFAULT_FLAGALTER_UNIQUE_FLAGALTER_DOMAIN_FLAGALTER_ALTERNATIVE_NAME_FLAGALTER_COMMENT_FLAGALTER_ALL_FLAGALTER_GEOM_FIELD_DEFN_NAME_FLAGALTER_GEOM_FIELD_DEFN_TYPE_FLAG#ALTER_GEOM_FIELD_DEFN_NULLABLE_FLAGALTER_GEOM_FIELD_DEFN_SRS_FLAG*ALTER_GEOM_FIELD_DEFN_SRS_COORD_EPOCH_FLAGALTER_GEOM_FIELD_DEFN_ALL_FLAG
F_VAL_NULLF_VAL_GEOM_TYPEF_VAL_WIDTHF_VAL_ALLOW_NULL_WHEN_DEFAULT	F_VAL_ALLTZFLAG_UNKNOWNTZFLAG_LOCALTIMETZFLAG_MIXED_TZ
TZFLAG_UTCGGT_COUNT_NOT_NEEDEDGGT_STOP_IF_MIXEDGGT_GEOMCOLLECTIONZ_TINZOLCRandomReadOLCSequentialWriteOLCRandomWriteOLCFastSpatialFilterOLCFastFeatureCountOLCFastGetExtentOLCCreateFieldOLCDeleteFieldOLCReorderFieldsOLCAlterFieldDefnOLCAlterGeomFieldDefnOLCTransactionsOLCDeleteFeatureOLCUpsertFeatureOLCUpdateFeatureOLCFastSetNextByIndexOLCStringsAsUTF8OLCIgnoreFieldsOLCCreateGeomFieldOLCCurveGeometriesOLCMeasuredGeometriesOLCZGeometries	OLCRenameOLCFastGetArrowStreamODsCCreateLayerODsCDeleteLayer#ODsCCreateGeomFieldAfterCreateLayerODsCCurveGeometriesODsCTransactionsODsCEmulatedTransactionsODsCMeasuredGeometriesODsCZGeometriesODsCRandomLayerReadODsCRandomLayerWriteODsCAddFieldDomainODsCDeleteFieldDomainODsCUpdateFieldDomainODrCCreateDataSourceODrCDeleteDataSource
OLMD_FID64rd  OGRERR_NOT_ENOUGH_DATAOGRERR_NOT_ENOUGH_MEMORY OGRERR_UNSUPPORTED_GEOMETRY_TYPEOGRERR_UNSUPPORTED_OPERATIONOGRERR_CORRUPT_DATAre  OGRERR_UNSUPPORTED_SRSOGRERR_INVALID_HANDLEOGRERR_NON_EXISTING_FEATUREr@   rE   rH   rJ   rM   rP   objectrR   rp   rs   ru   ry   rl   r{   MajorObject_swigregisterr   r   r   r   StyleTable_swigregisterr   Driver_swigregisterr  DataSource_swigregisterr  ArrowArray_swigregisterr  ArrowSchema_swigregisterr  ArrowArrayStream_swigregisterr  Layer_swigregisterrl  Feature_swigregisterr  FeatureDefn_swigregisterr  FieldDefn_swigregisterr  GeomFieldDefn_swigregisterr  r  r  r  r  r  r  r  r  r  r  r  r  r  Geometry_swigregisterr  PreparedGeometry_swigregisterr  GeomTransformer_swigregisterr  FieldDomain_swigregisterr  r   r  r  r  r	  r  r  r  rg  r  r  r  r  r  r  r   r"  r%  r'  r*  r,  r.  r0  r2  r5  r7  r   r;  r=  r6  r@  rB  TermProgressr%   r$   r   <module>r	     s   :#/"[
L$ L
 NN	==__
==""__
"",, &&22 ** (( &&""&&==__
00 	
,,"",, ** (( $$(( NN	22 
,,  NN	$$$$.. (( 44 ,, ** (( $$(( NN	22 
,,  __
&&  &&00 ** 66 .. ,, ** &&** __
  44 ==""(( ""(( 22 ,, 88 __
$$
,,NN	""""** NN	
,,
,,  (( ==NN	====	
,,__
__
NN	.. &&00 .. NN	66 		
,,&&&&!<< .. ,, ** ** ">> ,, $$"&"F"F "&"F"F &*&N&N #!%!D!D -1-\-\ *!%!D!D __
&& $ B B NN	$$(( &&__
00 ** 88 "",, $$00 .. (( $$$$(( ** 22 &&(( (( (( 22 (( &&,, ,, 22 $$NN	22 &&&&&*&N&N #.. (( 88 44 &&.. 00 ,, 22 22 00 00 __
44 88 #'#H#H  #@@ .. $$44 22 ">> (++&*::J6 :J~<B 6; 2R /+& /+f   k *+++%= %=P   Z (-3[ -3`     N	( N	(d   Z (6 60   Z (6& 68   k *Ev E&  " "#3 4M<K M<d(    T!f T!r:   ' "s& sp   k *O Of   I &91F 91z    .77-.276&)+).B)v B)N(   8 $;v ;&  " "#3 4;f ;   ! !/ 2L5& L5^   k *..6-&&6#*(+"&'"$&(#$99!&,'!/3   ]i  s   p# #
p10p1