
    df             +          d dl mZ esdev rddlmZ nd dlZ	 d dlZd Z
d Zd Zd	 Z G d
 de      Zd adNdZd dl d dlmZ d dl Z dddZej,                  dee j.                     z  ej0                  dee j.                     z  ej2                  dee j.                     z  ej4                  dee j.                     z  ej6                  dee j.                     z  ej8                  dee j.                     z  ej:                  dee j.                     z  ej<                  dee j.                     z  ej>                  dee j.                     z  i	Z d Z!dg fdZ"d Z#d Z$d Z%d Z&d  Z'd! Z( G d" d#e)      Z*d$ Z+d% Z,d& Z-d' Z.d( Z/d) Z0	 	 	 	 	 	 dOd,Z1d- Z2	 	 	 	 	 	 	 	 	 	 	 dPd.Z3d/ Z4dQd0Z5d1 Z6d2 Z7ejp                  d3ejr                  d4ejt                  d5ejv                  d6ejx                  d7ejz                  d8ej|                  d9ej~                  d:ej                  d;i	ZAddej                  ddd d d<d<d<d<ddddd+d+ddddddd+dddd+d*d*dd=ddf"d>ZCd? ZDddddddddd+d d ddddd+ddddej                  ej                  dddd+d+d+d+dddddddd+d*dd+d=ddf+d@ZEdA ZF	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dRdBZGdC ZH	 	 	 	 	 	 	 dSdDZIdE ZJ	 	 	 	 	 dTdFZKdG ZLddej                  d d ddddddddddddddfdHZMdI ZNddej                  ddddddddddd+dd+d+ddd+ddddddddfdJZOdK ZP	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dUdLZQdM ZR	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dVdNZSdO ZT	 	 	 dWdPZUdQ ZVdR ZWdXdSZXdT ZYdU ZZd dl[Z[e[j                  dYdV       Z]dYdWZ^e[j                  dX        Z_dY Z`dZ Zad[ Zbd\ Zcd] Zdd^ Zed_ Zfd` Zgda Zhdb Zidc Zjdd Zkde Zldf Zmdg Zndh Zodi Zpdj Zqdk Zrdl Zsdm Ztdn Zudo Zvdp Zwdq Zxdr Zy G ds dte)      Zz ej                  ez       du Z|dv Z}dw Z~dx Zdy Zdz Zd{ Zd| Zd} Zd~ Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z G d de)      Z ej:                  e       ej<                  Zej>                  Zej@                  ZejB                  ZejD                  Z G d de)      Z ejH                  e       d Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zejb                  Zejd                  Zejf                  Zd Zd Zd Zd Zd Zd Zd Zd Zd Z G d de)      Z ej|                  e        G d de      Z ej                  e       ddlmZ ddlmZ  G d de)      Z ej                  eë        G d de)      Z ej                  eū       d Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZdÄ ZdĄ Zdń ZdƄ Z G dǄ de)      Z ej                  e֫        G dɄ de)      Z ej                  eث        G d˄ de      Z ej                  eګ       ej                  Zej                  Z G d̈́ de)      Z ej                  eޫ        G dτ de)      Z ej                  e        G dф de)      Z ej                  e        G dӄ de)      Z ej                  e        G dՄ de)      Z ej                  e       ej                  Zej                  Zej                  Z G dׄ de)      Z ej                  e        G dل de)      Z ej                  e        G dۄ de      Z ej                  e        G d݄ de)      Z ej                  e        G d߄ de)      Z ej                  e        G d de)      Z ej                  e       d Z G d de)      Z ej                  e       d Zej                  Zd Zd Zd Zd Zd Z d Zd Zd Zd Zd Zd Zd Zd Zej                  Z	ej                  Z
ej                  Zej                  Zej                  Zej                  Zej                  Zd Zd Zd Z G d de)      Z ej(                  e       d Z G d de)      Z ej.                  e       d Zd Zd Zd Zd  Zd Zd Zd Zd Z d Z!d Z"d Z#d Z$d	 Z%d
 Z&d Z'd Z(d Z)d Z*d Z+d Z,d Z-d Z.d Z/d Z0d Z1d Z2d Z3d Z4d Z5d Z6d Z7d Z8d Z9d Z:d Z; ej<                  d       Z< G d! d"e)      Z= ej|                  e=       d# Z? G d$ d%e)      Z@ ej                  e@       d& ZB G d' d(e)      ZC ej                  eC       d) ZE G d* d+e)      ZF ej                  eF       d, ZH G d- d.e)      ZI ej                  eI       d/ ZKd0 ZL G d1 d2e)      ZM ej                  eM       d3 ZOd4 ZP G d5 d6e)      ZQ ej                  eQ       d7 ZS G d8 d9e)      ZT ej                  eT       d: ZVd; ZW G d< d=e)      ZX ej                  eX       d> ZZ G d? d@e)      Z[ ej                  e[       dA Z]dB Z^ G dC dDe)      Z_ ej                  e_       dE ZadF Zb G dG dHe)      Zc ej                  ec       dI ZedJ Zf G dK dLe)      Zg ej                  eg       dM Ziy# e	$ r d dlZY w xY w(Z      version_info.   )_gdalNc                     	 d| j                   j                         z   }d| j                  j
                  d| j                  j                  d|dS # t        j                  $ r d}Y Kw xY w)Nz	proxy of  <r   z; z >)this__repr____builtin__	Exception	__class__
__module____name__)selfstrthiss     ,/usr/lib/python3/dist-packages/osgeo/gdal.py
_swig_reprr      s_    		 2 2 44 "^^668O8OQXZZ    s   A A+*A+c                       fd}|S )Nc                     |dk(  r | ||       y |dk(  r| j                   j                  |       y t        | |      r.t        t	        t        |       |      t              r | ||       y t        d| z        )Nr   thisownz(You cannot add instance attributes to %s)r   ownhasattr
isinstancegetattrtypepropertyAttributeError)r   namevaluesets      r   set_instance_attrzE_swig_setattr_nondynamic_instance_variable.<locals>.set_instance_attr   si    6>dE"YIIMM% T4 ZT
D0I8%TdE" !Kd!RSS     )r"   r#   s   ` r   *_swig_setattr_nondynamic_instance_variabler&      s    T r$   c                       fd}|S )Nc                     t        | |      r%t        t        | |      t              s | ||       y t	        d| z        )Nz%You cannot add class attributes to %s)r   r   r   r   r   )clsr    r!   r"   s      r   set_class_attrz?_swig_setattr_nondynamic_class_variable.<locals>.set_class_attr)   s:    3jd1CX&NT5! !H3!NOOr$   r%   )r"   r*   s   ` r   '_swig_setattr_nondynamic_class_variabler+   (   s    P
 r$   c                       fd}|S )zlClass decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclassc                 p     | j                   | j                  | j                  j                               S N)r   	__bases____dict__copy)r)   	metaclasss    r   wrapperz$_swig_add_metaclass.<locals>.wrapper3   s'    s}}cll6G6G6IJJr$   r%   )r2   r3   s   ` r   _swig_add_metaclassr4   1   s    KNr$   c                   4    e Zd ZdZ eej                        Zy)_SwigNonDynamicMetazKMeta class to enforce nondynamic attributes (no new attributes) for a classN)r   r   __qualname____doc__r+   r   __setattr__r%   r$   r   r6   r6   8   s    U9$:J:JKKr$   r6   c                     t         dk(  ry da ||dk(  rd}|| }dj                  ||      }ddlm}  |dj                  | |      t               y )Nr   utilsosgeo_utilsz{}.{}r   warnz:{}.py was placed in a namespace, it is now available as {})have_warnedformatwarningsr>   DeprecationWarning)modulesub_package
new_moduler>   s       r   deprecation_warnrF   @   s`     aKkW4#
Z8J	E	M	MfV`	ar$   )*)	gdalconstr
   >)littlebigz%si2z%su2z%si4z%su4z%sf4z%sf8z%st8c                    t        |       }||dk(  ryt               }t        |j                  d      |j                  d      |j                  d      d|      }|dk7  r|S t	        d      }|y|j                  ||j                  |j                        }|j                  d      j                  |       t        |j                  d      |j                  d      |j                  d      |j                  d      |      }d }d }y)NNULLr            r   GTiff)
Open
ColorTableComputeMedianCutPCTGetRasterBandGetDriverByNameCreateRasterXSizeRasterYSizeSetRasterColorTableDitherRGB2PCT)src_filenamedst_filenamesrc_dscterrgtiff_driverdst_dss          r   RGBFile2PCTFilerc   d   s   &^v'|"F003"003"003	%# 	AXj ),|%1163E3EG&q--b1f**1-**1-**1-**1-		#
 &&	
r$   c              #      K   t        | ||      }|st        | dz         	 	 t        |      }|sn| 	 t        |       y# t        |       w xY ww)z\ Iterate over a directory.

      recursionLevel = -1 means unlimited level of recursion.
  z does not existN)OpenDirOSErrorGetNextDirEntryCloseDir)pathrecursionLeveloptionsdirentrys        r   listdirro      sa     
 	ng.#	D,,--!#&%+	   smhsms   AA AAAc                  &    t        j                  |  S )zGetUseExceptions() -> int)r   GetUseExceptionsargss    r   rq   rq          !!4((r$   c                  &    t        j                  |  S )z_GetExceptionsLocal() -> int)r   _GetExceptionsLocalrr   s    r   rv   rv          $$d++r$   c                  &    t        j                  |  S )z_SetExceptionsLocal(int bVal))r   _SetExceptionsLocalrr   s    r   ry   ry      rw   r$   c                  &    t        j                  |  S )z_UseExceptions())r   _UseExceptionsrr   s    r   r{   r{          &&r$   c                  &    t        j                  |  S )z_DontUseExceptions())r   _DontUseExceptionsrr   s    r   r~   r~          ##T**r$   c                  &    t        j                  |  S )z+_UserHasSpecifiedIfUsingExceptions() -> int)r   "_UserHasSpecifiedIfUsingExceptionsrr   s    r   r   r          33T::r$   c                   $    e Zd ZdZddZd Zd Zy)ExceptionMgra  
    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                     || _         y)zK
        Save whether or not this context will be using exceptions
        N)requestedUseExceptions)r   useExceptionss     r   __init__zExceptionMgr.__init__   s     '4#r$   c                     t               | _        t        | j                         t        j
                  dk(  r&	 ddlm} |r|j                  | j                         yyy# t        $ r d}Y -w xY w)z
        On context entry, save the current GDAL exception state, and
        set it to the state requested for the context

        
osgeo.gdalr   
gdal_arrayN)	rv   currentUseExceptionsry   r   r   r   r	   r   ImportError)r   r   s     r   	__enter__zExceptionMgr.__enter__   sl     %8$9!D778""l2"( ..t/J/JK  3  "!
"s   A A-,A-c                     t        | j                         t        j                  dk(  r&	 ddlm} |r|j                  | j                         yyy# t        $ r d}Y -w xY w)zy
        On exit, restore the GDAL/OGR/OSR/GNM exception state which was
        current on entry to the context
        r   r   r   N)ry   r   r   r   r	   r   r   )r   exc_typeexc_valexc_tbr   s        r   __exit__zExceptionMgr.__exit__   sa    
 	D556""l2"( ..t/H/HI  3  "!
"s   A AANT)r   r   r7   r8   r   r   r   r%   r$   r   r   r      s    .4L Jr$   r   c                     	 ddl m}  | j                          	 ddl m} |j                          	 ddl m}  |j                          	 ddl m}  |j                          	 ddl m} |j                          y# t        $ r Y jw xY w# t        $ r Y bw xY w# t        $ r Y Yw xY w# t        $ r Y Pw xY w# t        $ r Y yw xY w)z Enable 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   gdalr   ogrosrgnmN)r	   r   r{   r   r   r   r   r   r   r   r   r   r   s        r   UseExceptionsr      s     !!#'  
  
  
  
  W   A7 B B B$  B3 7	BB	BB	B! B!$	B0/B03	B?>B?c                     	 ddl m}  | j                          	 ddl m} |j                          	 ddl m}  |j                          	 ddl m}  |j                          	 ddl m} |j                          y# t        $ r Y jw xY w# t        $ r Y bw xY w# t        $ r Y Yw xY w# t        $ r Y Pw xY w# t        $ r Y yw xY w)z Disable 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   r   r   r   r   r   N)r	   r   r~   r   r   r   r   r   r   s        r   DontUseExceptionsr   
  s    ! %%'   '  
  
  
  
  r   c                  &    t        j                  |  S )zWVSIFReadL(unsigned int nMembSize, unsigned int nMembCount, VSILFILE fp) -> unsigned int)r   	VSIFReadLrr   s    r   r   r   *      ??D!!r$   c                  &    t        j                  |  S )z2VSIGetMemFileBuffer_unsafe(char const * utf8_path))r   VSIGetMemFileBuffer_unsaferr   s    r   r   r   .      ++T22r$   c                      ddl m}  t        | d      s-t               s"d| _        dd l}|j                  dt               y y y )Nr   r   2hasWarnedAboutUserHasNotSpecifiedIfUsingExceptionsTr   zNeither gdal.UseExceptions() nor gdal.DontUseExceptions() has been explicitly called. In GDAL 4.0, exceptions will be enabled by default.)r	   r   r   r   r   rA   r>   FutureWarning)r   rA   s     r   +_WarnIfUserHasNotSpecifiedIfUsingExceptionsr   3  sA    4MNWyW{BF?BCP	R X|Nr$   c                  2    ddl m}   | j                          y )Nr   r   )r	   r   r   r   s    r   ._WarnIfUserHasNotSpecifiedIfUsingOgrExceptionsr   <  s    3C335r$   TFc                    | g n| } t        | t              rt        |       }d}d|v rd}n| }|dk(  r|dgz  }n|dk7  rt        d      d|v rd}|r|dgz  }|r|dgz  }|r|dgz  }|r|dgz  }|r|d	gz  }|r|d
gz  }|	s|dgz  }|
s|dgz  }|s|dgz  }|s|dgz  }|r|dgz  }|s|dgz  }|r|ddgz  }|r|d|gz  }||D ]	  }|d|gz  } t	        |      ||fS )z Create a InfoOptions() object that can be passed to gdal.Info()
        options can be be an array of strings, a string or let empty and filled from other keywords.text-jsonjsonInvalid value for formatz-mmz-histz-proj4-statsz-approx_statsz	-checksum-nogcp-nomd-noratz-noctz-listmddz-noflz-mddall-wkt_format)r   strParseCommandLiner   GDALInfoOptions)rl   r@   deserializecomputeMinMaxreportHistogramsreportProj4statsapproxStatscomputeChecksumshowGCPsshowMetadatashowRATshowColorTablelistMDDshowFileListallMetadataextraMDDomains	wktFormatnew_optionsmdds                       r   InfoOptionsr   B  s~    ObG'3&w/k!FVG9$Kv677k!FE7"KG9$KH:%KH:%KO,,KK=(KH:%KG9$KH:%KG9$KJ<'KG9$KFE?*KM955K%% -},- K(&+>>r$   c                 ,   t                d|vst        |d   t        t        f      rt	        di |\  }}}n	|d   \  }}}ddl}t        | t        |j                  f      rt        |       } t        | |      }|dk(  r|rddl	}|j                  |      }|S )ac  Return information on a raster dataset.

    Parameters
    ----------
    ds:
        a Dataset object or a filename
    kwargs:
        options: return of gdal.InfoOptions(), string or array of strings
        other keywords arguments of gdal.InfoOptions().
        If options is provided as a gdal.InfoOptions() object, other keywords are ignored.
    rl   r   Nr   r%   )r   r   listr   r   osPathLikerR   InfoInternalr   loadsdskwargsoptsr@   r   r   retr   s           r   Infor   |  s     01*VI->s"L&1&;F&;#v{&,Y&7#v{"sBKK()"X
r4
 CKjjoJr$   c                    | g n| } d}t        | t              rt        |       }d}d|v rd}n| }|dk(  r|dgz  }n|dk7  rt        d      d|v rd}|r|d|gz  }|r|d|gz  }|	r|d|	gz  }|
r|d	|
gz  }|s|d
gz  }|s|dgz  }|r|dgz  }|D ]  }||gz  }
 n|dgz  }|dk(  r	|r|dgz  }n|s|dgz  }t	        |      ||fS )a   Create a VectorInfoOptions() object that can be passed to gdal.VectorInfo()
        options can be be an array of strings, a string or let empty and filled from other keywords.

        Parameters
        ----------
        options:
            can be be an array of strings, a string or let empty and filled from other keywords.
        format:
            "text" or "json"
        deserialize:
            if JSON output should be returned as a Python dictionary. Otherwise as a serialized representation.
        SQLStatement:
            SQL statement to apply to the source dataset
        SQLDialect:
            SQL dialect ('OGRSQL', 'SQLITE', ...)
        where:
            WHERE clause to apply to source layer(s)
        layers:
            list of layers of interest
        featureCount:
            whether to compute and display the feature count
        extent:
            whether to compute and display the layer extent
        dumpFeatures:
            set to True to get the dump of all features
    Tr   r   r   r   -sql-dialect-wherer   z-nocountz	-noextentdummy_dataset_namez-alz	-featuresz-so)r   r   r   r   GDALVectorInfoOptions)rl   r@   r   layersdumpFeaturesfeatureCountextentSQLStatement
SQLDialectwherer   r   layers                r   VectorInfoOptionsr     sM   L ObGK'3&w/k!FVG9$Kv677k!FFL11KJ
33KHe,,KM955KJ<'KK=(K011K 'w&' E7"KV},w&!+.DDr$   c                 D   t                d|vst        |d   t        t        f      rt	        di |\  }}}n	|d   \  }}}ddl}t        | t        |j                  f      rt        | t        t        z        } t        | |      }|dk(  r|rddl}|j                  |      }|S )au  Return information on a vector dataset.

    Parameters
    ----------
    ds:
        a Dataset object or a filename
    kwargs:
        options: return of gdal.VectorInfoOptions(), string or array of strings
        other keywords arguments of gdal.VectorInfoOptions().
        If options is provided as a gdal.VectorInfoOptions() object, other keywords are ignored.
    rl   r   Nr   r%   )r   r   r   r   r   r   r   OpenExOF_VERBOSE_ERROR	OF_VECTORVectorInfoInternalr   r   r   s           r   
VectorInfor     s     01*VI->s"L&7&A&&A#v{&,Y&7#v{"sBKK()B(945
R
&CKjjoJr$   c                     | g n| } t        | t              rt        |       }n5| }|r|dgz  }|r|d|gz  }|r|dt        |      gz  }|r|D ]	  }|d|gz  } t        |      |fS )z Create a MultiDimInfoOptions() object that can be passed to gdal.MultiDimInfo()
        options can be be an array of strings, a string or let empty and filled from other keywords.z	-detailed-array-limitz-arrayoption)r   r   r   GDALMultiDimInfoOptions)rl   detailedarrayarrayoptionslimitas_textr   options           r   MultiDimInfoOptionsr     s     ObG'3&w/K=(KHe,,KHc%j11K& 8778 #;/88r$   c                 4   t                d|vst        |d   t        t        f      rt	        di |\  }}n|d   }d}ddl}t        | t        |j                  f      rt        | t        t        z        } t        | |      }|sddl}|j                  |      }|S )at  Return information on a dataset.

    Parameters
    ----------
    ds:
        a Dataset object or a filename
    kwargs:
        options: return of gdal.MultiDimInfoOptions(), string or array of strings
        other keywords arguments of gdal.MultiDimInfoOptions().
        If options is provided as a gdal.MultiDimInfoOptions() object, other keywords are ignored.
    rl   Tr   Nr%   )r   r   r   r   r   r   r   r   r   OF_MULTIDIM_RASTERMultiDimInfoInternalr   r   )r   r   r   r   r   r   r   s          r   MultiDimInfor   "  s     01*VI->s"L+5f5gi "sBKK()B(+==>
r4
(CjjoJr$   c                 B    t        | t              rd| z  S t        |       S )Nz%.18g)r   floatr   xs    r   _strHighPrecr  B  s    &q%0GaK<c!f<r$   nearbilinearcubiccubicsplinelanczosaveragermsmodegaussg        AUTOc"           
         | dk(  }"|"rg } n| g n| } t        | t              rt        |       }#n | }#||#d|gz  }#|t        j                  k7  r|#dt        |      gz  }#|dk7  r|#dt        |      gz  }#|dk7  r|D ]  }$|#dt        |$      gz  }# |dk7  s|dk7  r|#dt        |      t        |      gz  }#n*|dk7  r%|dk7  r |#dt        |      d	z   t        |      d	z   gz  }#|[t        |t              r|#d
|gz  }#nCt        |t              r%|j                         D ]  \  }%}&|#d
|% d|& gz  }# n|D ]	  }'|#d
|'gz  }# |:|#dt        |d         t        |d         t        |d         t        |d         gz  }#|r|#dgz  }#|r|#dgz  }#|r#|D ]  }(|#dgz  }#|(D ]  }&|#t        |&      gz  }#   |r|D ]  })|#dt        |)      gz  }# |:|#dt        |d         t        |d         t        |d         t        |d         gz  }#|r9|rt        d      t        |      dk(  sJ |#dgz  }#|D ]  }*|#t        |*      gz  }# |[t        |t              r|#d|gz  }#nCt        |t              r%|j                         D ]  \  }%}&|#d|% d|& gz  }# n|D ]	  }'|#d|'gz  }# ||#dt        |      gz  }#|r|#dgz  }#|q|D ]l  }+|#dt        |+j                        t        |+j                        t        |+j                        t        |+j                        t        |+j                        gz  }#n |:|#dt        |d         t        |d         t        |d         t        |d         gz  }#||#dt        |      gz  }#||#dt        |      gz  }#||#dt        |      gz  }#|r|#d gz  }#|s|#d!gz  }#|s|#d"gz  }#|'|t         v r|#d#t         |   gz  }#n|#d#t        |      gz  }#|	dk7  r|
dk7  r|#d$t        |	      t        |
      gz  }#|t        |t              rn2t        |t"              r |dk  rd%t        |      z   }nt        |      }nd}||d%k7  r|#d&|gz  }#|"r|#S t%        |#      | |!fS )'a  Create a TranslateOptions() object that can be passed to gdal.Translate()

    Parameters
    ----------
    options:
        can be be an array of strings, a string or let empty and filled from other keywords.
    format:
        output format ("GTiff", etc...)
    outputType:
        output type (gdalconst.GDT_Byte, etc...)
    bandList:
        array of band numbers (index start at 1)
    maskBand:
        mask band to generate or not ("none", "auto", "mask", 1, ...)
    width:
        width of the output raster in pixel
    height:
        height of the output raster in pixel
    widthPct:
        width of the output raster in percentage (100 = original width)
    heightPct:
        height of the output raster in percentage (100 = original height)
    xRes:
        output horizontal resolution
    yRes:
        output vertical resolution
    creationOptions:
        list or dict of creation options
    srcWin:
        subwindow in pixels to extract: [left_x, top_y, width, height]
    projWin:
        subwindow in projected coordinates to extract: [ulx, uly, lrx, lry]
    projWinSRS:
        SRS in which projWin is expressed
    strict:
        strict mode
    unscale:
        unscale values with scale and offset metadata
    scaleParams:
        list of scale parameters, each of the form [src_min,src_max] or [src_min,src_max,dst_min,dst_max]
    exponents:
        list of exponentiation parameters
    outputBounds:
        assigned output bounds: [ulx, uly, lrx, lry]
    outputGeotransform:
        assigned geotransform matrix (array of 6 values) (mutually exclusive with outputBounds)
    metadataOptions:
        list or dict of metadata options
    outputSRS:
        assigned output SRS
    nogcp:
        ignore GCP in the raster
    GCPs:
        list of GCPs
    noData:
        nodata value (or "none" to unset it)
    rgbExpand:
        Color palette expansion mode: "gray", "rgb", "rgba"
    stats:
        whether to calculate statistics
    rat:
        whether to write source RAT
    xmp:
        whether to copy XMP metadata
    resampleAlg:
        resampling mode
    overviewLevel:
        To specify which overview level of source files must be used
    callback:
        callback method
    callback_data:
        user data for callback
    __RETURN_OPTION_LIST__N-of-otz-mask-br   -outsizez%%-co=z-srcwinr   rN   rO   -strictz-unscalez-scalez	-exponentz-a_ullrz:outputBounds and outputGeotransform are mutually exclusive   z-a_gtz-mo-a_srsr   z-gcpz-projwinz-projwin_srs	-a_nodataz-expandr   r   z-noxmp-r-trr  -ovr)r   r   r   rH   GDT_UnknownGetDataTypeNamedictitemsr  r   lenGCPPixelGCPLineGCPXGCPYGCPZmapGRIORAMethodToStringintGDALTranslateOptions),rl   r@   
outputTypebandListmaskBandwidthheightwidthPct	heightPctxResyRescreationOptionssrcWinprojWin
projWinSRSstrictunscalescaleParams	exponentsoutputBoundsoutputGeotransformmetadataOptions	outputSRSnogcpGCPsnoData	rgbExpandr   ratxmpresampleAlgoverviewLevelcallbackcallback_datareturn_option_listr   bkvopt
scaleParamexponentvalgcps,                                               r   TranslateOptionsrT  Q  s   n !$<<"W'3&w/E6?*K...E?:#>??KtGS]33Kt .c!f~-.A:1JE
CK@@K]yA~JH(<c)nt>STTK&/3/77OT2+113 7DAqEaS!:#66K7 + 0CE3</K0I|F1I'>VTUY@WYeflmnfoYpr~  @F  GH  @I  sJ  K  KKI;&KJ<'K) ,
z)# ,ACF8+K,, % E\(-CDDE#I|LO'DlS_`aSbFceqr~  @A  sB  fC  EQ  R^  _`  Ra  Eb  c  cK \]])*a///G9$K) 3S 1223&/3/77OT2+113 7DAqEaS!:#66K7 + 0CE3</K0 Hc)n55KH:%K ^S\\(BLQTQ\Q\D]_kloltlt_uwz{~  |D  |D  xE  GS  TW  T\  T\  G]   ^  ^^JWQZ(@,wWXzBZ\hipqris\t  wC  DK  LM  DN  wO  P  PK!NC
O<<KKf)=>>K Is9~66KH:%KH:%KH:%K"55&=k&JKKc+&67719E<#5|D7IJJK J}c$Bs+q  &]); ; #M 2 M$&)@FM22K -xGGr$   c                     t                d|vst        |d   t        t        f      rt	        di |\  }}}n	|d   \  }}}ddl}t        |t        |j                  f      rt        |      }t        | ||||      S )a  Convert a dataset.

    Parameters
    ----------
    destName:
        Output dataset name
    srcDS:
        a Dataset object or a filename
    kwargs:
        options: return of gdal.TranslateOptions(), string or array of strings
        other keywords arguments of gdal.TranslateOptions().
        If options is provided as a gdal.TranslateOptions() object, other keywords are ignored.
    rl   r   Nr%   )	r   r   r   r   rT  r   r   rR   TranslateInternaldestNamesrcDSr   r   rI  rJ  r   s          r   	TranslaterZ    s{     01*VI->s"L*:*DV*D'x*0*;'x%#r{{+,UXudHmLLr$   c+                 	   | dk(  }+|+rg } n| g n| } t        | t              rt        |       },n| },|r|D ]  }-|,dt        |-      gz  }, |r|D ]  }-|,dt        |-      gz  }, ||,d|gz  },|t        j                  k7  r|,dt        |      gz  },|t        j                  k7  r|,dt        |      gz  },|:|,dt        |d	         t        |d
         t        |d         t        |d         gz  },||,dt        |      gz  },|||,dt        |      t        |      gz  },|	d	k7  s|
d	k7  r|,dt        |	      t        |
      gz  },||,dt        |      gz  },||,dt        |      gz  },||,d|gz  },|r|,dgz  },|r|,dgz  },n||,dgz  },|r|,dgz  },|Lt        |t              r%|j                         D ]  \  }.}/|,d|. d|/ gz  }, n|D ]  }0|,dt        |0      gz  }, ||,dt        |      gz  },|t        j                  dt        j                  dt        j                  dt        j                  dt        j                  dt        j                  dt        j                  d t        j                   d!t        j"                  d"t        j$                  d#t        j&                  d$t        j(                  d%t        j*                  d&t        j,                  d'i}1||1v r|,d(|1|   gz  },n|,d(t        |      gz  },||,d)t        |      gz  },|Ct        |t              r%|j                         D ]  \  }.}/|,d*|. d|/ gz  }, n|D ]	  }0|,d*|0gz  }, ||,d+t        |      gz  },||,d,t        |      gz  },|r|,d-gz  },|r|,d.gz  },|r|,d/gz  },|r|,d0gz  },||,d1t        |      gz  },|>t        |t              r |j                         D ]  \  }.}/|,d20gz  }, n|D ]	  }0|,d2|0gz  }, ||,d3t        |      gz  },| |,d4t        |       gz  },|!|,d5t        |!      gz  },|"|,d6t        |"      gz  },|#|,d7t        |#      gz  },|$r|,d8gz  },|%s|,d9gz  },|&r|,d:t        |&      gz  },|'r|,d;gz  },|(t        |(t              rn2t        |(t.              r |(d	k  rd<t        |(      z   }(nt        |(      }(nd}(|(|(d<k7  r|,d=|(gz  },|+r|,S t1        |,      |)|*fS )>a  Create a WarpOptions() object that can be passed to gdal.Warp()

    Parameters
    ----------
    options:
        can be be an array of strings, a string or let empty and filled from other keywords.
    format:
        output format ("GTiff", etc...)
    srcBands:
        list of source band numbers (between 1 and the number of input bands)
    dstBands:
        list of output band numbers
    outputBounds:
        output bounds as (minX, minY, maxX, maxY) in target SRS
    outputBoundsSRS:
        SRS in which output bounds are expressed, in the case they are not expressed in dstSRS
    xRes:
        output resolution in target SRS
    yRes:
        output resolution in target SRS
    targetAlignedPixels:
        whether to force output bounds to be multiple of output resolution
    width:
        width of the output raster in pixel
    height:
        height of the output raster in pixel
    srcSRS:
        source SRS
    dstSRS:
        output SRS
    coordinateOperation:
        coordinate operation as a PROJ string or WKT string
    srcAlpha:
        whether to force the last band of the input dataset to be considered as an alpha band.
        If set to False, source alpha warping will be disabled.
    dstAlpha:
        whether to force the creation of an output alpha band
    outputType:
        output type (gdalconst.GDT_Byte, etc...)
    workingType:
        working type (gdalconst.GDT_Byte, etc...)
    warpOptions:
        list or dict of warping options
    errorThreshold:
        error threshold for approximation transformer (in pixels)
    warpMemoryLimit:
        size of working buffer in MB
    resampleAlg:
        resampling mode
    creationOptions:
        list or dict of creation options
    srcNodata:
        source nodata value(s)
    dstNodata:
        output nodata value(s)
    multithread:
        whether to multithread computation and I/O operations
    tps:
        whether to use Thin Plate Spline GCP transformer
    rpc:
        whether to use RPC transformer
    geoloc:
        whether to use GeoLocation array transformer
    polynomialOrder:
        order of polynomial GCP interpolation
    transformerOptions:
        list or dict of transformer options
    cutlineDSName:
        cutline dataset name
    cutlineLayer:
        cutline layer name
    cutlineWhere:
        cutline WHERE clause
    cutlineSQL:
        cutline SQL statement
    cutlineBlend:
        cutline blend distance in pixels
    cropToCutline:
        whether to use cutline extent for output bounds
    copyMetadata:
        whether to copy source metadata
    metadataConflictValue:
        metadata data conflict value
    setColorInterpretation:
        whether to force color interpretation of input bands to output bands
    overviewLevel:
        To specify which overview level of source files must be used
    callback:
        callback method
    callback_data:
        user data for callback
    r  Nz-srcbandz-dstbandr  r  z-wt-ter   r   rN   rO   z-te_srsr  -ts-s_srs-t_srs-ct-tapz	-srcalphaz-nosrcalphaz	-dstalphaz-wor  z-etr  r  r  r	  r
  r  r  r  maxminmedq1q3sumr  z-wmr  
-srcnodataz
-dstnodataz-multiz-tpsz-rpcz-geolocz-order-toz-cutlinez-clz-cwherez-csqlz-cblendz-crop_to_cutliner   z-cvmdz-setcir  r  )r   r   r   rH   r  r   r  r!  r"  GRA_NearestNeighbourGRA_Bilinear	GRA_CubicGRA_CubicSplineGRA_LanczosGRA_AverageGRA_RMSGRA_ModeGRA_MaxGRA_MinGRA_MedGRA_Q1GRA_Q3GRA_Sumr*  GDALWarpAppOptions)2rl   r@   srcBandsdstBandsr=  outputBoundsSRSr3  r4  targetAlignedPixelsr/  r0  srcSRSdstSRScoordinateOperationsrcAlphadstAlphawarpOptionserrorThresholdwarpMemoryLimitr5  r,  workingTyperG  	srcNodata	dstNodatamultithreadtpsrpcgeolocpolynomialOrdertransformerOptionscutlineDSNamecutlineLayercutlineWhere
cutlineSQLcutlineBlendcropToCutlinecopyMetadatametadataConflictValuesetColorInterpretationrH  rI  rJ  rK  r   rL  rM  rN  rO  mapMethodToStrings2                                                     r   WarpOptionsr  5  s0   f !$<<"W'3&w/ 4
CF334 4
CF334E6?*K...E?:#>??K)///E?;#?@@K#E<Q#@,|\]B_amnz{|n}a~  AM  NZ  [\  N]  A^  _  _K&Is?';<<K 0E<#5|D7IJJKA:1E3u:s6{;;KHc&k22KHc&k22K*E#677KF8#KK=(K!M?*KK=(K"+t,'--/ 7DAqEaS!:#66K7 ' 5CE3s8#44K5%E<#?@@K" ..&&
##W))=%%y%%y!!5""F!!5!!5!!5  $  $!!5!" //&7&DEEc+&677&E3#788K&/40+113 7DAqEaS!:#66K7 + 0CE3</K0 L#i.99K L#i.99KH:%KF8#KF8#KI;&K&Hc/&:;;K),d3.446 0DAqE3</K0 . 0CE3</K0$JM(:;;K#E3|#455K#Is<'899K!GS_55K#Is<'899K.//KG9$K GS)>%?@@K!H:%K J}c$Bs+q  &]); ; #M 2 M$&)@FM22K{+X}EEr$   c                    t                d|vst        |d   t        t        f      rt	        di |\  }}}n	|d   \  }}}ddl}t        |t        |j                  f      rt        |      g}net        |t              rRg }|D ]J  }t        |t        |j                  f      r|j                  t        |             :|j                  |       L n|g}t        | t        |j                  f      rt        | ||||      S t        | ||||      S )a  Warp one or several datasets.

    Parameters
    ----------
    destNameOrDestDS:
        Output dataset name or object
    srcDSOrSrcDSTab:
        an array of Dataset objects or filenames, or a Dataset object or a filename
    kwargs:
        options: return of gdal.WarpOptions(), string or array of strings,
        other keywords arguments of gdal.WarpOptions().
        If options is provided as a gdal.WarpOptions() object, other keywords are ignored.
    rl   r   Nr%   )r   r   r   r   r  r   r   rR   appendwrapper_GDALWarpDestNamewrapper_GDALWarpDestDS)	destNameOrDestDSsrcDSOrSrcDSTabr   r   rI  rJ  r   srcDSTabelts	            r   Warpr  7  s    01*VI->s"L*5*?*?'x*0*;'x/C#56)*	OT	*" 	%C#R[[12S	*$		% $$"S"++$67'(8(D(Tabb%&6$R_``r$   c+           	      	   | dk(  }+|+rg } n| g n| } t        | t              rt        |       },nK| },||,d|gz  },||,dt        |      gz  },|#|r|,dt        |      gz  },n|,dt        |      gz  },||,d|gz  },||,dt        |      gz  },||,d	t        |      gz  },|	|,d
t        |	      gz  },|;|dk(  r|,dgz  },n/|dk(  r|,dgz  },n#|dk(  r|,dgz  },n|dk(  r|,dgz  },nt        d      |r|,dgz  },|r|,dgz  },|r|,dgz  },|
d}-|
D ]  }.|-r|-dz  }-|-|.z  }- |,d|-gz  },|Ct        |t              r%|j                         D ]  \  }/}0|,d|/ d|0 gz  }, n|D ]	  }1|,d|1gz  }, |Ct        |t              r%|j                         D ]  \  }/}0|,d|/ d|0 gz  }, n|D ]	  }1|,d|1gz  }, |$t        |t              r|,|gz  },n|D ]  }2|,|2gz  },
 ||,dt        |      gz  },|ddl}3|,dgz  },t        |t              r|,|gz  },n`t        ||3j                        r|,t        |      gz  },n:	 |,t        |d         t        |d          t        |d!         t        |d"         gz  },||,d$t        |      gz  },||,d%t        |      gz  },||,d&t        |      gz  },|ddl}3|,d'gz  },t        |t              r|,|gz  },n`t        ||3j                        r|,t        |      gz  },n:	 |,t        |d         t        |d          t        |d!         t        |d"         gz  },||,d)t        |      gz  },||,d*t        |      gz  },||,d+t        |      gz  },| |,d,t        |       gz  },|!|,d-t        |!      gz  },|"r|,d.gz  },|#2|,d/gz  },t        |#t              r|,|#gz  },n|,dj                  |#      gz  },|$r|,d0gz  },|r|,d1gz  },|:|,d2t        |d         t        |d          t        |d!         t        |d"         gz  },||,d3t        |      gz  },||,d4|gz  },|&t        |t              r|,d5|gz  },n|D ]	  }1|,d5|1gz  }, ||,d6|gz  },|%|,d7|%gz  },|&r|,d8gz  },|'r|,d9gz  },|(|,d:t        |(      gz  },|)|,d;gz  },|+r|,S t        |,      |)|*fS # t        $ r}4t        d#|       |4d}4~4ww xY w# t        $ r}4t        d(|       |4d}4~4ww xY w)<aP  
    Create a VectorTranslateOptions() object that can be passed to
    gdal.VectorTranslate()

    Parameters
    ----------
    options:
        can be be an array of strings, a string or let empty and filled from other
        keywords.
    format:
        format ("ESRI Shapefile", etc...)
    accessMode:
        None for creation, 'update', 'append', 'upsert', 'overwrite'
    srcSRS:
        source SRS
    dstSRS:
        output SRS (with reprojection if reproject = True)
    coordinateOperation:
        coordinate operation as a PROJ string or WKT string
    reproject:
        whether to do reprojection
    SQLStatement:
        SQL statement to apply to the source dataset
    SQLDialect:
        SQL dialect ('OGRSQL', 'SQLITE', ...)
    where:
        WHERE clause to apply to source layer(s)
    selectFields:
        list of fields to select
    addFields:
        whether to add new fields found in source layers (to be used with
        accessMode == 'append' or 'upsert')
    forceNullable:
        whether to drop NOT NULL constraints on newly created fields
    emptyStrAsNull:
        whether to treat empty string values as NULL
    spatFilter:
        spatial filter as (minX, minY, maxX, maxY) bounding box
    spatSRS:
        SRS in which the spatFilter is expressed. If not specified, it is assumed to be
        the one of the layer(s)
    datasetCreationOptions:
        list or dict of dataset creation options
    layerCreationOptions:
        list or dict of layer creation options
    layers:
        list of layers to convert
    layerName:
        output layer name
    geometryType:
        output layer geometry type ('POINT', ....). May be an array of strings
        when using a special value like 'PROMOTE_TO_MULTI', 'CONVERT_TO_LINEAR',
        'CONVERT_TO_CURVE' combined with another one or a geometry type.
    dim:
        output dimension ('XY', 'XYZ', 'XYM', 'XYZM', 'layer_dim')
    transactionSize:
        number of features to save per transaction (default 100 000). Increase the value
        for better performance when writing into DBMS drivers that have transaction
        support. Set to "unlimited" to load the data into a single transaction.
    clipSrc:
        clip geometries to the specified bounding box (expressed in source SRS),
        WKT geometry (POLYGON or MULTIPOLYGON), from a datasource or to the spatial
        extent of the -spat option if you use the "spat_extent" keyword. When
        specifying a datasource, you will generally want to use it in combination with
        the clipSrcLayer, clipSrcWhere or clipSrcSQL options.
    clipSrcSQL:
        select desired geometries using an SQL query instead.
    clipSrcLayer:
        select the named layer from the source clip datasource.
    clipSrcWhere:
        restrict desired geometries based on attribute query.
    clipDst:
        clip geometries after reprojection to the specified bounding box (expressed in
        dest SRS), WKT geometry (POLYGON or MULTIPOLYGON) or from a datasource. When
        specifying a datasource, you will generally want to use it in combination of
        the clipDstLayer, clipDstWhere or clipDstSQL options.
    clipDstSQL:
        select desired geometries using an SQL query instead.
    clipDstLayer:
        select the named layer from the destination clip datasource.
    clipDstWhere:
        restrict desired geometries based on attribute query.
    simplifyTolerance:
        distance tolerance for simplification. The algorithm used preserves topology per
        feature, in particular for polygon geometries, but not for a whole layer.
    segmentizeMaxDist:
        maximum distance between consecutive nodes of a line geometry
    makeValid:
        run MakeValid() on geometries
    mapFieldType:
        converts any field of the specified type to another type. Valid types are:
        Integer, Integer64, Real, String, Date, Time, DateTime, Binary, IntegerList,
        Integer64List, RealList, StringList. Types can also include subtype between
        parenthesis, such as Integer(Boolean), Real(Float32),... Special value All can
        be used to convert all fields to another type. This is an alternate way to using
        the CAST operator of OGR SQL, that may avoid typing a long SQL query.
        Note that this does not influence the field types used by the source driver,
        and is only an afterwards conversion.
    explodeCollections:
        produce one feature for each geometry in any kind of geometry collection in the
        source file, applied after any -sql option. This option is not compatible with
        preserveFID but a SQLStatement (e.g. SELECT fid AS original_fid, * FROM ...)
        can be used to store the original FID if needed.
    preserveFID:
        Use the FID of the source features instead of letting the output driver automatically
        assign a new one (for formats that require a FID). If not in append mode, this behavior
        is the default if the output driver has a FID  layer  creation  option,  in which case
        the name of the source FID column will be used and source feature IDs will be attempted
        to be preserved. This behavior can be disabled by setting -unsetFid.
        This option is not compatible with explodeCollections
    zField:
        name of field to use to set the Z component of geometries
    resolveDomains:
        whether to create an additional field for each field associated with a coded
        field domain.
    skipFailures:
        whether to skip failures
    limit:
        maximum number of features to read per layer
    callback:
        callback method
    callback_data:
        user data for callback
    r  Nz-fr^  r_  r  r`  r   r   r   updatez-updater  z-append	overwritez
-overwriteupsertz-upsertzunhandled accessModez
-addfieldsz-forceNullablez-emptyStrAsNullr	   ,z-select-dscor  -lcoz-gtr   z-clipsrcr   rN   rO   zinvalid value for clipSrc: z-clipsrcsqlz-clipsrclayerz-clipsrcwherez-clipdstzinvalid value for clipDst: z-clipdstsqlz-clipdstlayerz-clipdstwhere	-simplifyz-segmentizez
-makevalidz-mapFieldTypez-explodecollectionsz-preserve_fid-spatz	-spat_srsz-nlnz-nltz-dim-zfieldz-resolveDomainsz-skipr   z	-progress)r   r   r   r   r!  r"  r   r   
ValueErrorjoinGDALVectorTranslateOptions)5rl   r@   
accessModer}  r~  	reprojectr  r   r   r   selectFields	addFieldsforceNullableemptyStrAsNull
spatFilterspatSRSdatasetCreationOptionslayerCreationOptionsr   	layerNamegeometryTypedimtransactionSizeclipSrc
clipSrcSQLclipSrcLayerclipSrcWhereclipDst
clipDstSQLclipDstLayerclipDstWherepreserveFIDsimplifyTolerancesegmentizeMaxDist	makeValidmapFieldTypeexplodeCollectionszFieldresolveDomainsskipFailuresr   rI  rJ  rK  r   rR  itemrM  rN  rO  lyrr   exs5                                                        r   VectorTranslateOptionsr  a  s   B !$<<"W'3&w/D&>)KHc&k22K#f+66#f+66*E#677K#FC$566K!JJ88KHc%j11K!X%	{*x'	{*{*~-x'	{* 677L>)K,--K-..K#C$ 3JCt Is++K!-0$7288: 9DAqGs!A3Z#88K9 2 2CGS>1K2  +.50668 8DAqFqc1#J#77K8 0 1CFC=0K1 &#&x'! )CC5(K) &E3#788KJ<'K'3'y(GR[[1G~-VGAJGAJGAJGAJ	$ K !M3z?;;K#OS->??K#OS->??KJ<'K'3'y(GR[[1G~-VGAJGAJGAJGAJ	$ K !M3z?;;K#OS->??K#OS->??K(K->)?@@K(M3/@+ABBKL>)K#O,,K,,~- 677122KO,,K!JqM"JqM"JqM"JqM" K KW66K FI..K#,,55' 1CFC=0K1?FC=(KIv..K-..KG9$KHc%j11K}$&{3X}MMi ! V$'B7)%LMSUUV2 ! V$'B7)%LMSUUVs0   .9R '9R3 	R0R++R03	S<SSc                 j   t                d|vst        |d   t        t        f      rt	        di |\  }}}n	|d   \  }}}ddl}t        |t        |j                  f      rt        |t        j                        }t        | t        |j                  f      rt        | ||||      S t        | ||||      S )a  Convert one vector dataset

    Parameters
    ----------
    destNameOrDestDS:
        Output dataset name or object
    srcDS:
        a Dataset object or a filename
    kwargs:
        options: return of gdal.VectorTranslateOptions(), string or array of strings,
        other keywords arguments of gdal.VectorTranslateOptions().
        If options is provided as a gdal.VectorTranslateOptions() object,
        other keywords are ignored.
    rl   r   Nr%   )r   r   r   r   r  r   r   r   rH   r   #wrapper_GDALVectorTranslateDestName!wrapper_GDALVectorTranslateDestDSr  rY  r   r   rI  rJ  r   s          r   VectorTranslater    s      01*VI->s"L*@*J6*J'x*0*;'x%#r{{+,ui112"S"++$6723CUDRZ\ijj01A5$PXZghhr$   c                    | dk(  }|rg } n| g n| } t        | t              rt        |       }n| }||d|gz  }|Ct        |t              r%|j	                         D ]  \  }}|d| d| gz  } n|D ]	  }|d|gz  } |r|dgz  }|r|d|gz  }|dt        |      gz  }||dt        |      gz  }||d	t        |      gz  }|	|d
t        |	      gz  }|
|dt        |
      gz  }|r|dgz  }|r|dgz  }|r|dgz  }|dk(  r|dgz  }|r|dgz  }|r|dgz  }|)|dk(  r|dgz  }n|dk(  r|dgz  }n|dk(  rnt        d      |r|dgz  }|r|S t        |      |||fS )a	  Create a DEMProcessingOptions() object that can be passed to gdal.DEMProcessing()

    Parameters
    ----------
    options:
        can be be an array of strings, a string or let empty and filled from other keywords.
    colorFilename:
        (mandatory for "color-relief") name of file that contains palette definition for the "color-relief" processing.
    format:
        output format ("GTiff", etc...)
    creationOptions:
        list or dict of creation options
    computeEdges:
        whether to compute values at raster edges.
    alg:
        'Horn' (default) or 'ZevenbergenThorne' for hillshade, slope or aspect. 'Wilson' (default) or 'Riley' for TRI
    band:
        source band number to use
    zFactor:
        (hillshade only) vertical exaggeration used to pre-multiply the elevations.
    scale:
        ratio of vertical units to horizontal.
    azimuth:
        (hillshade only) azimuth of the light, in degrees. 0 if it comes from the top of the raster, 90 from the east, ... The default value, 315, should rarely be changed as it is the value generally used to generate shaded maps.
    altitude:
        (hillshade only) altitude of the light, in degrees. 90 if the light comes from above the DEM, 0 if it is raking light.
    combined:
        (hillshade only) whether to compute combined shading, a combination of slope and oblique shading. Only one of combined, multiDirectional and igor can be specified.
    multiDirectional:
        (hillshade only) whether to compute multi-directional shading. Only one of combined, multiDirectional and igor can be specified.
    igor:
        (hillshade only) whether to use Igor's hillshading from Maperitive.  Only one of combined, multiDirectional and igor can be specified.
    slopeFormat:
        (slope only) "degree" or "percent".
    trigonometric:
        (aspect only) whether to return trigonometric angle instead of azimuth. Thus 0deg means East, 90deg North, 180deg West, 270deg South.
    zeroForFlat:
        (aspect only) whether to return 0 for flat areas with slope=0, instead of -9999.
    addAlpha:
        adds an alpha band to the output file (only for processing = 'color-relief')
    colorSelection:
        (color-relief only) Determines how color entries are selected from an input value. Can be "nearest_color_entry", "exact_color_entry" or "linear_interpolation". Defaults to "linear_interpolation"
    callback:
        callback method
    callback_data:
        user data for callback
    r  r  r  r  z-compute_edges-algr  z-zz-sz-azz-altz	-combinedz-multidirectionalz-igorpercentz-pz-trigonometricz-zero_for_flatnearest_color_entryz-nearest_color_entryexact_color_entryz-exact_color_entrylinear_interpolationz$Unsupported value for colorSelectionz-alpha)r   r   r   r!  r"  r  GDALDEMProcessingOptions)rl   colorFilenamer@   r5  computeEdgesalgbandzFactorscaleazimuthaltitudecombinedmultiDirectionaligorslopeFormattrigonometriczeroForFlataddAlphacolorSelectionrI  rJ  rK  r   rM  rN  rO  s                             r   DEMProcessingOptionsr    s+   n !$<<"W'3&w/E6?*K&/40+113 7DAqEaS!:#66K7 + 0CE3</K0,--KFC=(Kc$i((D#g,//KD#e*--KE3w<00KFCM22KK=(K/00KG9$K)#D6!K,--K,--K%!66 677#66 455#99 !GHHH:%K$[1=(MZZr$   c           	      @   t                d|vst        |d   t        t        f      rt	        di |\  }}}}n
|d   \  }}}}ddl}t        |t        |j                  f      rt        |      }t        ||j                        rt        |      }t        | ||||||      S )a  Apply a DEM processing.

    Parameters
    ----------
    destName:
        Output dataset name
    srcDS:
        a Dataset object or a filename
    processing:
        one of "hillshade", "slope", "aspect", "color-relief", "TRI", "TPI", "Roughness"
    kwargs:
        options: return of gdal.DEMProcessingOptions(), string or array of strings,
        other keywords arguments of gdal.DEMProcessingOptions().
        If options is provided as a gdal.DEMProcessingOptions() object,
        other keywords are ignored.
    rl   r   Nr%   )	r   r   r   r   r  r   r   rR   DEMProcessingInternal)	rX  rY  
processingr   r   r  rI  rJ  r   s	            r   DEMProcessingr  L  s    $ 01*VI->s"L9M9WPV9W6}h9?	9J6}h%#r{{+,U--M* 5*mTS[]jkkr$   c                 
   | dk(  }|rg } n| g n| } t        | t              rt        |       }n| }||d|gz  }|Ct        |t              r%|j	                         D ]  \  }}|d| d| gz  } n|D ]	  }|d|gz  } |r|dgz  }|/|D ]*  }d}|D ]  }|dk7  r|dz  }|t        |      z  } |d|gz  }, ||d	t        |      gz  }||d
t        |      gz  }|r|dgz  }|r|dgz  }|	r|d|	gz  }|r|S t        |      |
|fS )a  Create a NearblackOptions() object that can be passed to gdal.Nearblack()

    Parameters
    ----------
    options:
        can be be an array of strings, a string or let empty and filled from other keywords.
    format:
        output format ("GTiff", etc...)
    creationOptions:
        list or dict of creation options
    white:
        whether to search for nearly white (255) pixels instead of nearly black pixels.
    colors:
        list of colors  to search for, e.g. ((0,0,0),(255,255,255)). The pixels that are considered as the collar are set to 0
    maxNonBlack:
        number of non-black (or other searched colors specified with white / colors) pixels that can be encountered before the giving up search inwards. Defaults to 2.
    nearDist:
        select how far from black, white or custom colors the pixel values can be and still considered near black, white or custom color.  Defaults to 15.
    setAlpha:
        adds an alpha band to the output file.
    setMask:
        adds a mask band to the output file.
    alg:
        "twopasses" (default), or "floodfill"
    callback:
        callback method
    callback_data:
        user data for callback
    r  r  r  r  z-whiter	   r  z-colorz-nbz-nearz	-setalphaz-setmaskr  )r   r   r   r!  r"  GDALNearblackOptions)rl   r@   r5  whitecolorsmaxNonBlacknearDistsetAlphasetMaskr  rI  rJ  rK  r   rM  rN  rO  color	color_strcpts                       r   NearblackOptionsr  p  s   F !$<<"W'3&w/E6?*K&/40+113 7DAqEaS!:#66K7 + 0CE3</K0H:%K 5	  *C B!S(	S)I* )445 "E3{#344KGS]33KK=(KJ<'KFC=(K -xGGr$   c                 L   t                d|vst        |d   t        t        f      rt	        di |\  }}}n	|d   \  }}}ddl}t        |t        |j                  f      rt        |      }t        | t        |j                  f      rt        | ||||      S t        | ||||      S )a  Convert nearly black/white borders to exact value.

    Parameters
    ----------
    destNameOrDestDS:
        Output dataset name or object
    srcDS:
        a Dataset object or a filename
    kwargs:
        options: return of gdal.NearblackOptions(), string or array of strings,
        other keywords arguments of gdal.NearblackOptions().
        If options is provided as a gdal.NearblackOptions() object, other keywords are ignored.
    rl   r   Nr%   )
r   r   r   r   r  r   r   r   wrapper_GDALNearblackDestNamewrapper_GDALNearblackDestDSr  s          r   	Nearblackr    s     01*VI->s"L*:*DV*D'x*0*;'x%#r{{+,u"S"++$67,-=udHVcdd*+;UD(Tabbr$   c           
         | dk(  }|rg } n| g n| } t        | t              rt        |       }n| }||d|gz  }|t        j                  k7  r|dt        |      gz  }|dk7  s|dk7  r|dt        |      t        |      gz  }|Ct        |t              r%|j                         D ]  \  }}|d| d| gz  } n|D ]	  }|d|gz  } |;|dt        |d         t        |d	         d
t        |d         t        |d         gz  }||dt        |      gz  }|	|d|	gz  }|
,t        |
t        t        f      r|
D ]	  }|d|gz  } n|d|
gz  }||dt        |      gz  }||dt        |      gz  }||d|gz  }||dt        |      gz  }||dt        |      gz  }|:|dt        |d         t        |d         t        |d	         t        |d         gz  }|r|S t        |      ||fS )a	   Create a GridOptions() object that can be passed to gdal.Grid()

    Parameters
    ----------
    options:
        can be be an array of strings, a string or let empty and filled from other keywords.
    format:
        output format ("GTiff", etc...)
    outputType:
        output type (gdalconst.GDT_Byte, etc...)
    width:
        width of the output raster in pixel
    height:
        height of the output raster in pixel
    creationOptions:
        list or dict of creation options
    outputBounds:
        assigned output bounds:
        [ulx, uly, lrx, lry]
    outputSRS:
        assigned output SRS
    noData:
        nodata value
    algorithm:
        e.g "invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0"
    layers:
        list of layers to convert
    SQLStatement:
        SQL statement to apply to the source dataset
    where:
        WHERE clause to apply to source layer(s)
    spatFilter:
        spatial filter as (minX, minY, maxX, maxY) bounding box
    zfield:
        Identifies an attribute field on the features to be used to get a Z value from.
        This value overrides Z value read from feature geometry record.
    z_increase:
        Addition to the attribute field on the features to be used to get a Z value from.
        The addition should be the same unit as Z value. The result value will be
        Z value + Z increase value. The default value is 0.
    z_multiply:
        Multiplication ratio for Z field. This can be used for shift from e.g. foot to meters
        or from  elevation to deep. The result value will be
        (Z value + Z increase value) * Z multiply value. The default value is 1.
    callback:
        callback method
    callback_data:
        user data for callback
    r  r  r  r   r  r  r  z-txerN   z-tyer   rO   r  -a-lr   r   r  z-z_increasez-z_multiplyr  )r   r   r   rH   r  r   r!  r"  r  tupler   GDALGridOptions)rl   r@   r,  r/  r0  r5  r=  r@  rC  	algorithmr   r   r   r  zfield
z_increase
z_multiplyrI  rJ  rK  r   rM  rN  rO  r   s                            r   GridOptionsr    s   D !$<<"W'3&w/E6?*K...E?:#>??KA:1JE
CK@@K&/40+113 7DAqEaS!:#66K7 + 0CE3</K0#FLa$A<P\]^P_C`bhjv  xD  EF  xG  kH  JV  Wc  de  Wf  Jg  h  hK Hc)n55K D),,K&5$-0# 1ED%=0K1 f~-#FC$566KHc%j11KIv..K!M3z?;;K!M3z?;;K!GSA%7Z]9KSQ[\]Q^M_adeopqerasttKK((MBBr$   c                    t                d|vst        |d   t        t        f      rt	        di |\  }}}n	|d   \  }}}ddl}t        |t        |j                  f      rt        |t        j                        }t        | ||||      S )a   Create raster from the scattered data.

    Parameters
    ----------
    destName:
        Output dataset name
    srcDS:
        a Dataset object or a filename
    kwargs:
        options: return of gdal.GridOptions(), string or array of strings,
        other keywords arguments of gdal.GridOptions()
        If options is provided as a gdal.GridOptions() object, other keywords are ignored.
    rl   r   Nr%   )r   r   r   r   r  r   r   r   rH   r   GridInternalrW  s          r   Gridr  Y  s     01*VI->s"L*5*?*?'x*0*;'x%#r{{+,ui112%xGGr$   c           	         | dk(  }|rg } n| g n| } t        | t              rt        |       }n| }||d|gz  }|t        j                  k7  r|dt        |      gz  }|Ct        |t              r%|j                         D ]  \  }}|d| d| gz  } n|D ]	  } |d| gz  } ||D ]  }!|dt        |!      gz  } ||dt        |      gz  }|>t        |t        t        f      r|D ]  }"|dt        |"      gz  } n|dt        |      gz  }|:|d	t        |d
         t        |d         t        |d         t        |d         gz  }||dt        |      gz  }|Ct        |t              r%|j                         D ]  \  }}|d| d| gz  } n|D ]	  } |d| gz  } |	|
|dt        |	      t        |
      gz  }|||dt        |      t        |      gz  }|r|dgz  }|r|dgz  }|r|dgz  }|K|t        d      t        |t        t        f      r|D ]  }"|dt        |"      gz  } n|dt        |      gz  }||d|gz  }|r|dgz  }|,t        |t        t        f      r|D ]	  }#|d|#gz  } n|d|gz  }||dt        |      gz  }||dt        |      gz  }||dt        |      gz  }||dt        |      gz  }|r|dgz  }|r|S t        |      ||fS )a
  Create a RasterizeOptions() object that can be passed to gdal.Rasterize()

    Parameters
    ----------
    options:
        can be be an array of strings, a string or let empty and filled from other keywords.
    format:
        output format ("GTiff", etc...)
    outputType:
        output type (gdalconst.GDT_Byte, etc...)
    creationOptions:
        list or dict of creation options
    outputBounds:
        assigned output bounds:
        [minx, miny, maxx, maxy]
    outputSRS:
        assigned output SRS
    transformerOptions:
        list or dict of transformer options
    width:
        width of the output raster in pixel
    height:
        height of the output raster in pixel
    xRes, yRes:
        output resolution in target SRS
    targetAlignedPixels:
        whether to force output bounds to be multiple of output resolution
    noData:
        nodata value
    initValues:
        Value or list of values to pre-initialize the output image bands with.
         However, it is not marked as the nodata value in the output file.
          If only one value is given, the same value is used in all the bands.
    bands:
        list of output bands to burn values into
    inverse:
        whether to invert rasterization, i.e. burn the fixed burn value, or the
        burn value associated with the first feature into all parts of the image
        not inside the provided a polygon.
    allTouched:
        whether to enable the ALL_TOUCHED rasterization option so that all pixels
        touched by lines or polygons will be updated, not just those on the line
        render path, or whose center point is within the polygon.
    burnValues:
        list of fixed values to burn into each band for all objects.
        Excusive with attribute.
    attribute:
        identifies an attribute field on the features to be used for a burn-in value.
        The value will be burned into all output bands. Excusive with burnValues.
    useZ:
        whether to indicate that a burn value should be extracted from the "Z" values
        of the feature. These values are added to the burn value given by burnValues
        or attribute if provided. As of now, only points and lines are drawn in 3D.
    layers:
        list of layers from the datasource that will be used for input features.
    SQLStatement:
        SQL statement to apply to the source dataset
    SQLDialect:
        SQL dialect ('OGRSQL', 'SQLITE', ...)
    where:
        WHERE clause to apply to source layer(s)
    optim:
        optimization mode ('RASTER', 'VECTOR')
    add:
        set to True to use additive mode instead of replace when burning values
    callback:
        callback method
    callback_data:
        user data for callback
    r  r  r  r  r  r  r  z-initr\  r   r   rN   rO   r  ri  r]  r  ra  z-iz-atz.burnValues and attribute option are exclusive.z-burnr  z-3dr  r   r   r   z-optimz-add)r   r   r   rH   r  r   r!  r"  r  r   r  r   GDALRasterizeOptions)$rl   r@   r,  r5  rC  
initValuesr=  r@  r  r/  r0  r3  r4  r|  bandsinverse
allTouched
burnValues	attributeuseZr   r   r   r   optimaddrI  rJ  rK  r   rM  rN  rO  rL  rR  r   s$                                       r   RasterizeOptionsr  v  s
   h !$<<"W'3&w/E6?*K...E?:#>??K&/40+113 7DAqEaS!:#66K7 + 0CE3</K0 .c!f~-.KV55K!*udm4% 7CGSX#66K7 Z99#E<Q#@,|\]B_amnz{|n}a~  AM  NZ  [\  N]  A^  _  _K Hc)n55K),d3.446 7DAqEaS!:#66K7 . 0CE3</K0!3E3u:s6{;;K 0E<#5|D7IJJKF8#KD6!KE7"K!$ PQQ*udm4% 7CGSX#66K7 Z99 D),,KE7"K&E4=2# 1ED%=0K1 f~-#FC$566K!JJ88KHc%j11KHc%j11KF8#K -xGGr$   c                 j   t                ddl}d|vst        |d   t        t        f      rt        di |\  }}}n	|d   \  }}}t        |t        |j                  f      rt        |t        j                        }t        | t        |j                  f      rt        | ||||      S t        | ||||      S )a  Burns vector geometries into a raster

    Parameters
    ----------
    destNameOrDestDS:
        Output dataset name or object
    srcDS:
        a Dataset object or a filename
    kwargs:
        options: return of gdal.RasterizeOptions(), string or array of strings,
        other keywords arguments of gdal.RasterizeOptions()
        If options is provided as a gdal.RasterizeOptions() object, other keywords are ignored.
    r   Nrl   r%   )r   r   r   r   r   r  r   r   rH   r   wrapper_GDALRasterizeDestNamewrapper_GDALRasterizeDestDS)r  rY  r   r   r   rI  rJ  s          r   	Rasterizer  "  s     01*VI->s"L*:*DV*D'x*0*;'x%#r{{+,ui112"S"++$67,-=udHVcdd*+;UD(Tabbr$   c                    | dk(  }|rg } n| g n| } t        | t              rt        |       }nN| }||d|gz  }||D ]  }|dt        |      gz  } |r|d|gz  }|r|d|gz  }|r|d|gz  }||dt        |      gz  }||dt        |      gz  }|r|d	gz  }|	r|d
gz  }|
|dt        |
      gz  }||dt        |      gz  }||dt        |      gz  }||dt        |      gz  }||d|gz  }|Ct        |t              r%|j	                         D ]  \  }}|d| d| gz  } n|D ]	  }|d|gz  } |Ct        |t              r%|j	                         D ]  \  }}|d| d| gz  } n|D ]	  }|d|gz  } |r|S t        |      ||fS )a  Create a FootprintOptions() object that can be passed to gdal.Footprint()

    Parameters
    ----------
    options:
        can be be an array of strings, a string or let empty and filled from other keywords.
    format:
        output format ("GeoJSON", etc...)
    bands:
        list of output bands to burn values into
    combineBands:
        how to combine bands: "union" (default) or "intersection"
    srcNodata:
        source nodata value(s).
    ovr:
        overview index.
    targetCoordinateSystem:
        "pixel" or "georef"
    dstSRS:
        output SRS
    datasetCreationOptions:
        list or dict of dataset creation options
    layerCreationOptions:
        list or dict of layer creation options
    splitPolys:
        whether to split multipolygons as several polygons
    convexHull:
        whether to compute the convex hull of polygons/multipolygons
    densify:
        tolerance value for polygon densification
    simplify:
        tolerance value for polygon simplification
    maxPoints:
        maximum number of points (100 by default, "unlimited" for unlimited)
    minRingArea:
        Minimum value for the area of a ring The unit of the area is in square pixels if targetCoordinateSystem equals "pixel", or otherwise in georeferenced units of the target vector dataset. This option is applied after the reprojection implied by dstSRS
    layerName:
        output layer name
    callback:
        callback method
    callback_data:
        user data for callback
    r  r  r  z-combine_bandsz-t_csr_  rh  r  z-split_polysz-convex_hullz-densifyr  z-max_pointsz-min_ring_areaz	-lyr_namer  r  r  )r   r   r   r!  r"  GDALFootprintOptions)rl   r@   r  combineBandsr  ovrtargetCoordinateSystemr~  
splitPolys
convexHulldensifysimplify	maxPointsminRingArear  r  r  rI  rJ  rK  r   rL  rM  rN  rO  s                            r   FootprintOptionsr+  B  sc   ~ !$<<"W'3&w/E6?*K .c!f~-.,l;;K!G%;<<KHf--K L#i.99K?FCH--KN++KN++KJG55KKX77K M3y>::K",c+.>??K K33K!-0$7288: 9DAqGs!A3Z#88K9 2 2CGS>1K2+.50668 8DAqFqc1#J#77K8 0 1CFC=0K1  -xGGr$   c                 R   t                | du xs | dk(  xr d|v xr |d   dk(  }|rd|vrddl}|j                  |      }d|d<   | du xs | dk(  xr d|v xr |d   dk(  }|rddl}|j                  |      }d|d<   d	|vst        |d	   t        t        f      rt        di |\  }}}n	|d	   \  }}}ddl}	t        |t        |	j                  f      rt        |t        j                        }|s|r]ddl}
d
t	        |
j                               z   }	 t        |||||      s	 t        |      rt        |       yy|ryt!        |d      }|sJ t#        |dd       t%        |      }t#        |dd       t'        d||      }t)        |       ddl}|j-                  |      t        |      rt        |       S S |sJ t        |      }|j/                  d      }g }|D ]/  }|j1                  |j3                         j5                                1 t7        |      dk(  r|d   t        |      rt        |       S S |t        |      rt        |       S S ddl}	t        | t        |	j                  f      rt        | ||||      S t9        | ||||      S # t        |      rt        |       w w xY w)a)  Compute the footprint of a raster

    Parameters
    ----------
    destNameOrDestDS:
        Output dataset name or object
    srcDS:
        a Dataset object or a filename
    kwargs:
        options: return of gdal.FootprintOptions(), string or array of strings,
        other keywords arguments of gdal.FootprintOptions()
        If options is provided as a gdal.FootprintOptions() object, other keywords are ignored.

    Examples
    --------

    1. Special mode to get deserialized GeoJSON (in EPSG:4326 if dstSRS not specified):

    >>> deserialized_geojson = gdal.FootPrint(None, src_ds, format="GeoJSON")

    2. Special mode to get WKT:

    >>> wkt = gdal.FootPrint(None, src_ds, format="WKT")

    3. Get result in a GeoPackage

    >>> gdal.FootPrintf("out.gpkg", src_ds, format="GPKG")

    Nr	   r@   GeoJSONr~  r   z	EPSG:4326WKTrl   z/vsimem/rbrN   r   r%   )r   r1   r   r   r   r+  r   r   r   rH   	OF_RASTERuuiduuid4wrapper_GDALFootprintDestNameVSIStatLUnlink	VSIFOpenL	VSIFSeekL	VSIFTellLr   
VSIFCloseLr   r   GetLayerr  GetGeometryRefExportToWktr#  wrapper_GDALFootprintDestDS)r  rY  r   inline_geojson_requestedr1   wkt_requestedr   rI  rJ  r   r1  temp_filenamefsizedatar   r   r  wktss                      r   	FootprintrE    s   > 01 0D 8 R<LPR<R  =F =%h/9< HF$:6"&x%-G1AR1G 9F9%h/58 6"$x*VI->s"L*:*DV*D'x*0*;'x%#r{{+,ui112="S%66	&0tXWde. &}% '- (mT2q!Q" |!Q" D!,1zz$' &}% ' %$}M*kk!n BAKK 0 0 2 > > @ABt9>7 &}% '  &}% ' "S"++$67,-=udHVcdd*+;UD(Tabb &}% 's    J ;A#J 6A(J 6J J&c           	         | dk(  }|rg } n| g n| } t        | t              rt        |       }n| }||dt        |      gz  }|:|dt        |d         t        |d         t        |d         t        |d         gz  }|||d	t        |      t        |      gz  }|r|d
gz  }|r|dgz  }|dk7  r|D ]  }|dt        |      gz  } |r|dgz  }|	'|	t        v r|dt        |	   gz  }n|dt        |	      gz  }|
|dt        |
      gz  }|r|dgz  }||dt        |      gz  }||dt        |      gz  }|r|dgz  }|r|dgz  }|r|S t        |      ||fS )a|  Create a BuildVRTOptions() object that can be passed to gdal.BuildVRT()

    Parameters
    ----------
    options:l
        can be be an array of strings, a string or let empty and filled from other keywords.
    resolution:
        'highest', 'lowest', 'average', 'user'.
    outputBounds:l
        output bounds as (minX, minY, maxX, maxY) in target SRS.
    xRes:
        output resolution in target SRS.
    yRes:
        output resolution in target SRS.
    targetAlignedPixels:
        whether to force output bounds to be multiple of output resolution.
    separate:
        whether each source file goes into a separate stacked band in the VRT band.
    bandList:
        array of band numbers (index start at 1).
    addAlpha:
        whether to add an alpha mask band to the VRT when the source raster have none.
    resampleAlg:
        resampling mode.
    outputSRS:
        assigned output SRS.
    allowProjectionDifference:
        whether to accept input datasets have not the same projection.
        Note: they will *not* be reprojected.
    srcNodata:
        source nodata value(s).
    VRTNodata:
        nodata values at the VRT band level.
    hideNodata:
        whether to make the VRT band not report the NoData value.
    strict:
        set to True if warnings should be failures
    callback:
        callback method.
    callback_data:
        user data for callback.
    r  Nz-resolutionr\  r   r   rN   rO   r  ra  z	-separater  z	-addalphar  r  z-allow_projection_differencerh  z
-vrtnodataz-hidenodatar  )r   r   r   r  r)  GDALBuildVRTOptions)rl   
resolutionr=  r3  r4  r|  separater-  r  rG  r@  allowProjectionDifferencer  	VRTNodata
hideNodatar9  rI  rJ  rK  r   rL  s                        r   BuildVRTOptionsrM  	  s   z !$<<"W'3&w/!M3z?;;K#E<Q#@,|\]B_amnz{|n}a~  AM  NZ  [\  N]  A^  _  _K 0E<#5|D7IJJKF8#KK=(Kt .c!f~-.K=(K"55&=k&JKKc+&677 Hc)n55K$:;;K L#i.99K L#i.99KM?*KI;&K,hFFr$   c                    t                d|vst        |d   t        t        f      rt	        di |\  }}}n	|d   \  }}}g }g }ddl}t        |t        |j                  f      rt        |      g}nqt        |t              r^|D ]J  }	t        |	t        |j                  f      r|j                  t        |	             :|j                  |	       L |r|rt        d      |g}|rt        | ||||      S t        | ||||      S )a  Build a VRT from a list of datasets.

    Parameters
    ----------
    destName:
        Output dataset name.
    srcDSOrSrcDSTab:
        An array of Dataset objects or filenames, or a Dataset object or a filename.
    kwargs:
        options: return of gdal.BuildVRTOptions(), string or array of strings,
        other keywords arguments of gdal.BuildVRTOptions().
        If options is provided as a gdal.BuildVRTOptions() object,
        other keywords are ignored.
    rl   r   Nz.Mix of names and dataset objects not supportedr%   )r   r   r   r   rM  r   r   r  r   BuildVRTInternalObjectsBuildVRTInternalNames)
rX  r  r   r   rI  rJ  r  srcDSNamesTabr   r  s
             r   BuildVRTrR  	  s     01*VI->s"L*9*CF*C'x*0*;'xHM/C#56_-.	OT	*" 	%C#R[[12$$SX.$		%
 LMM#$&x4=YY$X}dHm\\r$   c	                    | dk(  }	|	rg } n| g n| } t        | t              rt        |       }
n| }
||
d|gz  }
|Ct        |t              r%|j	                         D ]  \  }}|
d| d| gz  }
 n|D ]	  }|
d|gz  }
 ||D ]	  }|
d|gz  }
 ||D ]	  }|
d|gz  }
 ||D ]	  }|
d|gz  }
 ||D ]	  }|
d|gz  }
 |	r|
S t        |
      ||fS )	a  Create a MultiDimTranslateOptions() object that can be passed to gdal.MultiDimTranslate()

    Parameters
    ----------
    options:
        can be be an array of strings, a string or let empty and filled from other keywords.
    format:
        output format ("GTiff", etc...)
    creationOptions:
        list or dict of creation options
    arraySpecs:
        list of array specifications, each of them being an array name or
        "name={src_array_name},dstname={dst_name},transpose=[1,0],view=[:,::-1]"
    groupSpecs:
        list of group specifications, each of them being a group name or
        "name={src_array_name},dstname={dst_name},recursive=no"
    subsetSpecs:
        list of subset specifications, each of them being like
        "{dim_name}({min_val},{max_val})" or "{dim_name}({slice_va})"
    scaleAxesSpecs:
        list of dimension scaling specifications, each of them being like
        "{dim_name}({scale_factor})"
    callback:
        callback method
    callback_data:
        user data for callback
    r  r  r  r  r   z-groupz-subsetz
-scaleaxes)r   r   r   r!  r"  GDALMultiDimTranslateOptions)rl   r@   r5  
arraySpecs
groupSpecssubsetSpecsscaleAxesSpecsrI  rJ  rK  r   rM  rN  rO  ss                  r   MultiDimTranslateOptionsrZ  	  s_   @ !$<<"W'3&w/E6?*K&/40+113 7DAqEaS!:#66K7 + 0CE3</K0! -!},-! -!},-"  .	1~-.%# 1a001 (5xOOr$   c                    t                d|vst        |d   t        t        f      rt	        di |\  }}}n	|d   \  }}}ddl}t        |t        |j                  f      r t        |t        t        z  t        z        g}nlt        |t              rYg }|D ]Q  }t        |t              r.|j                  t        |t        t        z  t        z               A|j                  |       S n|g}t        | ||||      S )a  MultiDimTranslate one or several datasets.

    Parameters
    ----------
    destName:
        Output dataset name
    srcDSOrSrcDSTab:
        an array of Dataset objects or filenames, or a Dataset object or a filename
    kwargs:
        options: return of gdal.MultiDimTranslateOptions(), string or array of strings
        other keywords arguments of gdal.MultiDimTranslateOptions().
        If options is provided as a gdal.MultiDimTranslateOptions() object,
        other keywords are ignored.
    rl   r   Nr%   )r   r   r   r   rZ  r   r   r   r   r0  r   r  %wrapper_GDALMultiDimTranslateDestName)	rX  r  r   r   rI  rJ  r   r  r  s	            r   MultiDimTranslater]  	  s      01*VI->s"L*B*LV*L'x*0*;'x/C#56?,<y,HK],]^_	OT	*" 	%C#s#s,<y,HK],] ^_$		% $$08T8Ubccr$   c                    |t         j                  k7  r1t        j                  j	                  |t        |            }|d|}n|}t        j                  j	                  | d      }t        j                  j                  ||       y )Nz:    )	rH   	CPLE_None_pylog_handlererrcode_mapgetr   	level_maploggerlog)	err_levelerr_noerr_msgtypmessagelevels         r   ra  ra  '
  si    $$$((,,VS[A!7+$$((B7EeW-r$   c           
         ddl }|j                  |       t        _        t        j
                  j                         D ci c]  \  }}|j                  d      s||dd  c}}t        _        t        |j                  t        |j                  t        |j                  t        |j                   t"        |j$                  it        _        |rt)        dd       t+        t               yc c}}w )z2 Configure GDAL to use Python's logging framework r   NCPLE_   	CPL_DEBUGON)logging	getLoggerra  re  rH   r0   r"  
startswithrb  CE_NoneINFOCE_DebugDEBUG
CE_WarningWARN
CE_FailureERRORCE_FatalCRITICALrd  SetConfigOptionSetErrorHandler)logger_nameenable_debugrr  _name_nums        r   ConfigurePythonLoggingr  1
  s    #--k:N FOEWEWE]E]E_!}keTchcscst{c|$ab	/!}N 	'--GLLGMM'"" N T* N#! "~s    C(C(c                  |    t        | d   t              rt        j                  | i |S t        j                  | i |S )z6EscapeString(string_or_bytes, scheme = gdal.CPLES_SQL)r   )r   bytesr   EscapeBinarywrapper_EscapeStringrs   r   s     r   EscapeStringr  K
  s<    $q'5!!!42622))4:6::r$   c                  >    ddl m}  |dt               t        | i |S )zApplyVerticalShiftGrid(Dataset src_ds, Dataset grid_ds, bool inverse=False, double srcUnitToMeter=1.0, double dstUnitToMeter=1.0, char ** options=None) -> Datasetr   r=   z4ApplyVerticalShiftGrid() will be removed in GDAL 4.0)rA   r>   rB   _ApplyVerticalShiftGrid)rs   r   r>   s      r   ApplyVerticalShiftGridr  S
  s#     	?AST"D3F33r$   c              #      K   |rt         nt        }|rt        nt        }| D ci c]  }| ||       }}| D ]  } ||| |           	 d | D ]  } ||||           yc c}w # | D ]  } ||||           w xY ww)a/  Temporarily define a set of configuration options.

       Parameters
       ----------
       options: dict
            Dictionary of configuration options passed as key, value
       thread_local: bool
            Whether the configuration options should be only set on the current
            thread. The default is True.

       Returns
       -------
            A context manager

       Example
       -------

           with gdal.config_options({"GDAL_NUM_THREADS": "ALL_CPUS"}):
               gdal.Warp("out.tif", "in.tif", dstSRS="EPSG:4326")
    N)GetThreadLocalConfigOptionGetGlobalConfigOptionSetThreadLocalConfigOptionr  )rl   thread_localget_config_optionset_config_optionkeyoldvalss         r   config_optionsr  \
  s     , 7C2H]6B26=>ss%c**>G> -#ws|,-1 	1Cc73<0	1 ?  	1Cc73<0	1s'   !A>A!A>	A& A>&A;;A>c                      t        | |i|      S )aF  Temporarily define a configuration option.

       Parameters
       ----------
       key: str
            Name of the configuration option
       value: str
            Value of the configuration option
       thread_local: bool
            Whether the configuration option should be only set on the current
            thread. The default is True.

       Returns
       -------
            A context manager

       Example
       -------

           with gdal.config_option("GDAL_NUM_THREADS", "ALL_CPUS"):
               gdal.Warp("out.tif", "in.tif", dstSRS="EPSG:4326")
    )r  )r  )r  r!   r  s      r   config_optionr  
  s    . 3,\BBr$   c               #   ^   K   t        d       	 d t                y# t                w xY ww)aS  Temporarily install an error handler that silents all warnings and errors.

       Returns
       -------
            A context manager

       Example
       -------

           with gdal.ExceptionMgr(useExceptions=False), gdal.quiet_errors():
               gdal.Error(gdal.CE_Failure, gdal.CPLE_AppDefined, "you will never see me")
    CPLQuietErrorHandlerN)PushErrorHandlerPopErrorHandlerr%   r$   r   quiet_errorsr  
  s%      +,s   - -*-c                  &    t        j                  |  S )z3Debug(char const * msg_class, char const * message))r   Debugrr   s    r   r  r  
      ;;r$   c                  &    t        j                  |  S )z<SetErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr)r   r  rr   s    r   r  r  
        $''r$   c                  &    t        j                  |  S )z1SetCurrentErrorHandlerCatchDebug(int bCatchDebug))r    SetCurrentErrorHandlerCatchDebugrr   s    r   r  r  
  s    11488r$   c                  &    t        j                  |  S )z=PushErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr)r   r  rr   s    r   r  r  
  rt   r$   c                  &    t        j                  |  S )zPopErrorHandler())r   r  rr   s    r   r  r  
  r  r$   c                  &    t        j                  |  S )zLError(CPLErr msg_class=CE_Failure, int err_code=0, char const * msg="error"))r   Errorrr   s    r   r  r  
  r  r$   c                  &    t        j                  |  S )zGGOA2GetAuthorizationURL(char const * pszScope) -> retStringAndCPLFree *)r   GOA2GetAuthorizationURLrr   s    r   r  r  
      (($//r$   c                  &    t        j                  |  S )z^GOA2GetRefreshToken(char const * pszAuthToken, char const * pszScope) -> retStringAndCPLFree *)r   GOA2GetRefreshTokenrr   s    r   r  r  
  rw   r$   c                  &    t        j                  |  S )z`GOA2GetAccessToken(char const * pszRefreshToken, char const * pszScope) -> retStringAndCPLFree *)r   GOA2GetAccessTokenrr   s    r   r  r  
  r   r$   c                  &    t        j                  |  S )zErrorReset())r   
ErrorResetrr   s    r   r  r  
      T""r$   c                  ,    t        j                  | i |S )zLwrapper_EscapeString(int len, int scheme=CPLES_SQL) -> retStringAndCPLFree *)r   r  r  s     r   r  r  
  s    %%t6v66r$   c                  ,    t        j                  | i |S )z+EscapeBinary(int len, int scheme=CPLES_SQL))r   r  r  s     r   r  r  
  s    t.v..r$   c                  &    t        j                  |  S )zGetLastErrorNo() -> int)r   GetLastErrorNorr   s    r   r  r  
  r|   r$   c                  &    t        j                  |  S )zGetLastErrorType() -> int)r   GetLastErrorTyperr   s    r   r  r  
  rt   r$   c                  &    t        j                  |  S )z!GetLastErrorMsg() -> char const *)r   GetLastErrorMsgrr   s    r   r  r  
  r  r$   c                  &    t        j                  |  S )z!GetErrorCounter() -> unsigned int)r   GetErrorCounterrr   s    r   r  r  
  r  r$   c                  &    t        j                  |  S )zVSIGetLastErrorNo() -> int)r   VSIGetLastErrorNorr   s    r   r  r  
      ""D))r$   c                  &    t        j                  |  S )z$VSIGetLastErrorMsg() -> char const *)r   VSIGetLastErrorMsgrr   s    r   r  r  
  r   r$   c                  &    t        j                  |  S )zVSIErrorReset())r   VSIErrorResetrr   s    r   r  r  
      %%r$   c                  &    t        j                  |  S )z*PushFinderLocation(char const * utf8_path))r   PushFinderLocationrr   s    r   r  r  
  r   r$   c                  &    t        j                  |  S )zPopFinderLocation())r   PopFinderLocationrr   s    r   r  r  
  r  r$   c                  &    t        j                  |  S )zFinderClean())r   FinderCleanrr   s    r   r  r        d##r$   c                  &    t        j                  |  S )zGFindFile(char const * pszClass, char const * utf8_path) -> char const *)r   FindFilerr   s    r   r  r        >>4  r$   c                  &    t        j                  |  S )z;ReadDir(char const * utf8_path, int nMaxFiles=0) -> char **)r   ReadDirrr   s    r   r  r        ==$r$   c                  &    t        j                  |  S )z3ReadDirRecursive(char const * utf8_path) -> char **)r   ReadDirRecursiverr   s    r   r  r    rt   r$   c                  &    t        j                  |  S )zWOpenDir(char const * utf8_path, int nRecurseDepth=-1, char ** options=None) -> VSIDIR *)r   rf   rr   s    r   rf   rf     r  r$   c                      e Zd ZdZ ed d d      ZeZ eej                  d      Z
 eej                  d      Z eej                  d      Z eej                  d	      Z eej"                  d
      Z eej&                  d      Z eej*                  d      Z eej.                  d      Zd Zej4                  Zd Zy)DirEntryzProxy of C++ DirEntry class.c                 6    | j                   j                         S r.   r   r   r  s    r   <lambda>zDirEntry.<lambda>       r$   c                 8    | j                   j                  |      S r.   r  r  rN  s     r   r  zDirEntry.<lambda>      AFFJJqM r$   The membership flagdoczname : p.char
mode : intsize : GIntBigmtime : GIntBigzmodeKnown : boolzsizeKnown : boolzmtimeKnown : boolzextra : p.p.charc                 P    t        j                  | t        j                  |        y)z5__init__(DirEntry self, DirEntry entryIn) -> DirEntryN)r   DirEntry_swiginitnew_DirEntryr   rs   s     r   r   zDirEntry.__init__$  s    e&8&8$&?@r$   c                 .    t        j                  | g| S )z"IsDirectory(DirEntry self) -> bool)r   DirEntry_IsDirectoryr  s     r   IsDirectoryzDirEntry.IsDirectory)      ))$666r$   N)r   r   r7   r8   r   r   r   r   r   DirEntry_name_getr    DirEntry_mode_getr  DirEntry_size_getrB  DirEntry_mtime_getmtimeDirEntry_modeKnown_get	modeKnownDirEntry_sizeKnown_get	sizeKnownDirEntry_mtimeKnown_get
mtimeKnownDirEntry_extra_getextrar   delete_DirEntry__swig_destroy__r  r%   r$   r   r  r    s    '-/IOdeGHE++1EFDE++1BCDE++1FGDU--3IJE55;RSI55;RSI%77=UVJU--3JKEA ,,7r$   r  c                  &    t        j                  |  S )z)GetNextDirEntry(VSIDIR * dir) -> DirEntry)r   rh   rr   s    r   rh   rh   0  r  r$   c                  &    t        j                  |  S )zCloseDir(VSIDIR * dir))r   ri   rr   s    r   ri   ri   4  r  r$   c                  &    t        j                  |  S )z;SetConfigOption(char const * pszKey, char const * pszValue))r   r  rr   s    r   r  r  8  r  r$   c                  &    t        j                  |  S )zFSetThreadLocalConfigOption(char const * pszKey, char const * pszValue))r   r  rr   s    r   r  r  <  r   r$   c                  &    t        j                  |  S )zRGetConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *)r   GetConfigOptionrr   s    r   r  r  @  r  r$   c                  &    t        j                  |  S )zXGetGlobalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *)r   r  rr   s    r   r  r  D      &&--r$   c                  &    t        j                  |  S )z]GetThreadLocalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *)r   r  rr   s    r   r  r  H  r   r$   c                  &    t        j                  |  S )zGetConfigOptions() -> char **)r   GetConfigOptionsrr   s    r   r  r  L  rt   r$   c                  &    t        j                  |  S )z]SetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszValue))r   SetPathSpecificOptionrr   s    r   r	  r	  P  r  r$   c                  &    t        j                  |  S )zUSetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszValue))r   SetCredentialrr   s    r   r  r  T  r  r$   c                  &    t        j                  |  S )zlGetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *)r   GetCredentialrr   s    r   r  r  X  r  r$   c                  &    t        j                  |  S )ztGetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *)r   GetPathSpecificOptionrr   s    r   r  r  \  r  r$   c                  &    t        j                  |  S )z1ClearCredentials(char const * pszPathPrefix=None))r   ClearCredentialsrr   s    r   r  r  `  rt   r$   c                  &    t        j                  |  S )z9ClearPathSpecificOptions(char const * pszPathPrefix=None))r   ClearPathSpecificOptionsrr   s    r   r  r  d      ))400r$   c                  &    t        j                  |  S )z3CPLBinaryToHex(int nBytes) -> retStringAndCPLFree *)r   CPLBinaryToHexrr   s    r   r  r  h  r|   r$   c                  &    t        j                  |  S )z=CPLHexToBinary(char const * pszHex, int * pnBytes) -> GByte *)r   CPLHexToBinaryrr   s    r   r  r  l  r|   r$   c                  &    t        j                  |  S )zGFileFromMemBuffer(char const * utf8_path, GIntBig nBytes) -> VSI_RETVAL)r   FileFromMemBufferrr   s    r   r  r  p  r  r$   c                  &    t        j                  |  S )z,Unlink(char const * utf8_path) -> VSI_RETVAL)r   r5  rr   s    r   r5  r5  t      <<r$   c                  &    t        j                  |  S )z"UnlinkBatch(char ** files) -> bool)r   UnlinkBatchrr   s    r   r  r  x  r  r$   c                  &    t        j                  |  S )zHasThreadSupport() -> int)r   HasThreadSupportrr   s    r   r   r   |  rt   r$   c                  &    t        j                  |  S )z5Mkdir(char const * utf8_path, int mode) -> VSI_RETVAL)r   Mkdirrr   s    r   r"  r"    r  r$   c                  &    t        j                  |  S )z+Rmdir(char const * utf8_path) -> VSI_RETVAL)r   Rmdirrr   s    r   r$  r$    r  r$   c                  &    t        j                  |  S )z>MkdirRecursive(char const * utf8_path, int mode) -> VSI_RETVAL)r   MkdirRecursiverr   s    r   r&  r&    r|   r$   c                  &    t        j                  |  S )z4RmdirRecursive(char const * utf8_path) -> VSI_RETVAL)r   RmdirRecursiverr   s    r   r(  r(    r|   r$   c                  &    t        j                  |  S )z>Rename(char const * pszOld, char const * pszNew) -> VSI_RETVAL)r   Renamerr   s    r   r*  r*    r  r$   c                  ,    t        j                  | i |S )zSync(char const * pszSource, char const * pszTarget, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> bool)r   Syncr  s     r   r,  r,    s    ::t&v&&r$   c                  &    t        j                  |  S )z3AbortPendingUploads(char const * utf8_path) -> bool)r   AbortPendingUploadsrr   s    r   r.  r.    rw   r$   c                  ,    t        j                  | i |S )zCopyFile(char const * pszSource, char const * pszTarget, VSILFILE fpSource=None, GIntBig nSourceSize=-1, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   CopyFiler  s     r   r0  r0    s    >>4*6**r$   c                  &    t        j                  |  S )z4GetActualURL(char const * utf8_path) -> char const *)r   GetActualURLrr   s    r   r2  r2        t$$r$   c                  &    t        j                  |  S )zSGetSignedURL(char const * utf8_path, char ** options=None) -> retStringAndCPLFree *)r   GetSignedURLrr   s    r   r5  r5    r3  r$   c                  &    t        j                  |  S )z#GetFileSystemsPrefixes() -> char **)r   GetFileSystemsPrefixesrr   s    r   r7  r7        ''..r$   c                  &    t        j                  |  S )z<GetFileSystemOptions(char const * utf8_path) -> char const *)r   GetFileSystemOptionsrr   s    r   r:  r:        %%t,,r$   c                   4    e Zd ZdZ ed d d      Zd ZeZy)VSILFILEzProxy of C++ VSILFILE class.c                 6    | j                   j                         S r.   r  r  s    r   r  zVSILFILE.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zVSILFILE.<lambda>  r  r$   r  r  c                     t        d      NzNo constructor definedr   r   rs   r   s      r   r   zVSILFILE.__init__      566r$   N)	r   r   r7   r8   r   r   r   r   r   r%   r$   r   r=  r=    s     '-/IOdeG7Hr$   r=  c                       e Zd ZdZ ed d d      ZeZ eej                  d      Z
 eej                  d      Z eej                  d      Zd	 Zej                   Zd
 Zy)StatBufzProxy of C++ StatBuf class.c                 6    | j                   j                         S r.   r  r  s    r   r  zStatBuf.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zStatBuf.<lambda>  r  r$   r  r  r  r  r  c                 P    t        j                  | t        j                  |        y)z4__init__(StatBuf self, StatBuf psStatBuf) -> StatBufN)r   StatBuf_swiginitnew_StatBufr  s     r   r   zStatBuf.__init__  s    tU%6%6%=>r$   c                 .    t        j                  | g| S )z IsDirectory(StatBuf self) -> int)r   StatBuf_IsDirectoryr  s     r   r  zStatBuf.IsDirectory      ((555r$   N)r   r   r7   r8   r   r   r   r   r   StatBuf_mode_getr  StatBuf_size_getrB  StatBuf_mtime_getr  r   delete_StatBufr  r  r%   r$   r   rF  rF    sl    &-/IOdeGHE**0ABDE**0EFDU,,2HIE? ++6r$   rF  c                  &    t        j                  |  S )z5VSIStatL(char const * utf8_path, int nFlags=0) -> int)r   r4  rr   s    r   r4  r4    r  r$   c                  &    t        j                  |  S )z]GetFileMetadata(char const * utf8_path, char const * domain, char ** options=None) -> char **)r   GetFileMetadatarr   s    r   rU  rU    r  r$   c                  &    t        j                  |  S )zlSetFileMetadata(char const * utf8_path, char ** metadata, char const * domain, char ** options=None) -> bool)r   SetFileMetadatarr   s    r   rW  rW    r  r$   c                  &    t        j                  |  S )zCVSIFOpenL(char const * utf8_path, char const * pszMode) -> VSILFILE)r   r6  rr   s    r   r6  r6    r   r$   c                  &    t        j                  |  S )zpVSIFOpenExL(char const * utf8_path, char const * pszMode, int bSetError=FALSE, char ** options=None) -> VSILFILE)r   VSIFOpenExLrr   s    r   rZ  rZ    r  r$   c                  &    t        j                  |  S )zVSIFEofL(VSILFILE fp) -> int)r   VSIFEofLrr   s    r   r\  r\    r  r$   c                  &    t        j                  |  S )zVSIFFlushL(VSILFILE fp) -> int)r   
VSIFFlushLrr   s    r   r^  r^    r  r$   c                  &    t        j                  |  S )z%VSIFCloseL(VSILFILE fp) -> VSI_RETVAL)r   r9  rr   s    r   r9  r9    r  r$   c                  &    t        j                  |  S )z9VSIFSeekL(VSILFILE fp, GIntBig offset, int whence) -> int)r   r7  rr   s    r   r7  r7    r   r$   c                  &    t        j                  |  S )z!VSIFTellL(VSILFILE fp) -> GIntBig)r   r8  rr   s    r   r8  r8    r   r$   c                  &    t        j                  |  S )z1VSIFTruncateL(VSILFILE fp, GIntBig length) -> int)r   VSIFTruncateLrr   s    r   rc  rc    r  r$   c                  &    t        j                  |  S )z5VSISupportsSparseFiles(char const * utf8_path) -> int)r   VSISupportsSparseFilesrr   s    r   re  re    r8  r$   c                  &    t        j                  |  S )zGVSIFGetRangeStatusL(VSILFILE fp, GIntBig offset, GIntBig length) -> int)r   VSIFGetRangeStatusLrr   s    r   rg  rg    rw   r$   c                  &    t        j                  |  S )z<VSIFWriteL(int nLen, int size, int memb, VSILFILE fp) -> int)r   
VSIFWriteLrr   s    r   ri  ri    r  r$   c                  &    t        j                  |  S )zVSICurlClearCache())r   VSICurlClearCacherr   s    r   rk  rk    r  r$   c                  &    t        j                  |  S )z0VSICurlPartialClearCache(char const * utf8_path))r   VSICurlPartialClearCacherr   s    r   rm  rm    r  r$   c                  &    t        j                  |  S )zNetworkStatsReset())r   NetworkStatsResetrr   s    r   ro  ro    r  r$   c                  &    t        j                  |  S )zNNetworkStatsGetAsSerializedJSON(char ** options=None) -> retStringAndCPLFree *)r   NetworkStatsGetAsSerializedJSONrr   s    r   rq  rq  #  s    00$77r$   c                  &    t        j                  |  S )z3ParseCommandLine(char const * utf8_path) -> char **)r   r   rr   s    r   r   r   '  rt   r$   c                  &    t        j                  |  S )zGetNumCPUs() -> int)r   
GetNumCPUsrr   s    r   rt  rt  +  r  r$   c                  &    t        j                  |  S )z!GetUsablePhysicalRAM() -> GIntBig)r   GetUsablePhysicalRAMrr   s    r   rv  rv  /  r;  r$   c                   l    e Zd ZdZ ed d d      Zd ZeZd Z	d Z
d	 Zd
 Zd Zd Zd Zd ZddZy)MajorObjectz)Proxy of C++ GDALMajorObjectShadow class.c                 6    | j                   j                         S r.   r  r  s    r   r  zMajorObject.<lambda>5  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zMajorObject.<lambda>5  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zMajorObject.__init__7  rD  r$   c                 .    t        j                  | g| S )z0GetDescription(MajorObject self) -> char const *)r   MajorObject_GetDescriptionr  s     r   GetDescriptionzMajorObject.GetDescription;      //<t<<r$   c                 .    t        j                  | g| S )z9SetDescription(MajorObject self, char const * pszNewDesc))r   MajorObject_SetDescriptionr  s     r   SetDescriptionzMajorObject.SetDescription?  r  r$   c                 .    t        j                  | g| S )z2GetMetadataDomainList(MajorObject self) -> char **)r   !MajorObject_GetMetadataDomainListr  s     r   GetMetadataDomainListz!MajorObject.GetMetadataDomainListC      66tCdCCr$   c                 .    t        j                  | g| S )zHGetMetadata_Dict(MajorObject self, char const * pszDomain="") -> char **)r   MajorObject_GetMetadata_Dictr  s     r   GetMetadata_DictzMajorObject.GetMetadata_DictG      11$>>>r$   c                 .    t        j                  | g| S )zHGetMetadata_List(MajorObject self, char const * pszDomain="") -> char **)r   MajorObject_GetMetadata_Listr  s     r   GetMetadata_ListzMajorObject.GetMetadata_ListK  r  r$   c                 .    t        j                  | g| S )z
        SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain="") -> CPLErr
        SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain="") -> CPLErr
        )r   MajorObject_SetMetadatar  s     r   SetMetadatazMajorObject.SetMetadataO  s    
 ,,T9D99r$   c                 .    t        j                  | g| S )zbGetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain="") -> char const *)r   MajorObject_GetMetadataItemr  s     r   GetMetadataItemzMajorObject.GetMetadataItemV      00===r$   c                 .    t        j                  | g| S )zsSetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain="") -> CPLErr)r   MajorObject_SetMetadataItemr  s     r   SetMetadataItemzMajorObject.SetMetadataItemZ  r  r$   c                 Z    |r|d d dk(  r| j                  |      S | j                  |      S )N   zxml:)r  r  )r   domains     r   GetMetadatazMajorObject.GetMetadata^  s4    	F2AJ&($$V,,""6**r$   N)r	   )r   r   r7   r8   r   r   r   r   r   r~  r  r  r  r  r  r  r  r  r%   r$   r   rx  rx  2  sN    4-/IOdeG7H==D??:>>+r$   rx  c                       e Zd ZdZ ed d d      Zd ZeZ ee	j                  d      Z ee	j                  d      Z ee	j                  d	      Zd
 Zd Zd Zd Zd Zd Zd Zd Zy)Driverz$Proxy of C++ GDALDriverShadow class.c                 6    | j                   j                         S r.   r  r  s    r   r  zDriver.<lambda>i  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zDriver.<lambda>i  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zDriver.__init__k  rD  r$   zShortName : p.q(const).charzLongName : p.q(const).charzHelpTopic : p.q(const).charc                 H    t                t        j                  | g|i |S )zCreate(Driver self, char const * utf8_path, int xsize, int ysize, int bands=1, GDALDataType eType=GDT_Byte, char ** options=None) -> Dataset)r   r   Driver_CreaterC  s      r   rW   zDriver.Creater  s'     	45 ""49$9&99r$   c                 H    t                t        j                  | g|i |S )z}CreateMultiDimensional(Driver self, char const * utf8_path, char ** root_group_options=None, char ** options=None) -> Dataset)r   r   Driver_CreateMultiDimensionalrC  s      r   CreateMultiDimensionalzDriver.CreateMultiDimensional{  s'     	45 224I$I&IIr$   c                 H    t                t        j                  | g|i |S )zCreateCopy(Driver self, char const * utf8_path, Dataset src, int strict=1, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset)r   r   Driver_CreateCopyrC  s      r   
CreateCopyzDriver.CreateCopy  s'     	45 &&t=d=f==r$   c                 B    t                t        j                  | g| S )z5Delete(Driver self, char const * utf8_path) -> CPLErr)r   r   Driver_Deleter  s     r   DeletezDriver.Delete  s"     	45 ""4/$//r$   c                 .    t        j                  | g| S )zIRename(Driver self, char const * newName, char const * oldName) -> CPLErr)r   Driver_Renamer  s     r   r*  zDriver.Rename      ""4/$//r$   c                 .    t        j                  | g| S )zLCopyFiles(Driver self, char const * newName, char const * oldName) -> CPLErr)r   Driver_CopyFilesr  s     r   	CopyFileszDriver.CopyFiles      %%d2T22r$   c                 .    t        j                  | g| S )zRegister(Driver self) -> int)r   Driver_Registerr  s     r   RegisterzDriver.Register      $$T1D11r$   c                 .    t        j                  | g| S )zDeregister(Driver self))r   Driver_Deregisterr  s     r   
DeregisterzDriver.Deregister      &&t3d33r$   N)r   r   r7   r8   r   r   r   r   r   r   Driver_ShortName_get	ShortNameDriver_LongName_getLongNameDriver_HelpTopic_get	HelpTopicrW   r  r  r  r*  r  r  r  r%   r$   r   r  r  f  s    /-/IOdeG7H339[\I117XYH339[\I:J>00324r$   r  r   r   c                   ,   e Zd ZdZ ed d d      Zd ZeZ ee	j                  e	j                  d      Z ee	j                  e	j                  d      Z ee	j                   e	j"                  d	      Z ee	j&                  e	j(                  d
      Zy)
ColorEntryz"Proxy of C++ GDALColorEntry class.c                 6    | j                   j                         S r.   r  r  s    r   r  zColorEntry.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zColorEntry.<lambda>  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zColorEntry.__init__  rD  r$   z
c1 : shortz
c2 : shortz
c3 : shortz
c4 : shortN)r   r   r7   r8   r   r   r   r   r   r   ColorEntry_c1_getColorEntry_c1_setc1ColorEntry_c2_getColorEntry_c2_setc2ColorEntry_c3_getColorEntry_c3_setc3ColorEntry_c4_getColorEntry_c4_setc4r%   r$   r   r  r    s    --/IOdeG7H	%))5+B+BHY	ZB	%))5+B+BHY	ZB	%))5+B+BHY	ZB	%))5+B+BHY	ZBr$   r  c                      e Zd ZdZ ed d d      ZeZ eej                  ej                  d      Z eej                  ej                  d      Z eej                  ej                   d      Z eej$                  ej&                  d	      Z eej*                  ej,                  d
      Z eej0                  ej2                  d      Z eej6                  ej8                  d      Zd Zej>                  Z d Z!ddZ"y)GCPzProxy of C++ GDAL_GCP class.c                 6    | j                   j                         S r.   r  r  s    r   r  zGCP.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zGCP.<lambda>  r  r$   r  r  zGCPX : doublezGCPY : doublezGCPZ : doublezGCPPixel : doublezGCPLine : doublezInfo : p.charzId : p.charc                 P    t        j                  | t        j                  |        y)z__init__(GCP self, double x=0.0, double y=0.0, double z=0.0, double pixel=0.0, double line=0.0, char const * info="", char const * id="") -> GCPN)r   GCP_swiginitnew_GCPr  s     r   r   zGCP.__init__  s    4!56r$   c                     d| j                   | j                  | j                  | j                  | j                  | j
                  | j                  fz  }|S )Nz*%s (%.2fP,%.2fL) -> (%.7fE,%.7fN,%.2f) %s )Idr$  r%  r&  r'  r(  r   )r   r   s     r   __str__zGCP.__str__  sD    8wwt||yy$))TYY		<<c jr$   c                 0   t         j                  dg}|j                  t         j                  dt         j                  | j
                  gg       d| j                  z  }d| j                  z  }d| j                  z  }d| j                  z  }d| j                  z  }|j                  t         j                  dt         j                  |gg       |j                  t         j                  dt         j                  |gg       |j                  t         j                  dt         j                  |gg       |j                  t         j                  dt         j                  |gg       |r2|j                  t         j                  dt         j                  |gg       |S )	Nr  r  z%0.15EPixelLineXYZ)rH   CXT_Elementr  CXT_AttributeCXT_Textr  r$  r%  r&  r'  r(  )r   with_Zbasepixvallinevalxvalyvalzvals           r   	serializezGCP.serialize  s<   ##U+d
kk9**D93E3Etww2OPQ$--'f4<<'g		!d		!d		!d
kk9**Gi6H6H&5QRS
kk9**FY5G5G4QRS
kk9**C)2D2Dd1KLM
kk9**C)2D2Dd1KLM	
++y..i6H6H$5OP
Qkr$   Nr   )#r   r   r7   r8   r   r   r   r   r   GCP_GCPX_getGCP_GCPX_setr&  GCP_GCPY_getGCP_GCPY_setr'  GCP_GCPZ_getGCP_GCPZ_setr(  GCP_GCPPixel_getGCP_GCPPixel_setr$  GCP_GCPLine_getGCP_GCPLine_setr%  GCP_Info_getGCP_Info_setr   
GCP_Id_get
GCP_Id_setr  r   
delete_GCPr  r  r  r%   r$   r   r  r    s    '-/IOdeGHE&&(:(:@TUDE&&(:(:@TUDE&&(:(:@TUD..0F0FLdeHu,,e.C.CI`aGE&&(:(:@TUD	%""E$4$4:L	MB7 ''r$   r  c                  &    t        j                  |  S )z$GDAL_GCP_GCPX_get(GCP gcp) -> double)r   GDAL_GCP_GCPX_getrr   s    r   r  r    r  r$   c                  &    t        j                  |  S )z)GDAL_GCP_GCPX_set(GCP gcp, double dfGCPX))r   GDAL_GCP_GCPX_setrr   s    r   r   r     r  r$   c                  &    t        j                  |  S )z$GDAL_GCP_GCPY_get(GCP gcp) -> double)r   GDAL_GCP_GCPY_getrr   s    r   r  r    r  r$   c                  &    t        j                  |  S )z)GDAL_GCP_GCPY_set(GCP gcp, double dfGCPY))r   GDAL_GCP_GCPY_setrr   s    r   r  r    r  r$   c                  &    t        j                  |  S )z$GDAL_GCP_GCPZ_get(GCP gcp) -> double)r   GDAL_GCP_GCPZ_getrr   s    r   r  r    r  r$   c                  &    t        j                  |  S )z)GDAL_GCP_GCPZ_set(GCP gcp, double dfGCPZ))r   GDAL_GCP_GCPZ_setrr   s    r   r  r    r  r$   c                  &    t        j                  |  S )z(GDAL_GCP_GCPPixel_get(GCP gcp) -> double)r   GDAL_GCP_GCPPixel_getrr   s    r   r
  r
    r  r$   c                  &    t        j                  |  S )z1GDAL_GCP_GCPPixel_set(GCP gcp, double dfGCPPixel))r   GDAL_GCP_GCPPixel_setrr   s    r   r  r    r  r$   c                  &    t        j                  |  S )z'GDAL_GCP_GCPLine_get(GCP gcp) -> double)r   GDAL_GCP_GCPLine_getrr   s    r   r  r    r;  r$   c                  &    t        j                  |  S )z/GDAL_GCP_GCPLine_set(GCP gcp, double dfGCPLine))r   GDAL_GCP_GCPLine_setrr   s    r   r  r  
  r;  r$   c                  &    t        j                  |  S )z*GDAL_GCP_Info_get(GCP gcp) -> char const *)r   GDAL_GCP_Info_getrr   s    r   r  r    r  r$   c                  &    t        j                  |  S )z0GDAL_GCP_Info_set(GCP gcp, char const * pszInfo))r   GDAL_GCP_Info_setrr   s    r   r  r    r  r$   c                  &    t        j                  |  S )z(GDAL_GCP_Id_get(GCP gcp) -> char const *)r   GDAL_GCP_Id_getrr   s    r   r  r    r  r$   c                  &    t        j                  |  S )z,GDAL_GCP_Id_set(GCP gcp, char const * pszId))r   GDAL_GCP_Id_setrr   s    r   r  r    r  r$   c                  &    t        j                  |  S )z=GCPsToGeoTransform(int nGCPs, int bApproxOK=1) -> RETURN_NONE)r   GCPsToGeoTransformrr   s    r   r  r    r   r$   c                   X    e Zd ZdZ ed d d      Zd ZeZe	j                  Zd Zd Zy	)

VirtualMemz'Proxy of C++ CPLVirtualMemShadow class.c                 6    | j                   j                         S r.   r  r  s    r   r  zVirtualMem.<lambda>$  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zVirtualMem.<lambda>$  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zVirtualMem.__init__&  rD  r$   c                 .    t        j                  | g| S )zGetAddr(VirtualMem self))r   VirtualMem_GetAddrr  s     r   GetAddrzVirtualMem.GetAddr+      ''4t44r$   c                 .    t        j                  | g| S )zKPin(VirtualMem self, size_t start_offset=0, size_t nsize=0, int bWriteOp=0))r   VirtualMem_Pinr  s     r   PinzVirtualMem.Pin/      ##D0400r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_VirtualMemr  r"  r&  r%   r$   r   r  r  !  s6    2-/IOdeG7H..51r$   r  c                   d    e Zd ZdZ ed d d      Zd ZeZe	j                  Zd Zd Zd	 Zd
 Zy)AsyncReaderz)Proxy of C++ GDALAsyncReaderShadow class.c                 6    | j                   j                         S r.   r  r  s    r   r  zAsyncReader.<lambda>8  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zAsyncReader.<lambda>8  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zAsyncReader.__init__:  rD  r$   c                 .    t        j                  | g| S )zMGetNextUpdatedRegion(AsyncReader self, double timeout) -> GDALAsyncStatusType)r    AsyncReader_GetNextUpdatedRegionr  s     r   GetNextUpdatedRegionz AsyncReader.GetNextUpdatedRegion?      55dBTBBr$   c                 .    t        j                  | g| S )zGetBuffer(AsyncReader self))r   AsyncReader_GetBufferr  s     r   	GetBufferzAsyncReader.GetBufferC      **47$77r$   c                 .    t        j                  | g| S )z3LockBuffer(AsyncReader self, double timeout) -> int)r   AsyncReader_LockBufferr  s     r   
LockBufferzAsyncReader.LockBufferG      ++D8488r$   c                 .    t        j                  | g| S )zUnlockBuffer(AsyncReader self))r   AsyncReader_UnlockBufferr  s     r   UnlockBufferzAsyncReader.UnlockBufferK      --d:T::r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_AsyncReaderr  r0  r4  r8  r<  r%   r$   r   r*  r*  5  sA    4-/IOdeG7H//C89;r$   r*  c                      e Zd ZdZ ed d d      Zd ZeZ ee	j                  d      Z ee	j                  d      Z ee	j                  d	      Ze	j                   Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d Z"d Z#d Z$d Z%d Z&d Z'd  Z(d! Z)d" Z*d# Z+d$ Z,d% Z-d& Z.d' Z/d( Z0d) Z1d* Z2d+ Z3d, Z4d- Z5d. Z6d/ Z7dZd1Z8d2 Z9d3 Z:d4 Z;d5 Z<d6 Z=d7 Z>d8 Z?d9 Z@d: ZAd; ZBd< ZCd= ZDd> ZEd? ZFd@ ZGdA ZHdB ZIdC ZJdD ZKdEdEd0d0d0d0d0d0eLj                  d0d0dFd0fdGZNdEdEd0dFeLj                  d0d0fdHZO	 	 	 d[dIZ(dEdEd0d0d0d0d0d0d0d0d0eLj                  d0d0d0fdJZPeLj                  dEdEd0d0d0d0d0d0dKdLdEd0fdMZReLj                  dEdEd0d0dNdNd0d0eLj                  dLd0fdOZTdP ZUd\dQZ*d]dRZVdS Z0dT ZWdU ZXdV ZYdW ZZdX Z[dY Z\y0)^Datasetz

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

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

    c                 6    | j                   j                         S r.   r  r  s    r   r  zDataset.<lambda>\  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zDataset.<lambda>\  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zDataset.__init__^  rD  r$   zRasterXSize : intzRasterYSize : intzRasterCount : intc                 n    t        j                  | g| }d| _        d| _        | j	                          |S )ac  
        Close(Dataset 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   Dataset_Closer   r   _invalidate_bandsr   rs   rR  s      r   ClosezDataset.Closef  s8     !!$..	 
r$   c                 .    t        j                  | g| S )z!GetDriver(Dataset self) -> Driver)r   Dataset_GetDriverr  s     r   	GetDriverzDataset.GetDriver}  r  r$   c                 T    t        j                  | g| }| j                  |       |S )z.GetRasterBand(Dataset self, int nBand) -> Band)r   Dataset_GetRasterBand_add_band_refrG  s      r   rU   zDataset.GetRasterBand  s,    ))$663 
r$   c                 .    t        j                  | g| S )z#GetRootGroup(Dataset self) -> Group)r   Dataset_GetRootGroupr  s     r   GetRootGroupzDataset.GetRootGroup  r  r$   c                 .    t        j                  | g| S )z+GetProjection(Dataset self) -> char const *)r   Dataset_GetProjectionr  s     r   GetProjectionzDataset.GetProjection  r5  r$   c                 .    t        j                  | g| S )z.GetProjectionRef(Dataset self) -> char const *)r   Dataset_GetProjectionRefr  s     r   GetProjectionRefzDataset.GetProjectionRef  r=  r$   c                 .    t        j                  | g| S )z/GetSpatialRef(Dataset self) -> SpatialReference)r   Dataset_GetSpatialRefr  s     r   GetSpatialRefzDataset.GetSpatialRef  r5  r$   c                 .    t        j                  | g| S )z7SetProjection(Dataset self, char const * prj) -> CPLErr)r   Dataset_SetProjectionr  s     r   SetProjectionzDataset.SetProjection  r5  r$   c                 .    t        j                  | g| S )z;SetSpatialRef(Dataset self, SpatialReference srs) -> CPLErr)r   Dataset_SetSpatialRefr  s     r   SetSpatialRefzDataset.SetSpatialRef  r5  r$   c                 4    t        j                  | g|i |S )z9GetGeoTransform(Dataset self, int * can_return_null=None))r   Dataset_GetGeoTransformrC  s      r   GetGeoTransformzDataset.GetGeoTransform      ,,TCDCFCCr$   c                 .    t        j                  | g| S )z9SetGeoTransform(Dataset self, double [6] argin) -> CPLErr)r   Dataset_SetGeoTransformr  s     r   SetGeoTransformzDataset.SetGeoTransform      ,,T9D99r$   c                 4    t        j                  | g|i |S )zBuildOverviews(Dataset self, char const * resampling="NEAREST", int overviewlist=0, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> int)r   Dataset_BuildOverviewsrC  s      r   BuildOverviewszDataset.BuildOverviews      ++DB4B6BBr$   c                 .    t        j                  | g| S )z GetGCPCount(Dataset self) -> int)r   Dataset_GetGCPCountr  s     r   GetGCPCountzDataset.GetGCPCount  rN  r$   c                 .    t        j                  | g| S )z.GetGCPProjection(Dataset self) -> char const *)r   Dataset_GetGCPProjectionr  s     r   GetGCPProjectionzDataset.GetGCPProjection  r=  r$   c                 .    t        j                  | g| S )z2GetGCPSpatialRef(Dataset self) -> SpatialReference)r   Dataset_GetGCPSpatialRefr  s     r   GetGCPSpatialRefzDataset.GetGCPSpatialRef  r=  r$   c                 .    t        j                  | g| S )zGetGCPs(Dataset self))r   Dataset_GetGCPsr  s     r   GetGCPszDataset.GetGCPs  r  r$   c                 .    t        j                  | g| S )zJ_SetGCPs(Dataset self, int nGCPs, char const * pszGCPProjection) -> CPLErr)r   Dataset__SetGCPsr  s     r   _SetGCPszDataset._SetGCPs  r  r$   c                 .    t        j                  | g| S )zC_SetGCPs2(Dataset self, int nGCPs, SpatialReference hSRS) -> CPLErr)r   Dataset__SetGCPs2r  s     r   	_SetGCPs2zDataset._SetGCPs2  r  r$   c                 .    t        j                  | g| S )z"FlushCache(Dataset self) -> CPLErr)r   Dataset_FlushCacher  s     r   
FlushCachezDataset.FlushCache  r#  r$   c                 4    t        j                  | g|i |S )zUAddBand(Dataset self, GDALDataType datatype=GDT_Byte, char ** options=None) -> CPLErr)r   Dataset_AddBandrC  s      r   AddBandzDataset.AddBand  s    $$T;D;F;;r$   c                 .    t        j                  | g| S )z2CreateMaskBand(Dataset self, int nFlags) -> CPLErr)r   Dataset_CreateMaskBandr  s     r   CreateMaskBandzDataset.CreateMaskBand  r9  r$   c                 .    t        j                  | g| S )z$GetFileList(Dataset self) -> char **)r   Dataset_GetFileListr  s     r   GetFileListzDataset.GetFileList  rN  r$   c                 4    t        j                  | g|i |S )a  WriteRaster(Dataset self, int xoff, int yoff, int xsize, int ysize, GIntBig buf_len, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, int band_list=0, GIntBig * buf_pixel_space=None, GIntBig * buf_line_space=None, GIntBig * buf_band_space=None) -> CPLErr)r   Dataset_WriteRasterrC  s      r   WriteRasterzDataset.WriteRaster      ((????r$   c                 .    t        j                  | g| S )zAdviseRead(Dataset self, int xoff, int yoff, int xsize, int ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, int band_list=0, char ** options=None) -> CPLErr)r   Dataset_AdviseReadr  s     r   
AdviseReadzDataset.AdviseRead  r#  r$   c                 4    t        j                  | g|i |S )a
  BeginAsyncReader(Dataset self, int xOff, int yOff, int xSize, int ySize, size_t buf_len, int buf_xsize, int buf_ysize, GDALDataType bufType=(GDALDataType) 0, int band_list=0, int nPixelSpace=0, int nLineSpace=0, int nBandSpace=0, char ** options=None) -> AsyncReader)r   Dataset_BeginAsyncReaderrC  s      r   BeginAsyncReaderzDataset.BeginAsyncReader      --dDTDVDDr$   c                 .    t        j                  | g| S )z.EndAsyncReader(Dataset self, AsyncReader ario))r   Dataset_EndAsyncReaderr  s     r   EndAsyncReaderzDataset.EndAsyncReader  r9  r$   c                 4    t        j                  | g|i |S )a  GetVirtualMem(Dataset self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eBufType, int band_list, int bIsBandSequential, size_t nCacheSize, size_t nPageSizeHint, char ** options=None) -> VirtualMem)r   Dataset_GetVirtualMemrC  s      r   GetVirtualMemzDataset.GetVirtualMem      **4A$A&AAr$   c                 4    t        j                  | g|i |S )a  GetTiledVirtualMem(Dataset self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nTileXSize, int nTileYSize, GDALDataType eBufType, int band_list, GDALTileOrganization eTileOrganization, size_t nCacheSize, char ** options=None) -> VirtualMem)r   Dataset_GetTiledVirtualMemrC  s      r   GetTiledVirtualMemzDataset.GetTiledVirtualMem  s    //FtFvFFr$   c                 4    t        j                  | g|i |S )zCreateLayer(Dataset self, char const * name, SpatialReference srs=None, OGRwkbGeometryType geom_type=wkbUnknown, char ** options=None) -> Layer)r   Dataset_CreateLayerrC  s      r   CreateLayerzDataset.CreateLayer  r  r$   c                 4    t        j                  | g|i |S )z^CopyLayer(Dataset self, Layer src_layer, char const * new_name, char ** options=None) -> Layer)r   Dataset_CopyLayerrC  s      r   	CopyLayerzDataset.CopyLayer      &&t=d=f==r$   c                 .    t        j                  | g| S )z.DeleteLayer(Dataset self, int index) -> OGRErr)r   Dataset_DeleteLayerr  s     r   DeleteLayerzDataset.DeleteLayer  rN  r$   c                 .    t        j                  | g| S )z"GetLayerCount(Dataset self) -> int)r   Dataset_GetLayerCountr  s     r   GetLayerCountzDataset.GetLayerCount  r5  r$   c                 .    t        j                  | g| S )z/IsLayerPrivate(Dataset self, int index) -> bool)r   Dataset_IsLayerPrivater  s     r   IsLayerPrivatezDataset.IsLayerPrivate  r9  r$   c                 .    t        j                  | g| S )z3GetLayerByIndex(Dataset self, int index=0) -> Layer)r   Dataset_GetLayerByIndexr  s     r   GetLayerByIndexzDataset.GetLayerByIndex  rh  r$   c                 B    t                t        j                  | g| S )z>GetLayerByName(Dataset self, char const * layer_name) -> Layer)r   r   Dataset_GetLayerByNamer  s     r   GetLayerByNamezDataset.GetLayerByName  s"     	78 ++D8488r$   c                 .    t        j                  | g| S )zResetReading(Dataset self))r   Dataset_ResetReadingr  s     r   ResetReadingzDataset.ResetReading  r  r$   c                 4    t        j                  | g|i |S )zGetNextFeature(Dataset self, bool include_layer=True, bool include_pct=False, GDALProgressFunc callback=0, void * callback_data=None) -> Feature)r   Dataset_GetNextFeaturerC  s      r   GetNextFeaturezDataset.GetNextFeature  rl  r$   c                 .    t        j                  | g| S )z6TestCapability(Dataset self, char const * cap) -> bool)r   Dataset_TestCapabilityr  s     r   TestCapabilityzDataset.TestCapability  r9  r$   Nc                     t        j                  | |||      }|r*ddl}d|_        |j	                  |       |_        |r| |_        |S )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   Dataset_ExecuteSQLweakref_to_releaseref_dataset_weak_ref_dataset_strong_ref)r   	statementspatialFilterdialectkeep_ref_on_dssql_lyrr  s          r   
ExecuteSQLzDataset.ExecuteSQL  sJ    | **4M7S"&G(/D(9G%.2+r$   c                     |rt        |d      st        d      t        j                  | |       |rd|_        d|_        yy)a1  ReleaseResultSet(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()
        r  z^This layer was not returned by ExecuteSQL() and should not be released with ReleaseResultSet()N)r   r   r   Dataset_ReleaseResultSetr   r   )r   r  s     r   ReleaseResultSetzDataset.ReleaseResultSete  sB     77M:|}}&&tW5"GOGL r$   c                 .    t        j                  | g| S )z)GetStyleTable(Dataset self) -> StyleTable)r   Dataset_GetStyleTabler  s     r   GetStyleTablezDataset.GetStyleTable|  r5  r$   c                 .    t        j                  | g| S )z-SetStyleTable(Dataset self, StyleTable table))r   Dataset_SetStyleTabler  s     r   SetStyleTablezDataset.SetStyleTable  r5  r$   c                 .    t        j                  | g| S )z AbortSQL(Dataset self) -> OGRErr)r   Dataset_AbortSQLr  s     r   AbortSQLzDataset.AbortSQL  r  r$   c                 4    t        j                  | g|i |S )z9StartTransaction(Dataset self, int force=FALSE) -> OGRErr)r   Dataset_StartTransactionrC  s      r   StartTransactionzDataset.StartTransaction  r  r$   c                 .    t        j                  | g| S )z)CommitTransaction(Dataset self) -> OGRErr)r   Dataset_CommitTransactionr  s     r   CommitTransactionzDataset.CommitTransaction      ..t;d;;r$   c                 .    t        j                  | g| S )z+RollbackTransaction(Dataset self) -> OGRErr)r   Dataset_RollbackTransactionr  s     r   RollbackTransactionzDataset.RollbackTransaction  r  r$   c                 .    t        j                  | g| S )zClearStatistics(Dataset self))r   Dataset_ClearStatisticsr  s     r   ClearStatisticszDataset.ClearStatistics  rh  r$   c                 .    t        j                  | g| S )zBGetFieldDomainNames(Dataset self, char ** options=None) -> char **)r   Dataset_GetFieldDomainNamesr  s     r   GetFieldDomainNameszDataset.GetFieldDomainNames  r  r$   c                 .    t        j                  | g| S )z>GetFieldDomain(Dataset self, char const * name) -> FieldDomain)r   Dataset_GetFieldDomainr  s     r   GetFieldDomainzDataset.GetFieldDomain  r9  r$   c                 .    t        j                  | g| S )z=AddFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool)r   Dataset_AddFieldDomainr  s     r   AddFieldDomainzDataset.AddFieldDomain  r9  r$   c                 .    t        j                  | g| S )z:DeleteFieldDomain(Dataset self, char const * name) -> bool)r   Dataset_DeleteFieldDomainr  s     r   DeleteFieldDomainzDataset.DeleteFieldDomain  r  r$   c                 .    t        j                  | g| S )z@UpdateFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool)r   Dataset_UpdateFieldDomainr  s     r   UpdateFieldDomainzDataset.UpdateFieldDomain  r  r$   c                 .    t        j                  | g| S )zCGetRelationshipNames(Dataset self, char ** options=None) -> char **)r   Dataset_GetRelationshipNamesr  s     r   GetRelationshipNameszDataset.GetRelationshipNames  r  r$   c                 .    t        j                  | g| S )z@GetRelationship(Dataset self, char const * name) -> Relationship)r   Dataset_GetRelationshipr  s     r   GetRelationshipzDataset.GetRelationship  rh  r$   c                 .    t        j                  | g| S )z@AddRelationship(Dataset self, Relationship relationship) -> bool)r   Dataset_AddRelationshipr  s     r   AddRelationshipzDataset.AddRelationship  rh  r$   c                 .    t        j                  | g| S )z;DeleteRelationship(Dataset self, char const * name) -> bool)r   Dataset_DeleteRelationshipr  s     r   DeleteRelationshipzDataset.DeleteRelationship  r  r$   c                 .    t        j                  | g| S )zCUpdateRelationship(Dataset self, Relationship relationship) -> bool)r   Dataset_UpdateRelationshipr  s     r   UpdateRelationshipzDataset.UpdateRelationship  r  r$   c                 4    t        j                  | g|i |S )a  ReadRaster1(Dataset self, double xoff, double yoff, double xsize, double ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, int band_list=0, GIntBig * buf_pixel_space=None, GIntBig * buf_line_space=None, GIntBig * buf_band_space=None, GDALRIOResampleAlg resample_alg=GRIORA_NearestNeighbour, GDALProgressFunc callback=0, void * callback_data=None, void * inputOutputBuf=None) -> CPLErr)r   Dataset_ReadRaster1rC  s      r   ReadRaster1zDataset.ReadRaster1  r  r$   r   r  c                 L    ddl m} |j                  | |||||||||	|
|||      S ) Reading a chunk of a GDAL band into a numpy array. The optional (buf_xsize,buf_ysize,buf_type)
        parameters should generally not be specified if buf_obj is specified. The array is returnedr   r   )resample_algrI  rJ  
interleave	band_list)osgeor   DatasetReadAsArray)r   xoffyoffxsizeysizebuf_obj	buf_xsize	buf_ysizebuf_typer  rI  rJ  r	  r
  r   s                  r   ReadAsArrayzDataset.ReadAsArray  sC     	%,,T4ueW.7H;G7?<I9C8A - C 	Cr$   c	                 B    ddl m}	 |	j                  | ||||||||	      S )Nr   r   )r
  r	  r  rI  rJ  )r  r   DatasetWriteArray)
r   r   r  r  r
  r	  r  rI  rJ  r   s
             r   
WriteArrayzDataset.WriteArray  s8     	%++D%t6?7A9E5=:G , I 	Ir$   c                 T   ||}||}|	"t        t        d| j                  dz               }	t        |      j                  dk(  r'||k(  r"||k(  r||
||| j                  ||||	      S || j                  d      j                  }t        j                  | |||||||||	|
||      S )Nr   ndarray)r  r  r
  )
r   rangeRasterCountr   r   r  rU   DataTyper   r  )r   r  r  r  r  
buf_stringr  r  r  r
  buf_pixel_spacebuf_line_spacebuf_band_spaces                r   r  zDataset.WriteRaster  s     IIU1d&6&6&:;<I 
$$	1)u"49I"~'=.BX??:Dt-6 # 8 8))!,55H((tUEIy(IB 	Br$   c                    || j                   }|| j                  }|"t        t        d| j                  dz               }||}||}|| j                  d      j                  }t        j                  | |||||||||	|
|||||      S )Nr   )	rX   rY   r   r  r  rU   r  r   r  )r   r  r  r  r  r  r  r  r
  r  r   r!  r  rI  rJ  r  s                   r   
ReadRasterzDataset.ReadRaster  s     =$$E=$$EU1d&6&6&:;<III))!,55H((tT5%,5y(,5Xf*6-QX[ 	[r$   T   c                    ddl m} || j                  }|| j                  }|| j                  }|| j                  }|| j	                  d      j
                  }|	"t        t        d| j                  dz               }	|| j                  |||||||||	|
||      }n| j                  |||||||||	|
|||      }|j                  |      S )a  Return a NumPy array for the dataset, seen as a virtual memory mapping.
           If there are several bands and band_sequential = True, an element is
           accessed with array[band][y][x].
           If there are several bands and band_sequential = False, an element is
           accessed with array[y][x][band].
           If there is only one band, an element is accessed with array[y][x].
           Any reference to the array must be dropped before the last reference to the
           related dataset is also dropped.
        r   r   r   )r  r   rX   rY   rU   r  r   r  r  r  VirtualMemGetArray)r   eAccessr  r  r  r  bufxsizebufysizedatatyper
  band_sequential
cache_sizepage_size_hintrl   r   
virtualmems                   r   GetVirtualMemArrayzDataset.GetVirtualMemArray  s    	%=$$E=$$E''H''H))!,55HU1d&6&6&:;<I?++GT4xYackmv  yH  JT  Vd  eJ++GT4xYackmv  yH  JT  Vd  gn  oJ,,j::r$   rP   c                 ^   ddl m} || j                  }|| j                  }|| j	                  d      j
                  }|	"t        t        d| j                  dz               }	|| j                  |||||||||	|
|      }n| j                  |||||||||	|
||      }|j                  |      S )a  Return a NumPy array for the dataset, seen as a virtual memory mapping with
           a tile organization.
           If there are several bands and tile_organization = gdal.GTO_TIP, an element is
           accessed with array[tiley][tilex][y][x][band].
           If there are several bands and tile_organization = gdal.GTO_BIT, an element is
           accessed with array[tiley][tilex][band][y][x].
           If there are several bands and tile_organization = gdal.GTO_BSQ, an element is
           accessed with array[band][tiley][tilex][y][x].
           If there is only one band, an element is accessed with array[tiley][tilex][y][x].
           Any reference to the array must be dropped before the last reference to the
           related dataset is also dropped.
        r   r   r   )r  r   rX   rY   rU   r  r   r  r  r  r&  )r   r'  r  r  r  r  	tilexsize	tileysizer*  r
  tile_organizationr,  rl   r   r.  s                  r   GetTiledVirtualMemArrayzDataset.GetTiledVirtualMemArray@  s      	%=$$E=$$E))!,55HU1d&6&6&:;<I?00$eUT]_hjrt}  @Q  S]  ^J00$eUT]_hjrt}  @Q  S]  _f  gJ,,j::r$   c                     g }| j                  d      }||S d}dt        |      z   dz   |v rP|j                  |dt        |      z   dz      |dt        |      z   dz      f       |dz   }dt        |      z   dz   |v rP|S )NSUBDATASETSr   SUBDATASET__NAME_DESC)r  r   r  )r   sd_listsdis       r   GetSubDatasetszDataset.GetSubDatasets_  s    m,:NCF"7*b0NNB}SV3G;<}SV3G;<> ?AA CF"7*b0 r$   c                    |	"t        t        d| j                  dz               }	|d}|d}|t        j                  }|dk  r|}|dk  r|}|
g n|
}
|Wddlm} t        ||z  t        |	      z  t        j                  |      dz  z        }|dk\  rd g}t        d       |d   }nd|z  }t        j                  | |||||||||	ddd|
      S )Nr   r   r      )rO   r   r   z$buf_obj_ar[0] = b' ' * nRequiredSize )r   r  r  rH   GDT_Bytesysr   r*  r#  r   GetDataTypeSizeexecr  )r   r  r  r  r  r  r  r  r  r
  rl   r   nRequiredSize
buf_obj_ars                 r   r  zDataset.BeginAsyncReaderm  s   U1d&6&6&:;<III ))H>I>I"W?(	I 5I F%J_J_`hJilmJm noMy("V
;<$Q----dD$ugW`bkmu  xA  DE  GH  JK  MT  U  	Ur$   c                     t                t        |t              r| j                  t        |            S t        |t              r| j                  |      S t        dt        |      z        )z)Return the layer given an index or a name%Input %s is not of String or Int type)r   r   r   r  r*  r  	TypeErrorr   )r   iLayers     r   r:  zDataset.GetLayer  sY     	78fc"&&s6{33$''//Cd6lRSSr$   c                 l   t        |t              rht        | j                               D ]>  }| j	                  |      j                         }||k(  s(t        j                  | |      c S  t        d|z        t        |t              rt        j                  | |      S t        dt        |      z        )z.Deletes the layer given an index or layer namezLayer %s not found to deleterH  )r   r   r  r  r:  GetNamer   r  r  r*  rI  r   )r   r!   r<  r    s       r   r  zDataset.DeleteLayer  s    eS!4--/0 >}}Q'//15= 44T1==> ;eCDDs#,,T599Cd5kQRRr$   c                 j    t        |t              r| j                  ||      S | j                  ||      S r.   )r   r   r{  r~  )r   gcpswkt_or_spatial_refs      r   SetGCPszDataset.SetGCPs  s1    (#.=='9::>>$(:;;r$   c                     |y dd l }t        | d      s|j                         | _        | j                  j	                  |       |j                  |       |_        y )Nr   _band_references)r  r   WeakSetrR  r  r  
_parent_ds)r   r  r  s      r   rN  zDataset._add_band_ref  sK    <t/0$+OO$5D!!!$'!++d+r$   c                 N    t        | d      r| j                  D ]	  }d |_         y y )NrR  )r   rR  r   )r   r  s     r   rF  zDataset._invalidate_bands  s.    4+,-- ! 	! -r$   c                 $    | j                          y r.   )rF  r   s    r   __del__zDataset.__del__  s     r$   c                     | S r.   r%   rW  s    r   r   zDataset.__enter__  s    r$   c                 $    | j                          y r.   )rH  r  s     r   r   zDataset.__exit__  s    

r$   )Nr	   F)NNNNNNN)NNNNNNr  )]r   r   r7   r8   r   r   r   r   r   r   Dataset_RasterXSize_getrX   Dataset_RasterYSize_getrY   Dataset_RasterCount_getr  delete_Datasetr  rH  rK  rU   rQ  rT  rW  rZ  r]  r`  rc  rg  rk  ro  rr  ru  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  rH   GRIORA_NearestNeighbourr  r  r#  GF_Readr/  GTO_BSQr4  r=  r:  rP  rN  rF  rX  r   r   r%   r$   r   r@  r@  Q  s    -/IOdeG7H588>VWK588>VWK588>VWK++.478;888D:C6;;2345<96@5E9BG@>689:97C9ER .883E<>:>99<<?::==@
  !qD$"dT!*!B!B!"&%"C& &'Q!$ ) A A !%I" >B"NR	B8  at4!TD!#'T ) A A !%[8 *3):):!%TD4$(DD(81#'	;B /8.?.?aa!%TSC$(DIL]L](8$;>U6
TS<
,!
!r$   r@  c                       e Zd ZdZ ed d d      Zd ZeZe	j                  Zd Zd Zg fd d	Zd
 Zd Zd Zg fd dZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d Z"d Z#y)!GroupzProxy of C++ GDALGroupHS class.c                 6    | j                   j                         S r.   r  r  s    r   r  zGroup.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zGroup.<lambda>  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zGroup.__init__  rD  r$   c                 .    t        j                  | g| S )z#GetName(Group self) -> char const *)r   Group_GetNamer  s     r   rL  zGroup.GetName  r  r$   c                 .    t        j                  | g| S )z'GetFullName(Group self) -> char const *)r   Group_GetFullNamer  s     r   GetFullNamezGroup.GetFullName  r  r$   c                 :    t        j                  | |      }|g }|S r.   )r   Group_GetMDArrayNamesr   rl   r   s      r   GetMDArrayNameszGroup.GetMDArrayNames  s#    ))$8;C
r$   c                 .    t        j                  | g| S )zKOpenMDArray(Group self, char const * name, char ** options=None) -> MDArray)r   Group_OpenMDArrayr  s     r   OpenMDArrayzGroup.OpenMDArray  r  r$   c                 .    t        j                  | g| S )zWOpenMDArrayFromFullname(Group self, char const * name, char ** options=None) -> MDArray)r   Group_OpenMDArrayFromFullnamer  s     r   OpenMDArrayFromFullnamezGroup.OpenMDArrayFromFullname      224?$??r$   c                 .    t        j                  | g| S )zkResolveMDArray(Group self, char const * name, char const * starting_point, char ** options=None) -> MDArray)r   Group_ResolveMDArrayr  s     r   ResolveMDArrayzGroup.ResolveMDArray  r  r$   c                 :    t        j                  | |      }|g }|S r.   )r   Group_GetGroupNamesrn  s      r   GetGroupNameszGroup.GetGroupNames  s#    ''g6;C
r$   c                 .    t        j                  | g| S )zGOpenGroup(Group self, char const * name, char ** options=None) -> Group)r   Group_OpenGroupr  s     r   	OpenGroupzGroup.OpenGroup  r  r$   c                 .    t        j                  | g| S )zSOpenGroupFromFullname(Group self, char const * name, char ** options=None) -> Group)r   Group_OpenGroupFromFullnamer  s     r   OpenGroupFromFullnamezGroup.OpenGroupFromFullname  r  r$   c                 .    t        j                  | g| S )z@GetVectorLayerNames(Group self, char ** options=None) -> char **)r   Group_GetVectorLayerNamesr  s     r   GetVectorLayerNameszGroup.GetVectorLayerNames  r  r$   c                 .    t        j                  | g| S )zMOpenVectorLayer(Group self, char const * name, char ** options=None) -> Layer)r   Group_OpenVectorLayerr  s     r   OpenVectorLayerzGroup.OpenVectorLayer  r5  r$   c                 .    t        j                  | g| S )z/GetDimensions(Group self, char ** options=None))r   Group_GetDimensionsr  s     r   GetDimensionszGroup.GetDimensions  rN  r$   c                 .    t        j                  | g| S )z8GetAttribute(Group self, char const * name) -> Attribute)r   Group_GetAttributer  s     r   GetAttributezGroup.GetAttribute
  r#  r$   c                 .    t        j                  | g| S )z/GetAttributes(Group self, char ** options=None))r   Group_GetAttributesr  s     r   GetAttributeszGroup.GetAttributes  rN  r$   c                 .    t        j                  | g| S )z(GetStructuralInfo(Group self) -> char **)r   Group_GetStructuralInfor  s     r   GetStructuralInfozGroup.GetStructuralInfo  rh  r$   c                 .    t        j                  | g| S )zICreateGroup(Group self, char const * name, char ** options=None) -> Group)r   Group_CreateGroupr  s     r   CreateGroupzGroup.CreateGroup  r  r$   c                 .    t        j                  | g| S )zJDeleteGroup(Group self, char const * name, char ** options=None) -> CPLErr)r   Group_DeleteGroupr  s     r   DeleteGroupzGroup.DeleteGroup  r  r$   c                 .    t        j                  | g| S )zCreateDimension(Group self, char const * name, char const * type, char const * direction, GUIntBig size, char ** options=None) -> Dimension)r   Group_CreateDimensionr  s     r   CreateDimensionzGroup.CreateDimension  r5  r$   c                 .    t        j                  | g| S )zyCreateMDArray(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> MDArray)r   Group_CreateMDArrayr  s     r   CreateMDArrayzGroup.CreateMDArray"  rN  r$   c                 .    t        j                  | g| S )zLDeleteMDArray(Group self, char const * name, char ** options=None) -> CPLErr)r   Group_DeleteMDArrayr  s     r   DeleteMDArrayzGroup.DeleteMDArray&  rN  r$   c                 .    t        j                  | g| S )z}CreateAttribute(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute)r   Group_CreateAttributer  s     r   CreateAttributezGroup.CreateAttribute*  r5  r$   c                 .    t        j                  | g| S )zNDeleteAttribute(Group self, char const * name, char ** options=None) -> CPLErr)r   Group_DeleteAttributer  s     r   DeleteAttributezGroup.DeleteAttribute.  r5  r$   c                 .    t        j                  | g| S )z2Rename(Group self, char const * newName) -> CPLErr)r   Group_Renamer  s     r   r*  zGroup.Rename2      !!$...r$   c                 .    t        j                  | g| S )z_SubsetDimensionFromSelection(Group self, char const * selection, char ** options=None) -> Group)r   "Group_SubsetDimensionFromSelectionr  s     r   SubsetDimensionFromSelectionz"Group.SubsetDimensionFromSelection6      77DtDDr$   N)returnz	list[str])$r   r   r7   r8   r   r   r   r   r   r   delete_Groupr  rL  rk  ro  rr  ru  ry  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r*  r  r%   r$   r   rc  rc    s    *-/IOdeG7H))04 )+ 4@7 ') 2><8656:4486688/Er$   rc  c                      e Zd ZdZ ed d d      ZeZ eej                  d      Z
 eej                  d      Z eej                  d      Z eej                  d	      Z eej"                  d
      Zej&                  Zd Zy)
StatisticszProxy of C++ Statistics class.c                 6    | j                   j                         S r.   r  r  s    r   r  zStatistics.<lambda>?  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zStatistics.<lambda>?  r  r$   r  r  zmin : doublezmax : doublezmean : doublezstd_dev : doublezvalid_count : GIntBigc                 P    t        j                  | t        j                  |        y)z'__init__(Statistics self) -> StatisticsN)r   Statistics_swiginitnew_Statisticsr  s     r   r   zStatistics.__init__H  s    !!$(<(<d(CDr$   N)r   r   r7   r8   r   r   r   r   r   Statistics_min_getrc  Statistics_max_getrb  Statistics_mean_getmeanStatistics_std_dev_getstd_devStatistics_valid_count_getvalid_countdelete_Statisticsr  r   r%   r$   r   r  r  <  s    )-/IOdeGH
5++1D
EC
5++1D
ECE--3GHDu339PQG5;;A]^K..Er$   r  c                      e Zd ZdZ ed d d      Zd ZeZe	j                  Zd Zd Zd	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d Z"d Z#d Z$d  Z%d! Z&d" Z'd# Z(d$ Z)d% Z*d& Z+d' Z,d( Z-d) Z.d* Z/d+ Z0d, Z1d- Z2d. Z3d/ Z4d0 Z5d1 Z6d2 Z7d3 Z8d4 Z9d5 Z:d6 Z;d7 Z<d8 Z=d9 Z>	 	 	 	 	 dGd;Z	 	 	 	 	 dGd<Z?d:d:g fd=Zd> Z@	 	 	 	 	 dGd?Z	 	 dHd@ZA	 	 	 dIdAZBdB ZC eeCdCD      ZDdE ZEdF ZFy:)JMDArrayz!Proxy of C++ GDALMDArrayHS class.c                 6    | j                   j                         S r.   r  r  s    r   r  zMDArray.<lambda>Q  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zMDArray.<lambda>Q  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zMDArray.__init__S  rD  r$   c                 .    t        j                  | g| S )z%GetName(MDArray self) -> char const *)r   MDArray_GetNamer  s     r   rL  zMDArray.GetNameX  r  r$   c                 .    t        j                  | g| S )z)GetFullName(MDArray self) -> char const *)r   MDArray_GetFullNamer  s     r   rk  zMDArray.GetFullName\  rN  r$   c                 .    t        j                  | g| S )z/GetTotalElementsCount(MDArray self) -> GUIntBig)r   MDArray_GetTotalElementsCountr  s     r   GetTotalElementsCountzMDArray.GetTotalElementsCount`  rv  r$   c                 .    t        j                  | g| S )z)GetDimensionCount(MDArray self) -> size_t)r   MDArray_GetDimensionCountr  s     r   GetDimensionCountzMDArray.GetDimensionCountd  r  r$   c                 .    t        j                  | g| S )zGetDimensions(MDArray self))r   MDArray_GetDimensionsr  s     r   r  zMDArray.GetDimensionsh  r5  r$   c                 .    t        j                  | g| S )z$GetCoordinateVariables(MDArray self))r   MDArray_GetCoordinateVariablesr  s     r   GetCoordinateVariableszMDArray.GetCoordinateVariablesl      33D@4@@r$   c                 .    t        j                  | g| S )zGetBlockSize(MDArray self))r   MDArray_GetBlockSizer  s     r   GetBlockSizezMDArray.GetBlockSizep  r  r$   c                 .    t        j                  | g| S )z<GetProcessingChunkSize(MDArray self, size_t nMaxChunkMemory))r   MDArray_GetProcessingChunkSizer  s     r   GetProcessingChunkSizezMDArray.GetProcessingChunkSizet  r  r$   c                 .    t        j                  | g| S )z-GetDataType(MDArray self) -> ExtendedDataType)r   MDArray_GetDataTyper  s     r   GetDataTypezMDArray.GetDataTypex  rN  r$   c                 .    t        j                  | g| S )z*GetStructuralInfo(MDArray self) -> char **)r   MDArray_GetStructuralInfor  s     r   r  zMDArray.GetStructuralInfo|  r  r$   c                 .    t        j                  | g| S )zGResize(MDArray self, int newDimensions, char ** options=None) -> CPLErr)r   MDArray_Resizer  s     r   ResizezMDArray.Resize  r'  r$   c                 .    t        j                  | g| S )znRead(MDArray self, int nDims1, int nDims2, int nDims3, int nDims4, ExtendedDataType buffer_datatype) -> CPLErr)r   MDArray_Readr  s     r   ReadzMDArray.Read  r  r$   c                 .    t        j                  | g| S )zWriteStringArray(MDArray self, int nDims1, int nDims2, int nDims3, ExtendedDataType buffer_datatype, char ** options) -> CPLErr)r   MDArray_WriteStringArrayr  s     r   WriteStringArrayzMDArray.WriteStringArray  r=  r$   c                 .    t        j                  | g| S )zWrite(MDArray self, int nDims1, int nDims2, int nDims3, int nDims4, ExtendedDataType buffer_datatype, GIntBig buf_len) -> CPLErr)r   MDArray_Writer  s     r   WritezMDArray.Write  r  r$   c                 .    t        j                  | g| S )zPAdviseRead(MDArray self, int nDims1, int nDims2, char ** options=None) -> CPLErr)r   MDArray_AdviseReadr  s     r   r  zMDArray.AdviseRead  r#  r$   c                 .    t        j                  | g| S )z:GetAttribute(MDArray self, char const * name) -> Attribute)r   MDArray_GetAttributer  s     r   r  zMDArray.GetAttribute  r  r$   c                 .    t        j                  | g| S )z1GetAttributes(MDArray self, char ** options=None))r   MDArray_GetAttributesr  s     r   r  zMDArray.GetAttributes  r5  r$   c                 .    t        j                  | g| S )zCreateAttribute(MDArray self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute)r   MDArray_CreateAttributer  s     r   r  zMDArray.CreateAttribute  rh  r$   c                 .    t        j                  | g| S )zPDeleteAttribute(MDArray self, char const * name, char ** options=None) -> CPLErr)r   MDArray_DeleteAttributer  s     r   r  zMDArray.DeleteAttribute  rh  r$   c                 .    t        j                  | g| S )z+GetNoDataValueAsRaw(MDArray self) -> CPLErr)r   MDArray_GetNoDataValueAsRawr  s     r   GetNoDataValueAsRawzMDArray.GetNoDataValueAsRaw  r  r$   c                 .    t        j                  | g| S )z$GetNoDataValueAsDouble(MDArray self))r   MDArray_GetNoDataValueAsDoubler  s     r   GetNoDataValueAsDoublezMDArray.GetNoDataValueAsDouble  r  r$   c                 .    t        j                  | g| S )z#GetNoDataValueAsInt64(MDArray self))r   MDArray_GetNoDataValueAsInt64r  s     r   GetNoDataValueAsInt64zMDArray.GetNoDataValueAsInt64  rv  r$   c                 .    t        j                  | g| S )z$GetNoDataValueAsUInt64(MDArray self))r   MDArray_GetNoDataValueAsUInt64r  s     r   GetNoDataValueAsUInt64zMDArray.GetNoDataValueAsUInt64  r  r$   c                 .    t        j                  | g| S )z=GetNoDataValueAsString(MDArray self) -> retStringAndCPLFree *)r   MDArray_GetNoDataValueAsStringr  s     r   GetNoDataValueAsStringzMDArray.GetNoDataValueAsString  r  r$   c                 .    t        j                  | g| S )z6SetNoDataValueDouble(MDArray self, double d) -> CPLErr)r   MDArray_SetNoDataValueDoubler  s     r   SetNoDataValueDoublezMDArray.SetNoDataValueDouble  r  r$   c                 .    t        j                  | g| S )z6SetNoDataValueInt64(MDArray self, GIntBig v) -> CPLErr)r   MDArray_SetNoDataValueInt64r  s     r   SetNoDataValueInt64zMDArray.SetNoDataValueInt64  r  r$   c                 .    t        j                  | g| S )z8SetNoDataValueUInt64(MDArray self, GUIntBig v) -> CPLErr)r   MDArray_SetNoDataValueUInt64r  s     r   SetNoDataValueUInt64zMDArray.SetNoDataValueUInt64  r  r$   c                 .    t        j                  | g| S )zASetNoDataValueString(MDArray self, char const * nodata) -> CPLErr)r   MDArray_SetNoDataValueStringr  s     r   SetNoDataValueStringzMDArray.SetNoDataValueString  r  r$   c                 .    t        j                  | g| S )z7SetNoDataValueRaw(MDArray self, GIntBig nLen) -> CPLErr)r   MDArray_SetNoDataValueRawr  s     r   SetNoDataValueRawzMDArray.SetNoDataValueRaw  r  r$   c                 .    t        j                  | g| S )z)DeleteNoDataValue(MDArray self) -> CPLErr)r   MDArray_DeleteNoDataValuer  s     r   DeleteNoDataValuezMDArray.DeleteNoDataValue  r  r$   c                 .    t        j                  | g| S )zGetOffset(MDArray self))r   MDArray_GetOffsetr  s     r   	GetOffsetzMDArray.GetOffset  r  r$   c                 .    t        j                  | g| S )z2GetOffsetStorageType(MDArray self) -> GDALDataType)r   MDArray_GetOffsetStorageTyper  s     r   GetOffsetStorageTypezMDArray.GetOffsetStorageType  r  r$   c                 .    t        j                  | g| S )zGetScale(MDArray self))r   MDArray_GetScaler  s     r   GetScalezMDArray.GetScale  r  r$   c                 .    t        j                  | g| S )z1GetScaleStorageType(MDArray self) -> GDALDataType)r   MDArray_GetScaleStorageTyper  s     r   GetScaleStorageTypezMDArray.GetScaleStorageType  r  r$   c                 4    t        j                  | g|i |S )zSSetOffset(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr)r   MDArray_SetOffsetrC  s      r   	SetOffsetzMDArray.SetOffset  r  r$   c                 4    t        j                  | g|i |S )zRSetScale(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr)r   MDArray_SetScalerC  s      r   SetScalezMDArray.SetScale      %%d<T<V<<r$   c                 .    t        j                  | g| S )z2SetUnit(MDArray self, char const * unit) -> CPLErr)r   MDArray_SetUnitr  s     r   SetUnitzMDArray.SetUnit  r  r$   c                 .    t        j                  | g| S )z%GetUnit(MDArray self) -> char const *)r   MDArray_GetUnitr  s     r   GetUnitzMDArray.GetUnit  r  r$   c                 .    t        j                  | g| S )z;SetSpatialRef(MDArray self, SpatialReference srs) -> OGRErr)r   MDArray_SetSpatialRefr  s     r   r`  zMDArray.SetSpatialRef  r5  r$   c                 .    t        j                  | g| S )z/GetSpatialRef(MDArray self) -> SpatialReference)r   MDArray_GetSpatialRefr  s     r   rZ  zMDArray.GetSpatialRef  r5  r$   c                 .    t        j                  | g| S )z7GetView(MDArray self, char const * viewExpr) -> MDArray)r   MDArray_GetViewr  s     r   GetViewzMDArray.GetView  r  r$   c                 .    t        j                  | g| S )z/Transpose(MDArray self, int axisMap) -> MDArray)r   MDArray_Transposer  s     r   	TransposezMDArray.Transpose  r  r$   c                 .    t        j                  | g| S )z$GetUnscaled(MDArray self) -> MDArray)r   MDArray_GetUnscaledr  s     r   GetUnscaledzMDArray.GetUnscaled   rN  r$   c                 .    t        j                  | g| S )z6GetMask(MDArray self, char ** options=None) -> MDArray)r   MDArray_GetMaskr  s     r   GetMaskzMDArray.GetMask  r  r$   c                 4    t        j                  | g|i |S )zGetGridded(MDArray self, char const * pszGridOptions, MDArray xArray=None, MDArray yArray=None, char ** options=None) -> MDArray)r   MDArray_GetGriddedrC  s      r   
GetGriddedzMDArray.GetGridded      ''>t>v>>r$   c                 .    t        j                  | g| S )zrAsClassicDataset(MDArray self, size_t iXDim, size_t iYDim, Group hRootGroup=None, char ** options=None) -> Dataset)r   MDArray_AsClassicDatasetr  s     r   AsClassicDatasetzMDArray.AsClassicDataset  r=  r$   c                 4    t        j                  | g|i |S )zGetStatistics(MDArray self, bool approx_ok=FALSE, bool force=TRUE, GDALProgressFunc callback=0, void * callback_data=None) -> Statistics)r   MDArray_GetStatisticsrC  s      r   GetStatisticszMDArray.GetStatistics  r  r$   c                 4    t        j                  | g|i |S )zComputeStatistics(MDArray self, bool approx_ok=FALSE, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> Statistics)r   MDArray_ComputeStatisticsrC  s      r   ComputeStatisticszMDArray.ComputeStatistics  s    ..tEdEfEEr$   c                 .    t        j                  | g| S )zGetResampled(MDArray self, int nDimensions, GDALRIOResampleAlg resample_alg, OSRSpatialReferenceShadow ** srs, char ** options=None) -> MDArray)r   MDArray_GetResampledr  s     r   GetResampledzMDArray.GetResampled  r  r$   c                 .    t        j                  | g| S )z1Cache(MDArray self, char ** options=None) -> bool)r   MDArray_Cacher  s     r   CachezMDArray.Cache  r  r$   c                 .    t        j                  | g| S )z4Rename(MDArray self, char const * newName) -> CPLErr)r   MDArray_Renamer  s     r   r*  zMDArray.Rename   r'  r$   Nc                    |sdg| j                         z  }|s+| j                         D cg c]  }|j                          }}|sdg| j                         z  }|s:d}g }t        |      D ]  }|j	                  |       ||z  } |j                          |s| j                         }t        j                  | |||||      S c c}w )Nr   r   )	r  r  GetSizereversedr  reverser  r   r  )	r   array_start_idxcount
array_stepbuffer_stridebuffer_datatyper  stridecnts	            r   r  zMDArray.Read$  s     C$"8"8"::/-1-?-?-ACcCKKMC%CsT3355*&- e_ c""6*mf 


! ,,./!!$
M[jkk Ds   Cc                 :    ddl m} |j                  | |||||      S Nr   r   )r  r   MDArrayReadAsArray)r   r\  r]  r^  r`  r  r   s          r   r  zMDArray.ReadAsArray=  s$     	%,,T?E:Wfhoppr$   c                    |sdg| j                         z  }|sKt        | j                               D cg c])  }| j                         |   j                         ||   z
  + }}t	        j
                  | |||      S c c}w )Nr   )r  r  r  rY  r   r  )r   r\  r]  rl   r<  s        r   r  zMDArray.AdviseReadG  s~    C$"8"8"::/V[]a]s]s]uVvxQRT'')!,4469KKx%x''ougNN ys   .A<c                    d }t        |t              r7| j                  d|j                  dd      j                  dd      z   dz         S t        |t              r| j                  d ||      z   d	z         S t        |t
              r:| j                  dd
j                  |D cg c]
  } ||       c}      z   d	z         S | j                  d ||      z   d	z         S c c}w )Nc                    | t         k(  ryt        | t              rMdj                  | j                  | j
                  | j                  fD cg c]  }|t        |      nd c}      S t        | t              r| S t        | t        t        d      f      rt        |       S 	 dd l
}| |j                  k(  ry	 t        |       S c c}w #  Y t        |       S xY w)Nz...:r	      /g,r   newaxis)Ellipsisr   slicer  startstopstepr   r*  r   numpyrk  )rN  r  nps      r   	stringifyz&MDArray.__getitem__.<locals>.stringifyP  s    hAu%QWWVWV\V\^_^d^dLe"fqQ]3q6#B"fggAs#(AT.%9:;Q-$"**_& %
 Vm #gVms   C!C Cz["\z\\"z\"z"][]r  )r   r   r9  replacerm  r  r  )r   r  rs  r  s       r   __getitem__zMDArray.__getitem__N  s    $ c"\\$dF)C)K)KCQV)W"WZ^"^__$&\\#	$"7#"=>>$&\\#1M1)A,1M(N"NQT"TUU\\#	$"7#"=>> 2Ns   #Cc                    | j                         }t        |      j                  dk(  r|||| j                  |||      S |dk(  rt        |      j                  dk(  r|~|||zt        t
        t        t        t        t        t        t        t        t        t        d}|j                  |j                  f}	|	|vrt!        d      t"        j%                  ||	         }n|dk(  rt        |      t        g       k(  rt'        |      dk7  r| j)                         j+                         t,        k7  rt        }|D ]E  }
t/        |
t0              r|
dk\  s|
d	k  st        }%t/        |
t2              rt        }<t5        d
       dd l}|j7                  |t        k(  rdnd|      }t"        j%                  |      }|s| j)                         }| j)                         j+                         t,        k(  xr |j+                         t,        k(  xr |dk(  }|sdg|z  }|sS|r&t        |      t        g       k(  sJ t'        |      g}n+| j9                         D cg c]  }|j;                          }}|sdg|z  }|s:d}g }t=        |      D ]  }|j?                  |       ||z  } |jA                          |rtC        jD                  | |||||      S tC        jF                  | ||||||      S c c}w )Nr  )r\  r^  r   r   ))Br   )rL  r   )hrN   )HrN   )r<  r  )Ir  )lr  )qr?  )Qr?  )rA  r  )dr?  z'unhandled type for buffer of type arrayr   l           z7Only lists with integer or float elements are supportedr  r<  )$r  r   r   r  rA  GDT_Int8	GDT_Int16
GDT_UInt16	GDT_Int32
GDT_UInt32	GDT_Int64
GDT_UInt64GDT_Float32GDT_Float64typecodeitemsizer   ExtendedDataTyperW   r#  r  GetClassGEDTC_STRINGr   r*  r  r  r   r  rY  rZ  r  r[  r   r  r  )r   bufferr\  r]  r^  r_  r`  dimCountmap_typecode_itemsize_to_gdalr  rN  r   is_1d_stringr  ra  rb  s                   r   r  zMDArray.Writek  s    ))+ <  I-=]27N??6?Wa?bb q=T&\22g==]27N!!"#"#""#$$-) ??FOO4C77 IJJ.556STW6XYO ]tF|tBx7CK1<L!!#,,.,>'O `a%W~Z*55)&1O$%^__` [[;(FCQWXF.55oFO ,,./'')224D  FIaIaIcgsIs  F  yA  EF  yFC(N/&\T"X---Foe151C1C1EG#GeGsX~*&- e_ c""6*mf 


!11$PZ\kmstt""4%]\kmstt% Hs   K$c                 6    ddl m} |j                  | |||      S rd  )r  r   MDArrayWriteArray)r   r   r\  r^  r   s        r   r  zMDArray.WriteArray  s     	%++D%*UUr$   c                 <   ddl }| j                         }|Y| j                  |||      }|j                  |||      }|j                  t               }|j
                  j                  ||      S |j
                  j                  | j                  |||      d      S )z= Return a numpy masked array of ReadAsArray() with GetMask() r   N)mask)rq  rB  r  astypeboolmar   )	r   r\  r]  r^  rq  r  r   
mask_array
bool_arrays	            r   ReadAsMaskedArrayzMDArray.ReadAsMaskedArray  s    
 	||~$$_eZHE))/5*MJ$++D11J88>>%j>9988>>$"2"2?E:"V]a>bbr$   c                 ~    | j                         syd}| j                         D ]  }||j                         fz  } |S )z Return the shape of the array Nr%   )r  r  rY  )r   shpr  s      r   GetShapezMDArray.GetShape  sF    ##%c##%  # jr$   zReturns the shape of the array.)fgetr  c                    | j                         }|j                         t        k(  r6|j                         t        j
                  k(  rt        j                  |       S |j                         t        k(  r6|j                         t        j                  k(  rt        j                  |       S t        j                  |       S )z&GetNoDataValue(MDArray self) -> value )r  r  GEDTC_NUMERICGetNumericDataTyperH   r  r   r   r  r  r  )r   dts     r   GetNoDataValuezMDArray.GetNoDataValue  s     b	-	'B,A,A,CyGZGZ,Z44T:
:	-	'B,A,A,CyG[G[,[55d;
;11$77r$   c                    | j                         }|j                         t        k(  r7|j                         t        j
                  k(  rt        j                  | |      S |j                         t        k(  r7|j                         t        j                  k(  rt        j                  | |      S t        j                  | |      S )z-SetNoDataValue(MDArray self, value) -> CPLErr)r  r  r  r  rH   r  r   r  r  r  r	  )r   r!   r  s      r   SetNoDataValuezMDArray.SetNoDataValue  s     b	-	'B,A,A,CyGZGZ,Z224?
?	-	'B,A,A,CyG[G[,[33D%@
@//e<<r$   NNNNNNN)NNN)Gr   r   r7   r8   r   r   r   r   r   r   delete_MDArrayr  rL  rk  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/  r2  r`  rZ  r9  r<  r?  rB  rE  rI  rL  rO  rR  rU  r*  r  ry  r  r  r  shaper  r  r%   r$   r   r  r  N  s   ,-/IOdeG7H++26@<8A7A6<1/;0578::>A@AA?>??<<4?3>>=22882462?;BF701
  $!#l4 '+ !%&*"q ,0 O?>  $!#Tun '+!%V '+ !%c ((IJE
8
=r$   r  c                       e Zd ZdZ ed d d      Zd ZeZe	j                  Zd Zd Zd	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!y)	Attributez#Proxy of C++ GDALAttributeHS class.c                 6    | j                   j                         S r.   r  r  s    r   r  zAttribute.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zAttribute.<lambda>  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zAttribute.__init__  rD  r$   c                 .    t        j                  | g| S )z'GetName(Attribute self) -> char const *)r   Attribute_GetNamer  s     r   rL  zAttribute.GetName	  r  r$   c                 .    t        j                  | g| S )z+GetFullName(Attribute self) -> char const *)r   Attribute_GetFullNamer  s     r   rk  zAttribute.GetFullName  r5  r$   c                 .    t        j                  | g| S )z1GetTotalElementsCount(Attribute self) -> GUIntBig)r   Attribute_GetTotalElementsCountr  s     r   r  zAttribute.GetTotalElementsCount      44TADAAr$   c                 .    t        j                  | g| S )z+GetDimensionCount(Attribute self) -> size_t)r   Attribute_GetDimensionCountr  s     r   r  zAttribute.GetDimensionCount  r  r$   c                 .    t        j                  | g| S )z!GetDimensionsSize(Attribute self))r   Attribute_GetDimensionsSizer  s     r   GetDimensionsSizezAttribute.GetDimensionsSize  r  r$   c                 .    t        j                  | g| S )z/GetDataType(Attribute self) -> ExtendedDataType)r   Attribute_GetDataTyper  s     r   r  zAttribute.GetDataType  r5  r$   c                 .    t        j                  | g| S )z#ReadAsRaw(Attribute self) -> CPLErr)r   Attribute_ReadAsRawr  s     r   	ReadAsRawzAttribute.ReadAsRaw!  rN  r$   c                 .    t        j                  | g| S )z,ReadAsString(Attribute self) -> char const *)r   Attribute_ReadAsStringr  s     r   ReadAsStringzAttribute.ReadAsString%  r9  r$   c                 .    t        j                  | g| S )z ReadAsInt(Attribute self) -> int)r   Attribute_ReadAsIntr  s     r   	ReadAsIntzAttribute.ReadAsInt)  rN  r$   c                 .    t        j                  | g| S )z&ReadAsDouble(Attribute self) -> double)r   Attribute_ReadAsDoubler  s     r   ReadAsDoublezAttribute.ReadAsDouble-  r9  r$   c                 .    t        j                  | g| S )z,ReadAsStringArray(Attribute self) -> char **)r   Attribute_ReadAsStringArrayr  s     r   ReadAsStringArrayzAttribute.ReadAsStringArray1  r  r$   c                 .    t        j                  | g| S )zReadAsIntArray(Attribute self))r   Attribute_ReadAsIntArrayr  s     r   ReadAsIntArrayzAttribute.ReadAsIntArray5  r=  r$   c                 .    t        j                  | g| S )z!ReadAsDoubleArray(Attribute self))r   Attribute_ReadAsDoubleArrayr  s     r   ReadAsDoubleArrayzAttribute.ReadAsDoubleArray9  r  r$   c                 .    t        j                  | g| S )z0WriteRaw(Attribute self, GIntBig nLen) -> CPLErr)r   Attribute_WriteRawr  s     r   WriteRawzAttribute.WriteRaw=  r#  r$   c                 .    t        j                  | g| S )z7WriteString(Attribute self, char const * val) -> CPLErr)r   Attribute_WriteStringr  s     r   WriteStringzAttribute.WriteStringA  r5  r$   c                 .    t        j                  | g| S )z8WriteStringArray(Attribute self, char ** vals) -> CPLErr)r   Attribute_WriteStringArrayr  s     r   r  zAttribute.WriteStringArrayE  r  r$   c                 .    t        j                  | g| S )z+WriteInt(Attribute self, int val) -> CPLErr)r   Attribute_WriteIntr  s     r   WriteIntzAttribute.WriteIntI  r#  r$   c                 .    t        j                  | g| S )z1WriteDouble(Attribute self, double val) -> CPLErr)r   Attribute_WriteDoubler  s     r   WriteDoublezAttribute.WriteDoubleM  r5  r$   c                 .    t        j                  | g| S )z5WriteDoubleArray(Attribute self, int nList) -> CPLErr)r   Attribute_WriteDoubleArrayr  s     r   WriteDoubleArrayzAttribute.WriteDoubleArrayQ  r  r$   c                 .    t        j                  | g| S )z6Rename(Attribute self, char const * newName) -> CPLErr)r   Attribute_Renamer  s     r   r*  zAttribute.RenameU  r  r$   c                 |   | j                         }|j                         }|t        k(  rb| j                         dk(  r?| j	                         }|j                         t        k(  r	 ddl}|j                  |      S |S | j                         S |t        k(  r|j                         t        t        t        t        t         fv r3| j                         dk(  r| j#                         S | j%                         S | j                         dk(  r| j'                         S | j)                         S | j+                         S #  Y |S xY w)z@ Read an attribute and return it with the most appropriate type r   r   N)r  r  r  r  r  
GetSubTypeGEDTST_JSONr   r   r  r  r  rA  r  r  r  r  r  r  r  r  r  )r   r  dt_classrY  r   s        r   r  zAttribute.ReadZ  s   bh	\	!'')Q.##%aK/!!ZZ]* h'')
)	]	"""$8Y
T](^^++-2)),,..++-2**,,//11^^hs   %D6 6D;c                    t        |t        t        d      f      r,|dk\  r|dk  r| j                  |      S | j	                  |      S t        |t
              r| j	                  |      S t        |t              r6| j                         j                         t        k7  r| j                  |      S t        |t              rt        |      dk(  rG| j                         j                         t        k(  r| j                  |      S | j                  |      S t        |d   t        t        d      t
        f      r| j                  |      S t        |d   t              r| j                  |      S t        |t               rI| j                         j#                         t$        k(  r$dd l}| j                  |j)                  |            S | j+                  |      S )Nrj  r  ir   )r   r*  r   r  r  r  r   r  r  GEDTC_COMPOUNDr  r   r#  r  r  r  r!  r  r  r   dumpsr  )r   rR  r   s      r   r  zAttribute.Writev  s}   	C#tN34	5KC:$5]]3''%%c**	C	$$	C	$"2"2"4"="="?>"Q$$	C	s8q=((*l:**3//**3//c!fsD$8%@A&&s+
+c!fc"&&s+
+	C	4#3#3#5#@#@#Bk#Q
!!$**S/2
2]]3r$   N)"r   r   r7   r8   r   r   r   r   r   r   delete_Attributer  rL  rk  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    .-/IOdeG7H--48B>>86969>;>58=58=3
8 r$   r  c                   |    e Zd ZdZ ed d d      Zd ZeZe	j                  Zd Zd Zd	 Zd
 Zd Zd Zd Zd Zy)	Dimensionz#Proxy of C++ GDALDimensionHS class.c                 6    | j                   j                         S r.   r  r  s    r   r  zDimension.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zDimension.<lambda>  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zDimension.__init__  rD  r$   c                 .    t        j                  | g| S )z'GetName(Dimension self) -> char const *)r   Dimension_GetNamer  s     r   rL  zDimension.GetName  r  r$   c                 .    t        j                  | g| S )z+GetFullName(Dimension self) -> char const *)r   Dimension_GetFullNamer  s     r   rk  zDimension.GetFullName  r5  r$   c                 .    t        j                  | g| S )z'GetType(Dimension self) -> char const *)r   Dimension_GetTyper  s     r   GetTypezDimension.GetType  r  r$   c                 .    t        j                  | g| S )z,GetDirection(Dimension self) -> char const *)r   Dimension_GetDirectionr  s     r   GetDirectionzDimension.GetDirection  r9  r$   c                 .    t        j                  | g| S )z#GetSize(Dimension self) -> GUIntBig)r   Dimension_GetSizer  s     r   rY  zDimension.GetSize  r  r$   c                 .    t        j                  | g| S )z.GetIndexingVariable(Dimension self) -> MDArray)r   Dimension_GetIndexingVariabler  s     r   GetIndexingVariablezDimension.GetIndexingVariable  rv  r$   c                 .    t        j                  | g| S )z:SetIndexingVariable(Dimension self, MDArray array) -> bool)r   Dimension_SetIndexingVariabler  s     r   SetIndexingVariablezDimension.SetIndexingVariable  rv  r$   c                 .    t        j                  | g| S )z6Rename(Dimension self, char const * newName) -> CPLErr)r   Dimension_Renamer  s     r   r*  zDimension.Rename  r  r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_Dimensionr  rL  rk  r  r   rY  r  r  r*  r%   r$   r   r  r    sV    .-/IOdeG7H--48494@@3r$   r  c                       e Zd ZdZ ed d d      Zd ZeZe	j                  Zed        Zed        Zed	        Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zy)r  z*Proxy of C++ GDALExtendedDataTypeHS class.c                 6    | j                   j                         S r.   r  r  s    r   r  zExtendedDataType.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zExtendedDataType.<lambda>  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zExtendedDataType.__init__  rD  r$   c                  &    t        j                  |  S )z+Create(GDALDataType dt) -> ExtendedDataType)r   ExtendedDataType_Createrr   s    r   rW   zExtendedDataType.Create  s     ,,d33r$   c                  &    t        j                  |  S )zmCreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE) -> ExtendedDataType)r   ExtendedDataType_CreateStringrr   s    r   CreateStringzExtendedDataType.CreateString  s     22D99r$   c                  &    t        j                  |  S )zTCreateCompound(char const * name, size_t nTotalSize, int nComps) -> ExtendedDataType)r   ExtendedDataType_CreateCompoundrr   s    r   CreateCompoundzExtendedDataType.CreateCompound  s     44d;;r$   c                 .    t        j                  | g| S )z.GetName(ExtendedDataType self) -> char const *)r   ExtendedDataType_GetNamer  s     r   rL  zExtendedDataType.GetName  r=  r$   c                 .    t        j                  | g| S )z<GetClass(ExtendedDataType self) -> GDALExtendedDataTypeClass)r   ExtendedDataType_GetClassr  s     r   r  zExtendedDataType.GetClass  r  r$   c                 .    t        j                  | g| S )z9GetNumericDataType(ExtendedDataType self) -> GDALDataType)r   #ExtendedDataType_GetNumericDataTyper  s     r   r  z#ExtendedDataType.GetNumericDataType      88EEEr$   c                 .    t        j                  | g| S )z(GetSize(ExtendedDataType self) -> size_t)r   ExtendedDataType_GetSizer  s     r   rY  zExtendedDataType.GetSize  r=  r$   c                 .    t        j                  | g| S )z3GetMaxStringLength(ExtendedDataType self) -> size_t)r   #ExtendedDataType_GetMaxStringLengthr  s     r   GetMaxStringLengthz#ExtendedDataType.GetMaxStringLength  r  r$   c                 .    t        j                  | g| S )z@GetSubType(ExtendedDataType self) -> GDALExtendedDataTypeSubType)r   ExtendedDataType_GetSubTyper  s     r   r  zExtendedDataType.GetSubType  r  r$   c                 .    t        j                  | g| S )z$GetComponents(ExtendedDataType self))r   ExtendedDataType_GetComponentsr  s     r   GetComponentszExtendedDataType.GetComponents  r  r$   c                 .    t        j                  | g| S )zCCanConvertTo(ExtendedDataType self, ExtendedDataType other) -> bool)r   ExtendedDataType_CanConvertTor  s     r   CanConvertTozExtendedDataType.CanConvertTo  rv  r$   c                 .    t        j                  | g| S )z=Equals(ExtendedDataType self, ExtendedDataType other) -> bool)r   ExtendedDataType_Equalsr  s     r   EqualszExtendedDataType.Equals  rh  r$   c                 $    | j                  |      S r.   )r.  r   others     r   __eq__zExtendedDataType.__eq__  s    [[r$   c                 &    | j                  |       S r.   )r2  r0  s     r   __ne__zExtendedDataType.__ne__  s    U###r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_ExtendedDataTyper  staticmethodrW   r  r  rL  r  r  rY  r#  r  r(  r+  r.  r2  r4  r%   r$   r   r  r    s    5-/IOdeG7H444 4 : : < <;<F;F>A@:
 $r$   r  c                   n    e Zd ZdZ ed d d      Zd ZeZe	j                  Zed        Zd Zd	 Zd
 Zy)EDTComponentz&Proxy of C++ GDALEDTComponentHS class.c                 6    | j                   j                         S r.   r  r  s    r   r  zEDTComponent.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zEDTComponent.<lambda>  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zEDTComponent.__init__  rD  r$   c                  &    t        j                  |  S )zOCreate(char const * name, size_t offset, ExtendedDataType type) -> EDTComponent)r   EDTComponent_Createrr   s    r   rW   zEDTComponent.Create  s     (($//r$   c                 .    t        j                  | g| S )z*GetName(EDTComponent self) -> char const *)r   EDTComponent_GetNamer  s     r   rL  zEDTComponent.GetName  r  r$   c                 .    t        j                  | g| S )z&GetOffset(EDTComponent self) -> size_t)r   EDTComponent_GetOffsetr  s     r   r  zEDTComponent.GetOffset  r9  r$   c                 .    t        j                  | g| S )z.GetType(EDTComponent self) -> ExtendedDataType)r   EDTComponent_GetTyper  s     r   r  zEDTComponent.GetType#  r  r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_EDTComponentr  r6  rW   rL  r  r  r%   r$   r   r8  r8    sM    1-/IOdeG7H000 0797r$   r8  c                   :   e Zd ZdZ ed d d      Zd ZeZ ee	j                  d      Z ee	j                  d      Z ee	j                  d	      Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZdRdZd Zd Zd Zd Zd Z d Z!d Z"d Z#d Z$d Z%d  Z&d! Z'd" Z(d# Z)dRd$Z*d% Z+d& Z,d' Z-d( Z.d) Z/d* Z0d+ Z1d, Z2d- Z3d. Z4d/ Z5d0 Z6d1 Z7d2 Z8d3 Z9d4 Z:d5 Z;d6 Z<d7 Z=d8 Z>d9 Z?d: Z@d; ZAd< ZBd= ZCd> ZDd? ZEd@ ZFdA ZGdB ZHdC ZIdD ZJdE ZKdF ZLdGdGdHdHdHdHdHdHdHeMj                  dHdHdHfdIZO	 	 dSdJZ2dGdGdHdHdHdHdHdHeMj                  dHdHfdKZPdGdGeMj                  dHdHfdLZQeMj                  dGdGdHdHdHdHdHdMdGdHfdNZSeMj                  dHfdOZTeMj                  dGdGdHdHdPdPdHdMdHf
dQZUyH)TBandz(Proxy of C++ GDALRasterBandShadow class.c                 6    | j                   j                         S r.   r  r  s    r   r  zBand.<lambda>,  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zBand.<lambda>,  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zBand.__init__.  rD  r$   zXSize : intzYSize : intzDataType : GDALDataTypec                 .    t        j                  | g| S )z GetDataset(Band self) -> Dataset)r   Band_GetDatasetr  s     r   
GetDatasetzBand.GetDataset5  r  r$   c                 .    t        j                  | g| S )zGetBand(Band self) -> int)r   Band_GetBandr  s     r   GetBandzBand.GetBand9  r  r$   c                 .    t        j                  | g| S )zGetBlockSize(Band self))r   Band_GetBlockSizer  s     r   r  zBand.GetBlockSize=  r  r$   c                 .    t        j                  | g| S )z=GetActualBlockSize(Band self, int nXBlockOff, int nYBlockOff))r   Band_GetActualBlockSizer  s     r   GetActualBlockSizezBand.GetActualBlockSizeA  rh  r$   c                 .    t        j                  | g| S )z4GetColorInterpretation(Band self) -> GDALColorInterp)r   Band_GetColorInterpretationr  s     r   GetColorInterpretationzBand.GetColorInterpretationE  r  r$   c                 .    t        j                  | g| S )z:GetRasterColorInterpretation(Band self) -> GDALColorInterp)r   !Band_GetRasterColorInterpretationr  s     r   GetRasterColorInterpretationz!Band.GetRasterColorInterpretationI  r  r$   c                 .    t        j                  | g| S )z@SetColorInterpretation(Band self, GDALColorInterp val) -> CPLErr)r   Band_SetColorInterpretationr  s     r   SetColorInterpretationzBand.SetColorInterpretationM  r  r$   c                 .    t        j                  | g| S )zFSetRasterColorInterpretation(Band self, GDALColorInterp val) -> CPLErr)r   !Band_SetRasterColorInterpretationr  s     r   SetRasterColorInterpretationz!Band.SetRasterColorInterpretationQ  r  r$   c                     | j                   t        j                  k(  rt        j                  |       S | j                   t        j
                  k(  rt        j                  |       S t        j                  |       S )z#GetNoDataValue(Band self) -> value )r  rH   r  r   Band_GetNoDataValueAsInt64r  Band_GetNoDataValueAsUInt64Band_GetNoDataValuerW  s    r   r  zBand.GetNoDataValueU  s[     ==I///33D99==I00044T::((..r$   c                 .    t        j                  | g| S )z GetNoDataValueAsInt64(Band self))r   rb  r  s     r   r  zBand.GetNoDataValueAsInt64b  r  r$   c                 .    t        j                  | g| S )z!GetNoDataValueAsUInt64(Band self))r   rc  r  s     r   r  zBand.GetNoDataValueAsUInt64f  r  r$   c                     | j                   t        j                  k(  rt        j                  | |      S | j                   t        j
                  k(  rt        j                  | |      S t        j                  | |      S )z*SetNoDataValue(Band self, value) -> CPLErr)r  rH   r  r   Band_SetNoDataValueAsInt64r  Band_SetNoDataValueAsUInt64Band_SetNoDataValue)r   r!   s     r   r  zBand.SetNoDataValuej  sa     ==I///33D%@@==I00044T5AA((u55r$   c                 .    t        j                  | g| S )z5SetNoDataValueAsInt64(Band self, GIntBig v) -> CPLErr)r   rh  r  s     r   SetNoDataValueAsInt64zBand.SetNoDataValueAsInt64w  r  r$   c                 .    t        j                  | g| S )z7SetNoDataValueAsUInt64(Band self, GUIntBig v) -> CPLErr)r   ri  r  s     r   SetNoDataValueAsUInt64zBand.SetNoDataValueAsUInt64{  r  r$   c                 .    t        j                  | g| S )z&DeleteNoDataValue(Band self) -> CPLErr)r   Band_DeleteNoDataValuer  s     r   r  zBand.DeleteNoDataValue  r9  r$   c                 .    t        j                  | g| S )z&GetUnitType(Band self) -> char const *)r   Band_GetUnitTyper  s     r   GetUnitTypezBand.GetUnitType  r  r$   c                 .    t        j                  | g| S )z2SetUnitType(Band self, char const * val) -> CPLErr)r   Band_SetUnitTyper  s     r   SetUnitTypezBand.SetUnitType  r  r$   c                 .    t        j                  | g| S )z,GetRasterCategoryNames(Band self) -> char **)r   Band_GetRasterCategoryNamesr  s     r   GetRasterCategoryNameszBand.GetRasterCategoryNames  r  r$   c                 .    t        j                  | g| S )z:SetRasterCategoryNames(Band self, char ** names) -> CPLErr)r   Band_SetRasterCategoryNamesr  s     r   SetRasterCategoryNameszBand.SetRasterCategoryNames  r  r$   c                 .    t        j                  | g| S )zGetMinimum(Band self))r   Band_GetMinimumr  s     r   
GetMinimumzBand.GetMinimum  r  r$   c                 .    t        j                  | g| S )zGetMaximum(Band self))r   Band_GetMaximumr  s     r   
GetMaximumzBand.GetMaximum  r  r$   c                 .    t        j                  | g| S )zGetOffset(Band self))r   Band_GetOffsetr  s     r   r  zBand.GetOffset  r'  r$   c                 .    t        j                  | g| S )zGetScale(Band self))r   Band_GetScaler  s     r   r"  zBand.GetScale  r  r$   c                 .    t        j                  | g| S )z*SetOffset(Band self, double val) -> CPLErr)r   Band_SetOffsetr  s     r   r(  zBand.SetOffset  r'  r$   c                 .    t        j                  | g| S )z)SetScale(Band self, double val) -> CPLErr)r   Band_SetScaler  s     r   r+  zBand.SetScale  r  r$   c                 .    t        j                  | g| S )z<GetStatistics(Band self, int approx_ok, int force) -> CPLErr)r   Band_GetStatisticsr  s     r   rL  zBand.GetStatistics  r#  r$   c                     t        |      dk(  r
|d   |d<   d}d|v r:|d   dk(  rd|d<   n,|d   dk(  rd|d<   nt        |d   t              rt        d      t	        j
                  | g|i |S )zYComputeStatistics(Band self, bool approx_ok, callback=None, callback_data=None) -> CPLErrr   r   	approx_okr%   FT(approx_ok value should be 0/1/False/True)r#  r   r*  r   r   Band_ComputeStatisticsrC  s      r   rO  zBand.ComputeStatistics  s     t9>"&q'F;D& k"a'&+{#$)&*{#F;/5 JKK++DB4B6BBr$   c                 .    t        j                  | g| S )zVSetStatistics(Band self, double min, double max, double mean, double stddev) -> CPLErr)r   Band_SetStatisticsr  s     r   SetStatisticszBand.SetStatistics  r#  r$   c                 .    t        j                  | g| S )z"GetOverviewCount(Band self) -> int)r   Band_GetOverviewCountr  s     r   GetOverviewCountzBand.GetOverviewCount  r5  r$   c                     t        j                  | g| }t        | d      r/| j                         r| j                         j	                  |       |S )z%GetOverview(Band self, int i) -> BandrT  )r   Band_GetOverviewr   rT  rN  rG  s      r   GetOverviewzBand.GetOverview  F    $$T1D14&4??+<OO++C0 
r$   c                 4    t        j                  | g|i |S )zVChecksum(Band self, int xoff=0, int yoff=0, int * xsize=None, int * ysize=None) -> int)r   Band_ChecksumrC  s      r   ChecksumzBand.Checksum  s    ""49$9&99r$   c                     t        |      dk(  r
|d   |d<   d}d|v r:|d   dk(  rd|d<   n,|d   dk(  rd|d<   nt        |d   t              rt        d      d|v r|d   |d	<   |d= t	        j
                  | g|i |S )
zfComputeRasterMinMax(Band self, bool approx_ok=False, bool can_return_none=False) -> (min, max) or Noner   r   r  r%   FTr  can_return_nullcan_return_none)r#  r   r*  r   r   Band_ComputeRasterMinMaxrC  s      r   ComputeRasterMinMaxzBand.ComputeRasterMinMax  s     t9>"&q'F;D& k"a'&+{#$)&*{#F;/5 JKK &(./@(AF$%()--dDTDVDDr$   c                 .    t        j                  | g| S )z-ComputeBandStats(Band self, int samplestep=1))r   Band_ComputeBandStatsr  s     r   ComputeBandStatszBand.ComputeBandStats  r5  r$   c                 .    t        j                  | g| S )zAFill(Band self, double real_fill, double imag_fill=0.0) -> CPLErr)r   	Band_Fillr  s     r   Fillz	Band.Fill  s    t+d++r$   c                 4    t        j                  | g|i |S )zWriteRaster(Band self, int xoff, int yoff, int xsize, int ysize, GIntBig buf_len, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, GIntBig * buf_pixel_space=None, GIntBig * buf_line_space=None) -> CPLErr)r   Band_WriteRasterrC  s      r   r  zBand.WriteRaster  r,  r$   c                 .    t        j                  | g| S )zFlushCache(Band self))r   Band_FlushCacher  s     r   r  zBand.FlushCache  r  r$   c                 .    t        j                  | g| S )z,GetRasterColorTable(Band self) -> ColorTable)r   Band_GetRasterColorTabler  s     r   GetRasterColorTablezBand.GetRasterColorTable  r=  r$   c                 .    t        j                  | g| S )z&GetColorTable(Band self) -> ColorTable)r   Band_GetColorTabler  s     r   GetColorTablezBand.GetColorTable  r#  r$   c                 .    t        j                  | g| S )z5SetRasterColorTable(Band self, ColorTable arg) -> int)r   Band_SetRasterColorTabler  s     r   rZ   zBand.SetRasterColorTable  r=  r$   c                 .    t        j                  | g| S )z/SetColorTable(Band self, ColorTable arg) -> int)r   Band_SetColorTabler  s     r   SetColorTablezBand.SetColorTable  r#  r$   c                 .    t        j                  | g| S )z0GetDefaultRAT(Band self) -> RasterAttributeTable)r   Band_GetDefaultRATr  s     r   GetDefaultRATzBand.GetDefaultRAT  r#  r$   c                 .    t        j                  | g| S )z;SetDefaultRAT(Band self, RasterAttributeTable table) -> int)r   Band_SetDefaultRATr  s     r   SetDefaultRATzBand.SetDefaultRAT  r#  r$   c                     t        j                  | g| }t        | d      r/| j                         r| j                         j	                  |       |S )zGetMaskBand(Band self) -> BandrT  )r   Band_GetMaskBandr   rT  rN  rG  s      r   GetMaskBandzBand.GetMaskBand  r  r$   c                 .    t        j                  | g| S )zGetMaskFlags(Band self) -> int)r   Band_GetMaskFlagsr  s     r   GetMaskFlagszBand.GetMaskFlags&  r  r$   c                 .    t        j                  | g| S )z/CreateMaskBand(Band self, int nFlags) -> CPLErr)r   Band_CreateMaskBandr  s     r   r  zBand.CreateMaskBand*  rN  r$   c                 .    t        j                  | g| S )zIsMaskBand(Band self) -> bool)r   Band_IsMaskBandr  s     r   
IsMaskBandzBand.IsMaskBand.  r  r$   c                 4    t        j                  | g|i |S )zGetHistogram(Band self, double min=-0.5, double max=255.5, int buckets=256, int include_out_of_range=0, int approx_ok=1, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr)r   Band_GetHistogramrC  s      r   GetHistogramzBand.GetHistogram2  r  r$   c                 4    t        j                  | g|i |S )zGetDefaultHistogram(Band self, double * min_ret=None, double * max_ret=None, int * buckets_ret=None, GUIntBig ** ppanHistogram=None, int force=1, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr)r   Band_GetDefaultHistogramrC  s      r   GetDefaultHistogramzBand.GetDefaultHistogram6  r  r$   c                 .    t        j                  | g| S )zPSetDefaultHistogram(Band self, double min, double max, int buckets_in) -> CPLErr)r   Band_SetDefaultHistogramr  s     r   SetDefaultHistogramzBand.SetDefaultHistogram:  r=  r$   c                 .    t        j                  | g| S )z(HasArbitraryOverviews(Band self) -> bool)r   Band_HasArbitraryOverviewsr  s     r   HasArbitraryOverviewszBand.HasArbitraryOverviews>  r  r$   c                 .    t        j                  | g| S )z&GetCategoryNames(Band self) -> char **)r   Band_GetCategoryNamesr  s     r   GetCategoryNameszBand.GetCategoryNamesB  r5  r$   c                 .    t        j                  | g| S )zASetCategoryNames(Band self, char ** papszCategoryNames) -> CPLErr)r   Band_SetCategoryNamesr  s     r   SetCategoryNameszBand.SetCategoryNamesF  r5  r$   c                 4    t        j                  | g|i |S )zGetVirtualMem(Band self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eBufType, size_t nCacheSize, size_t nPageSizeHint, char ** options=None) -> VirtualMem)r   Band_GetVirtualMemrC  s      r   r  zBand.GetVirtualMemJ  rF  r$   c                 4    t        j                  | g|i |S )zTGetVirtualMemAuto(Band self, GDALRWFlag eRWFlag, char ** options=None) -> VirtualMem)r   Band_GetVirtualMemAutorC  s      r   GetVirtualMemAutozBand.GetVirtualMemAutoN  rl  r$   c                 4    t        j                  | g|i |S )zGetTiledVirtualMem(Band self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nTileXSize, int nTileYSize, GDALDataType eBufType, size_t nCacheSize, char ** options=None) -> VirtualMem)r   Band_GetTiledVirtualMemrC  s      r   r  zBand.GetTiledVirtualMemR  rd  r$   c                 .    t        j                  | g| S )zjGetDataCoverageStatus(Band self, int nXOff, int nYOff, int nXSize, int nYSize, int nMaskFlagStop=0) -> int)r   Band_GetDataCoverageStatusr  s     r   GetDataCoverageStatuszBand.GetDataCoverageStatusV  r  r$   c                 .    t        j                  | g| S )zAdviseRead(Band self, int xoff, int yoff, int xsize, int ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, char ** options=None) -> CPLErr)r   Band_AdviseReadr  s     r   r  zBand.AdviseReadZ  r  r$   c                 .    t        j                  | g| S )zAsMDArray(Band self) -> MDArray)r   Band_AsMDArrayr  s     r   	AsMDArrayzBand.AsMDArray^  r'  r$   c                 .    t        j                  | g| S )z4_EnablePixelTypeSignedByteWarning(Band self, bool b))r   &Band__EnablePixelTypeSignedByteWarningr  s     r   !_EnablePixelTypeSignedByteWarningz&Band._EnablePixelTypeSignedByteWarningb      ;;DH4HHr$   c                 4    t        j                  | g|i |S )al  ReadRaster1(Band self, double xoff, double yoff, double xsize, double ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, GIntBig * buf_pixel_space=None, GIntBig * buf_line_space=None, GDALRIOResampleAlg resample_alg=GRIORA_NearestNeighbour, GDALProgressFunc callback=0, void * callback_data=None, void * inputOutputBuf=None) -> CPLErr)r   Band_ReadRaster1rC  s      r   r  zBand.ReadRaster1f  r,  r$   c                 4    t        j                  | g|i |S )zGReadBlock(Band self, int xoff, int yoff, void * buf_obj=None) -> CPLErr)r   Band_ReadBlockrC  s      r   	ReadBlockzBand.ReadBlockj  s    ##D:4:6::r$   r   Nc                 ~    || j                   }|| j                  }t        j                  | |||||||||	|
|||      S r.   )XSizeYSizer   r  )r   r  r  r  r  r  r  r  r  r   r  rI  rJ  r  s                 r   r#  zBand.ReadRastero  sS     =JJE=JJE%%dD$u&/H&5~&2Hm&-	/ 	/r$   c                     ||}||}t        |      j                  dk(  r$||k(  r||k(  r||	|
| j                  |||      S || j                  }t	        j
                  | |||||||||	|
      S )Nr  )r  r  )r   r   r  r  r   r  )r   r  r  r  r  r  r  r  r  r  r   s              r   r  zBand.WriteRaster  s    
 II 
$$	1)u"49I"~'=??:Dt?DD}}H%%dtUEIy(2 	2r$   c                 H    ddl m} |j                  | |||||||||	|
|      S )r  r   r   r  rI  rJ  )r  r   BandReadAsArray)r   r  r  	win_xsize	win_ysizer  r  r  r  r  rI  rJ  r   s                r   r  zBand.ReadAsArray  s>     	%))$d+4i+4i78D4<9F * H 	Hr$   c           	      >    ddl m} |j                  | ||||||      S )Nr   r   r  )r  r   BandWriteArray)r   r   r  r  r  rI  rJ  r   s           r   r  zBand.WriteArray  s2     	%((udD7C3;8E ) G 	Gr$   r$  c                 ,   ddl m} || j                  }|| j                  }|| j                  }|| j                  }|| j                  }|| j                  |||||||||	|

      }n| j                  |||||||||	|
|      }|j                  |      S a  Return a NumPy array for the band, seen as a virtual memory mapping.
             An element is accessed with array[y][x].
             Any reference to the array must be dropped before the last reference to the
             related dataset is also dropped.
          r   r   )r  r   r  r  r  r  r&  )r   r'  r  r  r  r  r(  r)  r*  r,  r-  rl   r   r.  s                 r   r/  zBand.GetVirtualMemArray  s     ']jje]jjehhh_--gtT5%QY[cemoy  |J  Kj--gtT5%QY[cemoy  |J  LS  Tj..z:
:r$   c                 |    ddl m} || j                  |      }n| j                  ||      }|j                  |      S r  )r  r   r  r&  )r   r'  rl   r   r.  s        r   GetVirtualMemAutoArrayzBand.GetVirtualMemAutoArray  s?     '_11':j11'7Cj..
<
<r$   rP   c                     ddl m} || j                  }|| j                  }|| j                  }|
| j                  |||||||||		      }n| j                  |||||||||	|

      }|j                  |      S )a@  Return a NumPy array for the band, seen as a virtual memory mapping with
             a tile organization.
             An element is accessed with array[tiley][tilex][y][x].
             Any reference to the array must be dropped before the last reference to the
             related dataset is also dropped.
          r   r   )r  r   r  r  r  r  r&  )r   r'  r  r  r  r  r1  r2  r*  r,  rl   r   r.  s                r   r4  zBand.GetTiledVirtualMemArray  s     ']jje]jjeh_227D$uV_ajlt  wA  Bj227D$uV_ajlt  wA  CJ  Kj..
<
<r$   )r  CPLErrr  )Vr   r   r7   r8   r   r   r   r   r   r   Band_XSize_getr  Band_YSize_getr  Band_DataType_getr  rL  rO  r  rT  rW  rZ  r]  r`  r  r  r  r  rl  rn  r  rs  rv  ry  r|  r  r  r  r"  r(  r+  rL  rO  r  r  r  r  r  r  r  r  r  r  r  rZ   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rH   r_  r#  r  r  r`  r/  r  r4  r%   r$   r   rF  rF  )  sr   3-/IOdeG7HU))/ABEU))/ABE//5STH2/4:>D>D	/=>	6=>933>>2210105C(58:E28,=2;5;555462>E;=88?CD=21I=;
  at4!TD#' ) A A !%/* >B9=22  !qDD"dT4!*!B!B!"&	H" &'Q ) A A !%	G *3):):!%TD4$((81#'	;6 .7->-> = /8.?.?aa#'tsc&**:D=r$   rF  c                   v    e Zd ZdZ ed d d      ZeZd Ze	j                  Zd Zd Zd	 Zd
 Zd Zd Zd Zy)rS   z(Proxy of C++ GDALColorTableShadow class.c                 6    | j                   j                         S r.   r  r  s    r   r  zColorTable.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zColorTable.<lambda>  r  r$   r  r  c                 V    t        j                  | t        j                  |i |       y)zJ__init__(ColorTable self, GDALPaletteInterp palette=GPI_RGB) -> ColorTableN)r   ColorTable_swiginitnew_ColorTablerC  s      r   r   zColorTable.__init__   s"    !!$(<(<d(Mf(MNr$   c                 .    t        j                  | g| S )z$Clone(ColorTable self) -> ColorTable)r   ColorTable_Cloner  s     r   ClonezColorTable.Clone  r  r$   c                 .    t        j                  | g| S )z>GetPaletteInterpretation(ColorTable self) -> GDALPaletteInterp)r   #ColorTable_GetPaletteInterpretationr  s     r   GetPaletteInterpretationz#ColorTable.GetPaletteInterpretation	  r  r$   c                 .    t        j                  | g| S )z GetCount(ColorTable self) -> int)r   ColorTable_GetCountr  s     r   GetCountzColorTable.GetCount  rN  r$   c                 .    t        j                  | g| S )z7GetColorEntry(ColorTable self, int entry) -> ColorEntry)r   ColorTable_GetColorEntryr  s     r   GetColorEntryzColorTable.GetColorEntry  r=  r$   c                 .    t        j                  | g| S )zHGetColorEntryAsRGB(ColorTable self, int entry, ColorEntry centry) -> int)r   ColorTable_GetColorEntryAsRGBr  s     r   GetColorEntryAsRGBzColorTable.GetColorEntryAsRGB  rv  r$   c                 .    t        j                  | g| S )z<SetColorEntry(ColorTable self, int entry, ColorEntry centry))r   ColorTable_SetColorEntryr  s     r   SetColorEntryzColorTable.SetColorEntry  r=  r$   c                 .    t        j                  | g| S )zlCreateColorRamp(ColorTable self, int nStartIndex, ColorEntry startcolor, int nEndIndex, ColorEntry endcolor))r   ColorTable_CreateColorRampr  s     r   CreateColorRampzColorTable.CreateColorRamp  r  r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_ColorTabler  r  r  r  r  r  r  r!  r%   r$   r   rS   rS     sT    3-/IOdeGHO ..3F6;@;=r$   rS   c                       e Zd ZdZ ed d d      ZeZd Ze	j                  Zd Zd Zd	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d dZ"d!dZ#y)"RasterAttributeTablez2Proxy of C++ GDALRasterAttributeTableShadow class.c                 6    | j                   j                         S r.   r  r  s    r   r  zRasterAttributeTable.<lambda>&  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zRasterAttributeTable.<lambda>&  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)z;__init__(RasterAttributeTable self) -> RasterAttributeTableN)r   RasterAttributeTable_swiginitnew_RasterAttributeTabler  s     r   r   zRasterAttributeTable.__init__)      ++D%2P2PRV2WXr$   c                 .    t        j                  | g| S )z8Clone(RasterAttributeTable self) -> RasterAttributeTable)r   RasterAttributeTable_Cloner  s     r   r  zRasterAttributeTable.Clone.  r  r$   c                 .    t        j                  | g| S )z0GetColumnCount(RasterAttributeTable self) -> int)r   #RasterAttributeTable_GetColumnCountr  s     r   GetColumnCountz#RasterAttributeTable.GetColumnCount2  r  r$   c                 .    t        j                  | g| S )zAGetNameOfCol(RasterAttributeTable self, int iCol) -> char const *)r   !RasterAttributeTable_GetNameOfColr  s     r   GetNameOfColz!RasterAttributeTable.GetNameOfCol6  r  r$   c                 .    t        j                  | g| S )zGGetUsageOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldUsage)r   "RasterAttributeTable_GetUsageOfColr  s     r   GetUsageOfColz"RasterAttributeTable.GetUsageOfCol:  r  r$   c                 .    t        j                  | g| S )zEGetTypeOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldType)r   !RasterAttributeTable_GetTypeOfColr  s     r   GetTypeOfColz!RasterAttributeTable.GetTypeOfCol>  r  r$   c                 .    t        j                  | g| S )zIGetColOfUsage(RasterAttributeTable self, GDALRATFieldUsage eUsage) -> int)r   "RasterAttributeTable_GetColOfUsager  s     r   GetColOfUsagez"RasterAttributeTable.GetColOfUsageB  r  r$   c                 .    t        j                  | g| S )z-GetRowCount(RasterAttributeTable self) -> int)r    RasterAttributeTable_GetRowCountr  s     r   GetRowCountz RasterAttributeTable.GetRowCountF  r1  r$   c                 .    t        j                  | g| S )zOGetValueAsString(RasterAttributeTable self, int iRow, int iCol) -> char const *)r   %RasterAttributeTable_GetValueAsStringr  s     r   GetValueAsStringz%RasterAttributeTable.GetValueAsStringJ      ::4G$GGr$   c                 .    t        j                  | g| S )zCGetValueAsInt(RasterAttributeTable self, int iRow, int iCol) -> int)r   "RasterAttributeTable_GetValueAsIntr  s     r   GetValueAsIntz"RasterAttributeTable.GetValueAsIntN  r  r$   c                 .    t        j                  | g| S )zIGetValueAsDouble(RasterAttributeTable self, int iRow, int iCol) -> double)r   %RasterAttributeTable_GetValueAsDoubler  s     r   GetValueAsDoublez%RasterAttributeTable.GetValueAsDoubleR  rB  r$   c                 .    t        j                  | g| S )zVSetValueAsString(RasterAttributeTable self, int iRow, int iCol, char const * pszValue))r   %RasterAttributeTable_SetValueAsStringr  s     r   SetValueAsStringz%RasterAttributeTable.SetValueAsStringV  rB  r$   c                 .    t        j                  | g| S )zHSetValueAsInt(RasterAttributeTable self, int iRow, int iCol, int nValue))r   "RasterAttributeTable_SetValueAsIntr  s     r   SetValueAsIntz"RasterAttributeTable.SetValueAsIntZ  r  r$   c                 .    t        j                  | g| S )zOSetValueAsDouble(RasterAttributeTable self, int iRow, int iCol, double dfValue))r   %RasterAttributeTable_SetValueAsDoubler  s     r   SetValueAsDoublez%RasterAttributeTable.SetValueAsDouble^  rB  r$   c                 .    t        j                  | g| S )z2SetRowCount(RasterAttributeTable self, int nCount))r    RasterAttributeTable_SetRowCountr  s     r   SetRowCountz RasterAttributeTable.SetRowCountb  r1  r$   c                 .    t        j                  | g| S )zvCreateColumn(RasterAttributeTable self, char const * pszName, GDALRATFieldType eType, GDALRATFieldUsage eUsage) -> int)r   !RasterAttributeTable_CreateColumnr  s     r   CreateColumnz!RasterAttributeTable.CreateColumnf  r  r$   c                 .    t        j                  | g| S )z3GetLinearBinning(RasterAttributeTable self) -> bool)r   %RasterAttributeTable_GetLinearBinningr  s     r   GetLinearBinningz%RasterAttributeTable.GetLinearBinningj  rB  r$   c                 .    t        j                  | g| S )zVSetLinearBinning(RasterAttributeTable self, double dfRow0Min, double dfBinSize) -> int)r   %RasterAttributeTable_SetLinearBinningr  s     r   SetLinearBinningz%RasterAttributeTable.SetLinearBinningn  rB  r$   c                 .    t        j                  | g| S )z?GetRowOfValue(RasterAttributeTable self, double dfValue) -> int)r   "RasterAttributeTable_GetRowOfValuer  s     r   GetRowOfValuez"RasterAttributeTable.GetRowOfValuer  r  r$   c                 .    t        j                  | g| S )z9ChangesAreWrittenToFile(RasterAttributeTable self) -> int)r   ,RasterAttributeTable_ChangesAreWrittenToFiler  s     r   ChangesAreWrittenToFilez,RasterAttributeTable.ChangesAreWrittenToFilev  s    AA$NNNr$   c                 .    t        j                  | g| S )z'DumpReadable(RasterAttributeTable self))r   !RasterAttributeTable_DumpReadabler  s     r   DumpReadablez!RasterAttributeTable.DumpReadablez  r  r$   c                 .    t        j                  | g| S )zDSetTableType(RasterAttributeTable self, GDALRATTableType eTableType))r   !RasterAttributeTable_SetTableTyper  s     r   SetTableTypez!RasterAttributeTable.SetTableType~  r  r$   c                 .    t        j                  | g| S )z;GetTableType(RasterAttributeTable self) -> GDALRATTableType)r   !RasterAttributeTable_GetTableTyper  s     r   GetTableTypez!RasterAttributeTable.GetTableType  r  r$   c                 6    ddl m} |j                  | |||      S rd  )r  r   RATWriteArray)r   r   fieldrn  r   s        r   r  zRasterAttributeTable.WriteArray  s    $''eUEBBr$   Nc                 6    ddl m} |j                  | |||      S rd  )r  r   RATReadArray)r   ro  rn  lengthr   s        r   r  z RasterAttributeTable.ReadAsArray  s    $&&tUE6BBr$   r  )r   N)$r   r   r7   r8   r   r   r   r   r   r   delete_RasterAttributeTabler  r  r/  r2  r5  r8  r;  r>  rA  rE  rH  rK  rN  rQ  rT  rW  rZ  r]  r`  rc  rf  ri  rl  r  r  r%   r$   r   r$  r$  #  s    =-/IOdeGHY 88=FDEDECHEHHEHCDHHEODDDC
Cr$   r$  c                   ^    e Zd ZdZ ed d d      Zd ZeZe	j                  Zd Zd Zd	 Zy
)SubdatasetInfoz,Proxy of C++ GDALSubdatasetInfoShadow class.c                 6    | j                   j                         S r.   r  r  s    r   r  zSubdatasetInfo.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zSubdatasetInfo.<lambda>  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zSubdatasetInfo.__init__  rD  r$   c                 .    t        j                  | g| S )z>GetPathComponent(SubdatasetInfo self) -> retStringAndCPLFree *)r   SubdatasetInfo_GetPathComponentr  s     r   GetPathComponentzSubdatasetInfo.GetPathComponent  r  r$   c                 .    t        j                  | g| S )zDGetSubdatasetComponent(SubdatasetInfo self) -> retStringAndCPLFree *)r   %SubdatasetInfo_GetSubdatasetComponentr  s     r   GetSubdatasetComponentz%SubdatasetInfo.GetSubdatasetComponent  rB  r$   c                 .    t        j                  | g| S )z^ModifyPathComponent(SubdatasetInfo self, char const * pszNewFileName) -> retStringAndCPLFree *)r   "SubdatasetInfo_ModifyPathComponentr  s     r   ModifyPathComponentz"SubdatasetInfo.ModifyPathComponent  r  r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_SubdatasetInfor  r{  r~  r  r%   r$   r   ru  ru    s>    7-/IOdeG7H22BHEr$   ru  c                  &    t        j                  |  S )zIGetSubdatasetInfo(char const * pszFileName) -> GDALSubdatasetInfoShadow *)r   GetSubdatasetInforr   s    r   r  r    r  r$   c                       e Zd ZdZ ed d d      ZeZd Ze	j                  Zd Zd Zd	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!y)Relationshipz*Proxy of C++ GDALRelationshipShadow class.c                 6    | j                   j                         S r.   r  r  s    r   r  zRelationship.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zRelationship.<lambda>  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)z__init__(Relationship self, char const * name, char const * leftTableName, char const * rightTableName, GDALRelationshipCardinality cardinality) -> RelationshipN)r   Relationship_swiginitnew_Relationshipr  s     r   r   zRelationship.__init__  s    ##D%*@*@$*GHr$   c                 .    t        j                  | g| S )z*GetName(Relationship self) -> char const *)r   Relationship_GetNamer  s     r   rL  zRelationship.GetName  r  r$   c                 .    t        j                  | g| S )z@GetCardinality(Relationship self) -> GDALRelationshipCardinality)r   Relationship_GetCardinalityr  s     r   GetCardinalityzRelationship.GetCardinality  r  r$   c                 .    t        j                  | g| S )z3GetLeftTableName(Relationship self) -> char const *)r   Relationship_GetLeftTableNamer  s     r   GetLeftTableNamezRelationship.GetLeftTableName  rv  r$   c                 .    t        j                  | g| S )z4GetRightTableName(Relationship self) -> char const *)r   Relationship_GetRightTableNamer  s     r   GetRightTableNamezRelationship.GetRightTableName  r  r$   c                 .    t        j                  | g| S )z6GetMappingTableName(Relationship self) -> char const *)r    Relationship_GetMappingTableNamer  s     r   GetMappingTableNamez Relationship.GetMappingTableName  r1  r$   c                 .    t        j                  | g| S )z<SetMappingTableName(Relationship self, char const * pszName))r    Relationship_SetMappingTableNamer  s     r   SetMappingTableNamez Relationship.SetMappingTableName  r1  r$   c                 .    t        j                  | g| S )z0GetLeftTableFields(Relationship self) -> char **)r   Relationship_GetLeftTableFieldsr  s     r   GetLeftTableFieldszRelationship.GetLeftTableFields  r  r$   c                 .    t        j                  | g| S )z1GetRightTableFields(Relationship self) -> char **)r    Relationship_GetRightTableFieldsr  s     r   GetRightTableFieldsz Relationship.GetRightTableFields  r1  r$   c                 .    t        j                  | g| S )z6SetLeftTableFields(Relationship self, char ** pFields))r   Relationship_SetLeftTableFieldsr  s     r   SetLeftTableFieldszRelationship.SetLeftTableFields  r  r$   c                 .    t        j                  | g| S )z7SetRightTableFields(Relationship self, char ** pFields))r    Relationship_SetRightTableFieldsr  s     r   SetRightTableFieldsz Relationship.SetRightTableFields  r1  r$   c                 .    t        j                  | g| S )z7GetLeftMappingTableFields(Relationship self) -> char **)r   &Relationship_GetLeftMappingTableFieldsr  s     r   GetLeftMappingTableFieldsz&Relationship.GetLeftMappingTableFields  r  r$   c                 .    t        j                  | g| S )z8GetRightMappingTableFields(Relationship self) -> char **)r   'Relationship_GetRightMappingTableFieldsr  s     r   GetRightMappingTableFieldsz'Relationship.GetRightMappingTableFields      <<TIDIIr$   c                 .    t        j                  | g| S )z=SetLeftMappingTableFields(Relationship self, char ** pFields))r   &Relationship_SetLeftMappingTableFieldsr  s     r   SetLeftMappingTableFieldsz&Relationship.SetLeftMappingTableFields  r  r$   c                 .    t        j                  | g| S )z>SetRightMappingTableFields(Relationship self, char ** pFields))r   'Relationship_SetRightMappingTableFieldsr  s     r   SetRightMappingTableFieldsz'Relationship.SetRightMappingTableFields  r  r$   c                 .    t        j                  | g| S )z2GetType(Relationship self) -> GDALRelationshipType)r   Relationship_GetTyper  s     r   r  zRelationship.GetType  r  r$   c                 .    t        j                  | g| S )z5SetType(Relationship self, GDALRelationshipType type))r   Relationship_SetTyper  s     r   SetTypezRelationship.SetType  r  r$   c                 .    t        j                  | g| S )z6GetForwardPathLabel(Relationship self) -> char const *)r    Relationship_GetForwardPathLabelr  s     r   GetForwardPathLabelz Relationship.GetForwardPathLabel  r1  r$   c                 .    t        j                  | g| S )z=SetForwardPathLabel(Relationship self, char const * pszLabel))r    Relationship_SetForwardPathLabelr  s     r   SetForwardPathLabelz Relationship.SetForwardPathLabel  r1  r$   c                 .    t        j                  | g| S )z7GetBackwardPathLabel(Relationship self) -> char const *)r   !Relationship_GetBackwardPathLabelr  s     r   GetBackwardPathLabelz!Relationship.GetBackwardPathLabel  r  r$   c                 .    t        j                  | g| S )z>SetBackwardPathLabel(Relationship self, char const * pszLabel))r   !Relationship_SetBackwardPathLabelr  s     r   SetBackwardPathLabelz!Relationship.SetBackwardPathLabel  r  r$   c                 .    t        j                  | g| S )z6GetRelatedTableType(Relationship self) -> char const *)r    Relationship_GetRelatedTableTyper  s     r   GetRelatedTableTypez Relationship.GetRelatedTableType
  r1  r$   c                 .    t        j                  | g| S )z<SetRelatedTableType(Relationship self, char const * pszType))r    Relationship_SetRelatedTableTyper  s     r   SetRelatedTableTypez Relationship.SetRelatedTableType  r1  r$   N)"r   r   r7   r8   r   r   r   r   r   r   delete_Relationshipr  rL  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    s    5-/IOdeGHI 007>@ACCBCBCIJIJ77CCDDCCr$   r  c                  ,    t        j                  | i |S )z\TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int)r   TermProgress_nocbr  s     r   r  r        ""D3F33r$   c                  ,    t        j                  | i |S )zComputeMedianCutPCT(Band red, Band green, Band blue, int num_colors, ColorTable colors, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   rT   r  s     r   rT   rT         $$d5f55r$   c                  ,    t        j                  | i |S )zDitherRGB2PCT(Band red, Band green, Band blue, Band target, ColorTable colors, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   r[   r  s     r   r[   r[     s    ///r$   c                  ,    t        j                  | i |S )a   ReprojectImage(Dataset src_ds, Dataset dst_ds, char const * src_wkt=None, char const * dst_wkt=None, GDALResampleAlg eResampleAlg=GRA_NearestNeighbour, double WarpMemoryLimit=0.0, double maxerror=0.0, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> CPLErr)r   ReprojectImager  s     r   r  r  #      000r$   c                  ,    t        j                  | i |S )zComputeProximity(Band srcBand, Band proximityBand, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   ComputeProximityr  s     r   r  r  '      !!42622r$   c                  ,    t        j                  | i |S )zRasterizeLayer(Dataset dataset, int bands, Layer layer, void * pfnTransformer=None, void * pTransformArg=None, int burn_values=0, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   RasterizeLayerr  s     r   r  r  +  r  r$   c                  ,    t        j                  | i |S )zPolygonize(Band srcBand, Band maskBand, Layer outLayer, int iPixValField, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   
Polygonizer  s     r   r  r  /      T,V,,r$   c                  ,    t        j                  | i |S )zFPolygonize(Band srcBand, Band maskBand, Layer outLayer, int iPixValField, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   FPolygonizer  s     r   r  r  3      d-f--r$   c                  ,    t        j                  | i |S )zFillNodata(Band targetBand, Band maskBand, double maxSearchDist, int smoothingIterations, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   
FillNodatar  s     r   r  r  7  r  r$   c                  ,    t        j                  | i |S )zSieveFilter(Band srcBand, Band maskBand, Band dstBand, int threshold, int connectedness=4, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   SieveFilterr  s     r   r  r  ;  r  r$   c                  ,    t        j                  | i |S )zRegenerateOverviews(Band srcBand, int overviewBandCount, char const * resampling="average", GDALProgressFunc callback=0, void * callback_data=None) -> int)r   RegenerateOverviewsr  s     r   r  r  ?  r  r$   c                  ,    t        j                  | i |S )zRegenerateOverview(Band srcBand, Band overviewBand, char const * resampling="average", GDALProgressFunc callback=0, void * callback_data=None) -> int)r   RegenerateOverviewr  s     r   r  r  C  s    ##T4V44r$   c                  ,    t        j                  | i |S )zContourGenerate(Band srcBand, double contourInterval, double contourBase, int fixedLevelCount, int useNoData, double noDataValue, Layer dstLayer, int idField, int elevField, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   ContourGenerater  s     r   r  r  G  s      $1&11r$   c                  ,    t        j                  | i |S )zContourGenerateEx(Band srcBand, Layer dstLayer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   ContourGenerateExr  s     r   r  r  K  r  r$   c                  ,    t        j                  | i |S )a  ViewshedGenerate(Band srcBand, char const * driverName, char const * targetRasterName, char ** creationOptions, double observerX, double observerY, double observerHeight, double targetHeight, double visibleVal, double invisibleVal, double outOfRangeVal, double noDataVal, double dfCurvCoeff, GDALViewshedMode mode, double maxDistance, GDALProgressFunc callback=0, void * callback_data=None, GDALViewshedOutputType heightMode=GVOT_NORMAL, char ** options=None) -> Dataset)r   ViewshedGenerater  s     r   r  r  ]  r  r$   c                  &    t        j                  |  S )zAutoCreateWarpedVRT(Dataset src_ds, char const * src_wkt=None, char const * dst_wkt=None, GDALResampleAlg eResampleAlg=GRA_NearestNeighbour, double maxerror=0.0) -> Dataset)r   AutoCreateWarpedVRTrr   s    r   r  r  a  rw   r$   c                  &    t        j                  |  S )z`CreatePansharpenedVRT(char const * pszXML, Band panchroBand, int nInputSpectralBands) -> Dataset)r   CreatePansharpenedVRTrr   s    r   r  r  e  r  r$   c                   ^    e Zd ZdZ ed d d      Zd ZeZe	j                  Zd Zd Zd	 Zy
)GDALTransformerInfoShadowz-Proxy of C++ GDALTransformerInfoShadow class.c                 6    | j                   j                         S r.   r  r  s    r   r  z"GDALTransformerInfoShadow.<lambda>k  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  z"GDALTransformerInfoShadow.<lambda>k  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   z"GDALTransformerInfoShadow.__init__m  rD  r$   c                 .    t        j                  | g| S )z
        TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double [3] inout) -> int
        TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double x, double y, double z=0.0) -> int
        )r   (GDALTransformerInfoShadow_TransformPointr  s     r   TransformPointz(GDALTransformerInfoShadow.TransformPointr  s    
 ==dJTJJr$   c                 .    t        j                  | g| S )zQTransformPoints(GDALTransformerInfoShadow self, int bDstToSrc, int nCount) -> int)r   )GDALTransformerInfoShadow_TransformPointsr  s     r   TransformPointsz)GDALTransformerInfoShadow.TransformPointsy  s    >>tKdKKr$   c                 4    t        j                  | g|i |S )zTransformGeolocations(GDALTransformerInfoShadow self, Band xBand, Band yBand, Band zBand, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> int)r   /GDALTransformerInfoShadow_TransformGeolocationsrC  s      r   TransformGeolocationsz/GDALTransformerInfoShadow.TransformGeolocations}  s    DDT[D[TZ[[r$   N)r   r   r7   r8   r   r   r   r   r   r    delete_GDALTransformerInfoShadowr  r  r  r	  r%   r$   r   r  r  h  s>    8-/IOdeG7H==KL\r$   r  c                  &    t        j                  |  S )zSTransformer(Dataset src, Dataset dst, char ** options) -> GDALTransformerInfoShadow)r   Transformerrr   s    r   r	  r	    r  r$   c                   j   e Zd ZdZ ed d d      Zd ZeZ ee	j                  d      Z ee	j                  d      Z ee	j                  d	      Z ee	j                   d
      Z ee	j$                  d      Z ee	j(                  d      Ze	j,                  Zd Z ee	j2                  d      Zy)SuggestedWarpOutputResz*Proxy of C++ SuggestedWarpOutputRes class.c                 6    | j                   j                         S r.   r  r  s    r   r  zSuggestedWarpOutputRes.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zSuggestedWarpOutputRes.<lambda>  r  r$   r  r  c                     t        d      rA  rB  rC  s      r   r   zSuggestedWarpOutputRes.__init__  rD  r$   zwidth : intzheight : intzxmin : doublezymin : doublezxmax : doublezymax : doublec                 .    t        j                  | g| S )z,GetGeotransform(SuggestedWarpOutputRes self))r   &SuggestedWarpOutputRes_GetGeotransformr  s     r   GetGeotransformz&SuggestedWarpOutputRes.GetGeotransform  r  r$   zgeotransform : double[6]N)r   r   r7   r8   r   r   r   r   r   r    SuggestedWarpOutputRes_width_getr/  !SuggestedWarpOutputRes_height_getr0  SuggestedWarpOutputRes_xmin_getxminSuggestedWarpOutputRes_ymin_getyminSuggestedWarpOutputRes_xmax_getxmaxSuggestedWarpOutputRes_ymax_getymaxdelete_SuggestedWarpOutputResr  r	  r	  geotransformr%   r$   r   r	  r	    s    5-/IOdeG7HU;;ASTEe==CVWFE99?STDE99?STDE99?STDE99?STD::I EHHNmnLr$   r	  c                  &    t        j                  |  S )zpSuggestedWarpOutputFromTransformer(Dataset src, GDALTransformerInfoShadow transformer) -> SuggestedWarpOutputRes)r   "SuggestedWarpOutputFromTransformerrr   s    r   r	  r	    r   r$   c                  &    t        j                  |  S )zVSuggestedWarpOutputFromOptions(Dataset src, char ** options) -> SuggestedWarpOutputRes)r   SuggestedWarpOutputFromOptionsrr   s    r   r	  r	    s    //66r$   c                  p    t        | d   t              rt        j                  |  S t        j                  |  S )a  
    Suggest output dataset size and extent.

    SuggestedWarpOutput(src: Dataset, transformer: Transformer) -> SuggestedWarpOutputRes
    SuggestedWarpOutput(src: Dataset, options: list[str]) -> SuggestedWarpOutputRes

    This function is used to suggest the size, and georeferenced extents
    appropriate given the indicated transformation and input file.  It walks
    the edges of the input file (approximately 20 sample points along each
    edge) transforming into output coordinates in order to get an extents box.

    Then a resolution is computed with the intent that the length of the
    distance from the top left corner of the output imagery to the bottom right
    corner would represent the same number of pixels as in the source image.
    Note that if the image is somewhat rotated the diagonal taken isn't of the
    whole output bounding rectangle, but instead of the locations where the
    top/left and bottom/right corners transform.  The output pixel size is
    always square.  This is intended to approximately preserve the resolution
    of the input data in the output file.

    There are 2 forms of this method:

    - one that takes the output of gdal.Transformer(src, dst, options) as the second argument.
      The src argument of the gdal.Transformer() call should nominally be the src
      argument passed to this function.
      The dst argument of the gdal.Transformer() call should nominally be None
      The third argument of the gdal.Transformer() call should be a list of strings,
      that are transforming options accepted by
      :cpp:func:`GDALCreateGenImgProjTransformer2` (e.g ``DST_SRS``)

    - one that takes a list of strings as the second argument. Those strings
      are the transforming options accepted by
      :cpp:func:`GDALCreateGenImgProjTransformer2` (e.g ``DST_SRS``)

    Parameters
    ----------

    src: Dataset
        Source dataset
    transformer: Transformer
        The return value of gdal.Transformer(src, None, options)
        (exclusive with below options parameter)
    options: list[str]
        List of strings that are the transforming options accepted by
        :cpp:func:`GDALCreateGenImgProjTransformer2` (e.g ``DST_SRS``)
        (exclusive with above transformer parameter)

    Returns
    -------

    A SuggestedWarpOutputRes class instance with the following members:
    - width: number of pixels in width of the output dataset
    - height: number of pixels in height of the output dataset
    - xmin: minimum value of the georeferenced X coordinates
    - ymin: maximum value of the georeferenced Y coordinates
    - xmax: minimum value of the georeferenced X coordinates
    - ymax: maximum value of the georeferenced Y coordinates
    - geotransform: affine geotransformation matrix (6 values)

    Example
    -------

    >>> ds = gdal.Open("my.tif")
    ... res = gdal.SuggestedWarpOutput(ds, ["DST_SRS=EPSG:4326"])
    ... print(res.width, res.height, res.xmin, res.ymin, res.xmax, res.ymax, res.geotransform)

    r   )r   r  r   r	  r	  rr   s    r   SuggestedWarpOutputr	    s6    H $q'4577>>33T::r$   c                  ,    t        j                  | i |S )z_ApplyVerticalShiftGrid(Dataset src_ds, Dataset grid_ds, bool inverse=False, double srcUnitToMeter=1.0, double dstUnitToMeter=1.0, char ** options=None) -> Dataset)r   r  r  s     r   r  r    s    (($9&99r$   c                  &    t        j                  |  S )zMApplyGeoTransform(double [6] padfGeoTransform, double dfPixel, double dfLine))r   ApplyGeoTransformrr   s    r   r!	  r!	    r  r$   c                  &    t        j                  |  S )z0InvGeoTransform(double [6] gt_in) -> RETURN_NONE)r   InvGeoTransformrr   s    r   r#	  r#	    r  r$   c                  &    t        j                  |  S )z?VersionInfo(char const * request="VERSION_NUM") -> char const *)r   VersionInforr   s    r   r%	  r%	     r  r$   c                  &    t        j                  |  S )zAllRegister())r   AllRegisterrr   s    r   r'	  r'	    r  r$   c                  &    t        j                  |  S )zGDALDestroyDriverManager())r   GDALDestroyDriverManagerrr   s    r   r)	  r)	    r  r$   c                  &    t        j                  |  S )zGetCacheMax() -> GIntBig)r   GetCacheMaxrr   s    r   r+	  r+	    r  r$   c                  &    t        j                  |  S )zGetCacheUsed() -> GIntBig)r   GetCacheUsedrr   s    r   r-	  r-	    r3  r$   c                  &    t        j                  |  S )zSetCacheMax(GIntBig nBytes))r   SetCacheMaxrr   s    r   r/	  r/	    r  r$   c                  &    t        j                  |  S )z.GetDataTypeSize(GDALDataType eDataType) -> int)r   rC  rr   s    r   rC  rC    r  r$   c                  &    t        j                  |  S )z0DataTypeIsComplex(GDALDataType eDataType) -> int)r   DataTypeIsComplexrr   s    r   r2	  r2	    r  r$   c                  &    t        j                  |  S )z7GetDataTypeName(GDALDataType eDataType) -> char const *)r   r   rr   s    r   r   r      r  r$   c                  &    t        j                  |  S )z?GetDataTypeByName(char const * pszDataTypeName) -> GDALDataType)r   GetDataTypeByNamerr   s    r   r5	  r5	  $  r  r$   c                  &    t        j                  |  S )z=DataTypeUnion(GDALDataType a, GDALDataType b) -> GDALDataType)r   DataTypeUnionrr   s    r   r7	  r7	  (  r  r$   c                  &    t        j                  |  S )zHGetColorInterpretationName(GDALColorInterp eColorInterp) -> char const *)r   GetColorInterpretationNamerr   s    r   r9	  r9	  ,  r   r$   c                  &    t        j                  |  S )zNGetPaletteInterpretationName(GDALPaletteInterp ePaletteInterp) -> char const *)r   GetPaletteInterpretationNamerr   s    r   r;	  r;	  0      --t44r$   c                  &    t        j                  |  S )zDDecToDMS(double arg1, char const * arg2, int arg3=2) -> char const *)r   DecToDMSrr   s    r   r>	  r>	  4  r  r$   c                  &    t        j                  |  S )z)PackedDMSToDec(double dfPacked) -> double)r   PackedDMSToDecrr   s    r   r@	  r@	  8  r|   r$   c                  &    t        j                  |  S )z&DecToPackedDMS(double dfDec) -> double)r   DecToPackedDMSrr   s    r   rB	  rB	  <  r|   r$   c                  &    t        j                  |  S )z3ParseXMLString(char * pszXMLString) -> CPLXMLNode *)r   ParseXMLStringrr   s    r   rD	  rD	  @  r|   r$   c                  &    t        j                  |  S )z?SerializeXMLTree(CPLXMLNode * xmlnode) -> retStringAndCPLFree *)r   SerializeXMLTreerr   s    r   rF	  rF	  D  rt   r$   c                  &    t        j                  |  S )zTGetJPEG2000Structure(char const * pszFilename, char ** options=None) -> CPLXMLNode *)r   GetJPEG2000Structurerr   s    r   rH	  rH	  H  r;  r$   c                  &    t        j                  |  S )zeGetJPEG2000StructureAsString(char const * pszFilename, char ** options=None) -> retStringAndCPLFree *)r   GetJPEG2000StructureAsStringrr   s    r   rJ	  rJ	  L  r<	  r$   c                  &    t        j                  |  S )zHasTriangulation() -> int)r   HasTriangulationrr   s    r   rL	  rL	  P  rt   r$   c                  &    t        j                  |  S )zGetDriverCount() -> int)r   GetDriverCountrr   s    r   rN	  rN	  T  r|   r$   c                  &    t        j                  |  S )z,GetDriverByName(char const * name) -> Driver)r   rV   rr   s    r   rV   rV   X  r  r$   c                  &    t        j                  |  S )zGetDriver(int i) -> Driver)r   rK  rr   s    r   rK  rK  \  r   r$   c                  :    t                t        j                  |  S )zGOpen(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset)r   r   rR   rr   s    r   rR   rR   `  s     01 ::tr$   c                  @    t                t        j                  | i |S )zOpenEx(char const * utf8_path, unsigned int nOpenFlags=0, char ** allowed_drivers=None, char ** open_options=None, char ** sibling_files=None) -> Dataset)r   r   r   r  s     r   r   r   h  s      01 <<(((r$   c                  :    t                t        j                  |  S )zMOpenShared(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset)r   r   
OpenSharedrr   s    r   rT	  rT	  p  s     01 T""r$   c                  &    t        j                  |  S )zLIdentifyDriver(char const * utf8_path, char ** papszSiblings=None) -> Driver)r   IdentifyDriverrr   s    r   rV	  rV	  x  r|   r$   c                  ,    t        j                  | i |S )zIdentifyDriverEx(char const * utf8_path, unsigned int nIdentifyFlags=0, char ** allowed_drivers=None, char ** sibling_files=None) -> Driver)r   IdentifyDriverExr  s     r   rX	  rX	  |  r  r$   c                  &    t        j                  |  S )zEGeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **)r   GeneralCmdLineProcessorrr   s    r   rZ	  rZ	    r  r$   RELEASE_NAMEc                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)r   z#Proxy of C++ GDALInfoOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  zGDALInfoOptions.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zGDALInfoOptions.<lambda>  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)zB__init__(GDALInfoOptions self, char ** options) -> GDALInfoOptionsN)r   GDALInfoOptions_swiginitnew_GDALInfoOptionsr  s     r   r   zGDALInfoOptions.__init__      &&tU-F-F-MNr$   N)r   r   r7   r8   r   r   r   r   r   r   delete_GDALInfoOptionsr  r%   r$   r   r   r     /    .-/IOdeGHO 33r$   r   c                  &    t        j                  |  S )zTInfoInternal(Dataset hDataset, GDALInfoOptions infoOptions) -> retStringAndCPLFree *)r   r   rr   s    r   r   r     r3  r$   c                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)r   z)Proxy of C++ GDALVectorInfoOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  zGDALVectorInfoOptions.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zGDALVectorInfoOptions.<lambda>  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)zN__init__(GDALVectorInfoOptions self, char ** options) -> GDALVectorInfoOptionsN)r   GDALVectorInfoOptions_swiginitnew_GDALVectorInfoOptionsr  s     r   r   zGDALVectorInfoOptions.__init__  s    ,,T53R3RTX3YZr$   N)r   r   r7   r8   r   r   r   r   r   r   delete_GDALVectorInfoOptionsr  r%   r$   r   r   r     s/    4-/IOdeGH[ 99r$   r   c                  &    t        j                  |  S )z`VectorInfoInternal(Dataset hDataset, GDALVectorInfoOptions infoOptions) -> retStringAndCPLFree *)r   r   rr   s    r   r   r     r   r$   c                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)r   z+Proxy of C++ GDALMultiDimInfoOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  z GDALMultiDimInfoOptions.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  z GDALMultiDimInfoOptions.<lambda>  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)zR__init__(GDALMultiDimInfoOptions self, char ** options) -> GDALMultiDimInfoOptionsN)r    GDALMultiDimInfoOptions_swiginitnew_GDALMultiDimInfoOptionsr  s     r   r   z GDALMultiDimInfoOptions.__init__  s    ..tU5V5VX\5]^r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_GDALMultiDimInfoOptionsr  r%   r$   r   r   r     s/    6-/IOdeGH_ ;;r$   r   c                  &    t        j                  |  S )zdMultiDimInfoInternal(Dataset hDataset, GDALMultiDimInfoOptions infoOptions) -> retStringAndCPLFree *)r   r   rr   s    r   r   r     r;  r$   c                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)r+  z(Proxy of C++ GDALTranslateOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  zGDALTranslateOptions.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zGDALTranslateOptions.<lambda>  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)zL__init__(GDALTranslateOptions self, char ** options) -> GDALTranslateOptionsN)r   GDALTranslateOptions_swiginitnew_GDALTranslateOptionsr  s     r   r   zGDALTranslateOptions.__init__  r*  r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_GDALTranslateOptionsr  r%   r$   r   r+  r+    /    3-/IOdeGHY 88r$   r+  c                  &    t        j                  |  S )zTranslateInternal(char const * dest, Dataset dataset, GDALTranslateOptions translateOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset)r   rV  rr   s    r   rV  rV    r  r$   c                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)rx  z&Proxy of C++ GDALWarpAppOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  zGDALWarpAppOptions.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zGDALWarpAppOptions.<lambda>  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)zH__init__(GDALWarpAppOptions self, char ** options) -> GDALWarpAppOptionsN)r   GDALWarpAppOptions_swiginitnew_GDALWarpAppOptionsr  s     r   r   zGDALWarpAppOptions.__init__  s    ))$0L0Ld0STr$   N)r   r   r7   r8   r   r   r   r   r   r   delete_GDALWarpAppOptionsr  r%   r$   r   rx  rx    s/    1-/IOdeGHU 66r$   rx  c                  &    t        j                  |  S )zwrapper_GDALWarpDestDS(Dataset dstDS, int object_list_count, GDALWarpAppOptions warpAppOptions, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   r  rr   s    r   r  r    r8  r$   c                  &    t        j                  |  S )zwrapper_GDALWarpDestName(char const * dest, int object_list_count, GDALWarpAppOptions warpAppOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset)r   r  rr   s    r   r  r    r  r$   c                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)r  z.Proxy of C++ GDALVectorTranslateOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  z#GDALVectorTranslateOptions.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  z#GDALVectorTranslateOptions.<lambda>  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)zX__init__(GDALVectorTranslateOptions self, char ** options) -> GDALVectorTranslateOptionsN)r   #GDALVectorTranslateOptions_swiginitnew_GDALVectorTranslateOptionsr  s     r   r   z#GDALVectorTranslateOptions.__init__  s    11$8\8\^b8cdr$   N)r   r   r7   r8   r   r   r   r   r   r   !delete_GDALVectorTranslateOptionsr  r%   r$   r   r  r    s/    9-/IOdeGHe >>r$   r  c                  &    t        j                  |  S )zwrapper_GDALVectorTranslateDestDS(Dataset dstDS, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   r  rr   s    r   r  r    s    22D99r$   c                  &    t        j                  |  S )zwrapper_GDALVectorTranslateDestName(char const * dest, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset)r   r  rr   s    r   r  r    s    44d;;r$   c                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)r  z,Proxy of C++ GDALDEMProcessingOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  z!GDALDEMProcessingOptions.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  z!GDALDEMProcessingOptions.<lambda>  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)zT__init__(GDALDEMProcessingOptions self, char ** options) -> GDALDEMProcessingOptionsN)r   !GDALDEMProcessingOptions_swiginitnew_GDALDEMProcessingOptionsr  s     r   r   z!GDALDEMProcessingOptions.__init__  s    //e6X6XZ^6_`r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_GDALDEMProcessingOptionsr  r%   r$   r   r  r    s/    7-/IOdeGHa <<r$   r  c                  &    t        j                  |  S )zDEMProcessingInternal(char const * dest, Dataset dataset, char const * pszProcessing, char const * pszColorFilename, GDALDEMProcessingOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset)r   r  rr   s    r   r  r    r  r$   c                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)r  z(Proxy of C++ GDALNearblackOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  zGDALNearblackOptions.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zGDALNearblackOptions.<lambda>  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)zL__init__(GDALNearblackOptions self, char ** options) -> GDALNearblackOptionsN)r   GDALNearblackOptions_swiginitnew_GDALNearblackOptionsr  s     r   r   zGDALNearblackOptions.__init__  r*  r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_GDALNearblackOptionsr  r%   r$   r   r  r    r}	  r$   r  c                  &    t        j                  |  S )zwrapper_GDALNearblackDestDS(Dataset dstDS, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   r  rr   s    r   r  r        ,,d33r$   c                  &    t        j                  |  S )zwrapper_GDALNearblackDestName(char const * dest, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset)r   r   rr   s    r   r   r         ..55r$   c                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)r  z#Proxy of C++ GDALGridOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  zGDALGridOptions.<lambda>  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zGDALGridOptions.<lambda>  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)zB__init__(GDALGridOptions self, char ** options) -> GDALGridOptionsN)r   GDALGridOptions_swiginitnew_GDALGridOptionsr  s     r   r   zGDALGridOptions.__init__   rb	  r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_GDALGridOptionsr  r%   r$   r   r  r    rd	  r$   r  c                  &    t        j                  |  S )zGridInternal(char const * dest, Dataset dataset, GDALGridOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset)r   r  rr   s    r   r  r  (  r3  r$   c                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)r  z(Proxy of C++ GDALRasterizeOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  zGDALRasterizeOptions.<lambda>.  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zGDALRasterizeOptions.<lambda>.  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)zL__init__(GDALRasterizeOptions self, char ** options) -> GDALRasterizeOptionsN)r   GDALRasterizeOptions_swiginitnew_GDALRasterizeOptionsr  s     r   r   zGDALRasterizeOptions.__init__1  r*  r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_GDALRasterizeOptionsr  r%   r$   r   r  r  +  r}	  r$   r  c                  &    t        j                  |  S )zwrapper_GDALRasterizeDestDS(Dataset dstDS, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   r  rr   s    r   r  r  9  r	  r$   c                  &    t        j                  |  S )zwrapper_GDALRasterizeDestName(char const * dest, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset)r   r  rr   s    r   r  r  =  r	  r$   c                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)r!  z(Proxy of C++ GDALFootprintOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  zGDALFootprintOptions.<lambda>C  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zGDALFootprintOptions.<lambda>C  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)zL__init__(GDALFootprintOptions self, char ** options) -> GDALFootprintOptionsN)r   GDALFootprintOptions_swiginitnew_GDALFootprintOptionsr  s     r   r   zGDALFootprintOptions.__init__F  r*  r$   N)r   r   r7   r8   r   r   r   r   r   r   delete_GDALFootprintOptionsr  r%   r$   r   r!  r!  @  r}	  r$   r!  c                  &    t        j                  |  S )zwrapper_GDALFootprintDestDS(Dataset dstDS, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int)r   r=  rr   s    r   r=  r=  N  r	  r$   c                  &    t        j                  |  S )zwrapper_GDALFootprintDestName(char const * dest, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset)r   r3  rr   s    r   r3  r3  R  r	  r$   c                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)rG  z'Proxy of C++ GDALBuildVRTOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  zGDALBuildVRTOptions.<lambda>X  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  zGDALBuildVRTOptions.<lambda>X  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)zJ__init__(GDALBuildVRTOptions self, char ** options) -> GDALBuildVRTOptionsN)r   GDALBuildVRTOptions_swiginitnew_GDALBuildVRTOptionsr  s     r   r   zGDALBuildVRTOptions.__init__[  s    **41N1NPT1UVr$   N)r   r   r7   r8   r   r   r   r   r   r   delete_GDALBuildVRTOptionsr  r%   r$   r   rG  rG  U  s/    2-/IOdeGHW 77r$   rG  c                  &    t        j                  |  S )zBuildVRTInternalObjects(char const * dest, int object_list_count, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset)r   rO  rr   s    r   rO  rO  c  r  r$   c                  &    t        j                  |  S )zBuildVRTInternalNames(char const * dest, char ** source_filenames, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset)r   rP  rr   s    r   rP  rP  g  r  r$   c                   L    e Zd ZdZ ed d d      ZeZd Ze	j                  Zy)rT  z0Proxy of C++ GDALMultiDimTranslateOptions class.c                 6    | j                   j                         S r.   r  r  s    r   r  z%GDALMultiDimTranslateOptions.<lambda>m  r  r$   c                 8    | j                   j                  |      S r.   r  r  s     r   r  z%GDALMultiDimTranslateOptions.<lambda>m  r  r$   r  r  c                 P    t        j                  | t        j                  |        y)z\__init__(GDALMultiDimTranslateOptions self, char ** options) -> GDALMultiDimTranslateOptionsN)r   %GDALMultiDimTranslateOptions_swiginit new_GDALMultiDimTranslateOptionsr  s     r   r   z%GDALMultiDimTranslateOptions.__init__p  s    33D%:`:`bf:ghr$   N)r   r   r7   r8   r   r   r   r   r   r   #delete_GDALMultiDimTranslateOptionsr  r%   r$   r   rT  rT  j  s/    ;-/IOdeGHi @@r$   rT  c                  &    t        j                  |  S )zwrapper_GDALMultiDimTranslateDestName(char const * dest, int object_list_count, GDALMultiDimTranslateOptions multiDimTranslateOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset)r   r\  rr   s    r   r\  r\  x  s    66==r$   r  )Nr   TFFFFFFTTTTFTFNN)Nr   TNFTTNNNN)NFNNNF)+NNNNNTNNNNNFFFNNNNNNNNNNNNNNNNNFNNFNFNFFNNN)NNNNFNr   NNNNFFFNFFNNNN)NNNFNNNFFNNN)NNNNNNNNNNNNNNNNNNN)NNNNNNNNNNNNNNNFNN)	NNNNNNNNN)r   Fr   (j  rB  r   _swig_python_version_info__package__r   r	   r   builtinsr   r   r   r&   r+   r4   r   r6   r?   rF   osgeo.gdalconstr  rH   
byteordersr  	byteorderr  r  r  r  r  GDT_CFloat32GDT_CFloat64rA  array_modesrc   ro   rq   rv   ry   r{   r~   r   objectr   r   r   r   r   r   r   r   r   r   r   r   r   r  r_  GRIORA_BilinearGRIORA_CubicGRIORA_CubicSplineGRIORA_LanczosGRIORA_Average
GRIORA_RMSGRIORA_ModeGRIORA_Gaussr)  r  rT  rZ  r  r  r  r  r  r  r  r  r  r  r  r  r+  rE  rM  rR  rZ  r]  ra  r  r  r  
contextlibcontextmanagerr  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  rf   r  DirEntry_swigregisterrh   ri   r  r  r  r  r  r  r	  r  r  r  r  r  r  r  r  r5  r  r   r"  r$  r&  r(  r*  r,  r.  r0  r2  r5  r7  r:  r=  VSILFILE_swigregisterVSI_STAT_EXISTS_FLAGVSI_STAT_NATURE_FLAGVSI_STAT_SIZE_FLAGVSI_STAT_SET_ERROR_FLAGVSI_STAT_CACHE_ONLYrF  StatBuf_swigregisterr4  rU  rW  r6  rZ  r\  r^  r9  r7  r8  rc  re  VSI_RANGE_STATUS_UNKNOWNVSI_RANGE_STATUS_DATAVSI_RANGE_STATUS_HOLErg  ri  rk  rm  ro  rq  r   rt  rv  rx  MajorObject_swigregisterr  Driver_swigregisterr   r   r  ColorEntry_swigregisterr  GCP_swigregisterr  r   r  r  r  r  r
  r  r  r  r  r  r  r  r  r  VirtualMem_swigregisterr*  AsyncReader_swigregisterr@  Dataset_swigregisterGEDTST_NONEr  rc  Group_swigregisterr  Statistics_swigregisterr  MDArray_swigregisterr  Attribute_swigregisterr  Dimension_swigregisterr  r  r  r  ExtendedDataType_swigregisterr8  EDTComponent_swigregisterrF  Band_swigregisterrS   ColorTable_swigregisterr$  !RasterAttributeTable_swigregisterru  SubdatasetInfo_swigregisterr  r  Relationship_swigregisterr  TermProgressrT   r[   r  r  r  r  r  r  r  r  r  r  r  GVM_DiagonalGVM_EdgeGVM_MaxGVM_MinGVOT_NORMALGVOT_MIN_TARGET_HEIGHT_FROM_DEM"GVOT_MIN_TARGET_HEIGHT_FROM_GROUNDr  r  r  r  &GDALTransformerInfoShadow_swigregisterr	  r	  #SuggestedWarpOutputRes_swigregisterr	  r	  r	  r  r!	  r#	  r%	  r'	  r)	  r+	  r-	  r/	  rC  r2	  r   r5	  r7	  r9	  r;	  r>	  r@	  rB	  rD	  rF	  rH	  rJ	  rL	  rN	  rV   rK  rR   r   rT	  rV	  rX	  rZ	  __version__r   GDALInfoOptions_swigregisterr   r   "GDALVectorInfoOptions_swigregisterr   r   $GDALMultiDimInfoOptions_swigregisterr   r+  !GDALTranslateOptions_swigregisterrV  rx  GDALWarpAppOptions_swigregisterr  r  r  'GDALVectorTranslateOptions_swigregisterr  r  r  %GDALDEMProcessingOptions_swigregisterr  r  !GDALNearblackOptions_swigregisterr  r   r  GDALGridOptions_swigregisterr  r  !GDALRasterizeOptions_swigregisterr  r  r!  !GDALFootprintOptions_swigregisterr=  r3  rG   GDALBuildVRTOptions_swigregisterrO  rP  rT  )GDALMultiDimTranslateOptions_swigregisterr\  r%   r$   r   <module>r
     s   :#/"[
L$ L $   
##*S]]2K)K$$*S]]2K)K##*S]]2K)K$$*S]]2K)K%%*S]]2K)K%%*S]]2K)K&&*S]]2K)K&&*S]]2K)K""*S]]2K)K	> $& $),,'+;:J6 :J~<@"3
R6 :>BG9>HL7<(,8?t> ##"&!#(#'!#'!%  $OEd>9,@= %%vzG  -ii%6G
  "$$004$!"4$Y^44D$ET4t$4EHNM: TUQT!U$t)BWBW ,,$4uEE4 $TchD"'d)@FD'aT 15-1!FJ"& $"!&*ESNl
iB CGGH?C;@AF,0+/r[h!lH +/59FK&*	NH`cB T"..a"4vCpH: "$))dtd D5UuDuTt4tdjHXc@ " "&#,0  $ $!"#!%#*.,026#yHv]c@ !#!%(,!!! $".2""# 15!kGZ,]^ IMLP&*DPL%dP.$4;4  1  1FC4  ((9)(0,+#7/')((*+&+*$! ) 7v 70   H %(!(3(.3).&&.)1''*$)''',+%%/-v    H %11 11 -- 77 // 6f 6&   7 #!(("$!##""&/ !99 33 33 ,#*1*8)#-/+& /+f   { +>4[ >4B   & !  [ [   j )&& &V   s ******..--**((+1 1&   j );& ;6   { +n	k n	d   7 #pEF pEf    E E"   j )l=f l=`   7 #N  N f   Y '(3 (3V   Y '##!!%%B$v B$L $ # #$4 576 78     -K=; K=`    %= %=P   j )kC6 kC^ ( ' '(< =EV E. " ! !. 1*aC6 aCH     -4 !!60131-.-.6524 !!>>
--
--"'"G"G %*%M%M "3,.\ \4 - , ,-F G$oV o0 * ) )*@ A;7
G;T:*($$1$%$(*(*&35!''')-5)'(")#'30  e/	4f 	4 # " "? 3%	:F 	: ) ( ()> ?+	<f 	< + * *+B C-	96 	9 ( ' '(< =*	7 	7 & % %&8 9/1	? 	? . - -.H I:<	=v 	= , + +,D E.	96 	9 ( ' '(< =46	4f 	4 # " "? 3%	96 	9 ( ' '(< =46	96 	9 ( ' '(< =46	8& 	8 ' & &': ;0.	A6 	A 0 / /0L M>QC  s   o! !	o.-o.