This file is indexed.

/usr/lib/python2.7/dist-packages/osgeo/gdal.py is in python-gdal 1.11.3+dfsg-3build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.





from sys import version_info
if version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_gdal', [dirname(__file__)])
        except ImportError:
            import _gdal
            return _gdal
        if fp is not None:
            try:
                _mod = imp.load_module('_gdal', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _gdal = swig_import_helper()
    del swig_import_helper
else:
    import _gdal
del version_info
try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.


def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr_nondynamic(self, class_type, name, static=1):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    if (not static):
        return object.__getattr__(self, name)
    else:
        raise AttributeError(name)

def _swig_getattr(self, class_type, name):
    return _swig_getattr_nondynamic(self, class_type, name, 0)


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object:
        pass
    _newclass = 0





have_warned = 0
def deprecation_warn( module ):
  global have_warned

  if have_warned == 1:
      return

  have_warned = 1

  from warnings import warn
  warn('%s.py was placed in a namespace, it is now available as osgeo.%s' % (module,module),
       DeprecationWarning)


from gdalconst import *
import gdalconst


import sys
byteorders = {"little": "<",
              "big": ">"}
array_modes = { gdalconst.GDT_Int16:    ("%si2" % byteorders[sys.byteorder]),
                gdalconst.GDT_UInt16:   ("%su2" % byteorders[sys.byteorder]),
                gdalconst.GDT_Int32:    ("%si4" % byteorders[sys.byteorder]),
                gdalconst.GDT_UInt32:   ("%su4" % byteorders[sys.byteorder]),
                gdalconst.GDT_Float32:  ("%sf4" % byteorders[sys.byteorder]),
                gdalconst.GDT_Float64:  ("%sf8" % byteorders[sys.byteorder]),
                gdalconst.GDT_CFloat32: ("%sf4" % byteorders[sys.byteorder]),
                gdalconst.GDT_CFloat64: ("%sf8" % byteorders[sys.byteorder]),
                gdalconst.GDT_Byte:     ("%st8" % byteorders[sys.byteorder]),
}

def RGBFile2PCTFile( src_filename, dst_filename ):
  src_ds = Open(src_filename)
  if src_ds is None or src_ds == 'NULL':
      return 1

  ct = ColorTable()
  err = ComputeMedianCutPCT( src_ds.GetRasterBand(1),
                             src_ds.GetRasterBand(2),
                             src_ds.GetRasterBand(3),
                             256, ct )
  if err != 0:
      return err

  gtiff_driver = GetDriverByName('GTiff')
  if gtiff_driver is None:
      return 1

  dst_ds = gtiff_driver.Create( dst_filename,
                                src_ds.RasterXSize, src_ds.RasterYSize )
  dst_ds.GetRasterBand(1).SetRasterColorTable( ct )

  err = DitherRGB2PCT( src_ds.GetRasterBand(1),
                       src_ds.GetRasterBand(2),
                       src_ds.GetRasterBand(3),
                       dst_ds.GetRasterBand(1),
                       ct )
  dst_ds = None
  src_ds = None

  return 0


def GetUseExceptions(*args):
    """GetUseExceptions() -> int"""
    return _gdal.GetUseExceptions(*args)

def UseExceptions(*args):
    """UseExceptions()"""
    return _gdal.UseExceptions(*args)

def DontUseExceptions(*args):
    """DontUseExceptions()"""
    return _gdal.DontUseExceptions(*args)

def VSIFReadL(*args):
    """VSIFReadL(int nMembSize, int nMembCount, VSILFILE * fp) -> int"""
    return _gdal.VSIFReadL(*args)

def Debug(*args):
    """Debug(char const * msg_class, char const * message)"""
    return _gdal.Debug(*args)

def SetErrorHandler(*args):
    """SetErrorHandler(char const * pszCallbackName=None) -> CPLErr"""
    return _gdal.SetErrorHandler(*args)

def PushErrorHandler(*args):
    """PushErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"""
    return _gdal.PushErrorHandler(*args)

def PopErrorHandler(*args):
    """PopErrorHandler()"""
    return _gdal.PopErrorHandler(*args)

def Error(*args):
    """Error(CPLErr msg_class, int err_code=0, char const * msg)"""
    return _gdal.Error(*args)

def GOA2GetAuthorizationURL(*args):
    """GOA2GetAuthorizationURL(char const * pszScope) -> retStringAndCPLFree *"""
    return _gdal.GOA2GetAuthorizationURL(*args)

def GOA2GetRefreshToken(*args):
    """GOA2GetRefreshToken(char const * pszAuthToken, char const * pszScope) -> retStringAndCPLFree *"""
    return _gdal.GOA2GetRefreshToken(*args)

def GOA2GetAccessToken(*args):
    """GOA2GetAccessToken(char const * pszRefreshToken, char const * pszScope) -> retStringAndCPLFree *"""
    return _gdal.GOA2GetAccessToken(*args)

def ErrorReset(*args):
    """ErrorReset()"""
    return _gdal.ErrorReset(*args)

def EscapeString(*args, **kwargs):
    """EscapeString(int len, int scheme) -> retStringAndCPLFree *"""
    return _gdal.EscapeString(*args, **kwargs)

def GetLastErrorNo(*args):
    """GetLastErrorNo() -> int"""
    return _gdal.GetLastErrorNo(*args)

def GetLastErrorType(*args):
    """GetLastErrorType() -> int"""
    return _gdal.GetLastErrorType(*args)

def GetLastErrorMsg(*args):
    """GetLastErrorMsg() -> char const *"""
    return _gdal.GetLastErrorMsg(*args)

def PushFinderLocation(*args):
    """PushFinderLocation(char const * utf8_path)"""
    return _gdal.PushFinderLocation(*args)

def PopFinderLocation(*args):
    """PopFinderLocation()"""
    return _gdal.PopFinderLocation(*args)

def FinderClean(*args):
    """FinderClean()"""
    return _gdal.FinderClean(*args)

def FindFile(*args):
    """FindFile(char const * pszClass, char const * utf8_path) -> char const *"""
    return _gdal.FindFile(*args)

def ReadDir(*args):
    """ReadDir(char const * utf8_path) -> char **"""
    return _gdal.ReadDir(*args)

def ReadDirRecursive(*args):
    """ReadDirRecursive(char const * utf8_path) -> char **"""
    return _gdal.ReadDirRecursive(*args)

def SetConfigOption(*args):
    """SetConfigOption(char const * pszKey, char const * pszValue)"""
    return _gdal.SetConfigOption(*args)

def GetConfigOption(*args):
    """GetConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *"""
    return _gdal.GetConfigOption(*args)

def CPLBinaryToHex(*args):
    """CPLBinaryToHex(int nBytes) -> retStringAndCPLFree *"""
    return _gdal.CPLBinaryToHex(*args)

def CPLHexToBinary(*args):
    """CPLHexToBinary(char const * pszHex, int * pnBytes) -> GByte *"""
    return _gdal.CPLHexToBinary(*args)

def FileFromMemBuffer(*args):
    """FileFromMemBuffer(char const * utf8_path, int nBytes)"""
    return _gdal.FileFromMemBuffer(*args)

def Unlink(*args):
    """Unlink(char const * utf8_path) -> int"""
    return _gdal.Unlink(*args)

def HasThreadSupport(*args):
    """HasThreadSupport() -> int"""
    return _gdal.HasThreadSupport(*args)

def Mkdir(*args):
    """Mkdir(char const * utf8_path, int mode) -> int"""
    return _gdal.Mkdir(*args)

def Rmdir(*args):
    """Rmdir(char const * utf8_path) -> int"""
    return _gdal.Rmdir(*args)

def Rename(*args):
    """Rename(char const * pszOld, char const * pszNew) -> int"""
    return _gdal.Rename(*args)

_gdal.VSI_STAT_EXISTS_FLAG_swigconstant(_gdal)
VSI_STAT_EXISTS_FLAG = _gdal.VSI_STAT_EXISTS_FLAG

_gdal.VSI_STAT_NATURE_FLAG_swigconstant(_gdal)
VSI_STAT_NATURE_FLAG = _gdal.VSI_STAT_NATURE_FLAG

_gdal.VSI_STAT_SIZE_FLAG_swigconstant(_gdal)
VSI_STAT_SIZE_FLAG = _gdal.VSI_STAT_SIZE_FLAG
class StatBuf(_object):
    """Proxy of C++ StatBuf class."""

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, StatBuf, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, StatBuf, name)
    __repr__ = _swig_repr
    __swig_getmethods__["mode"] = _gdal.StatBuf_mode_get
    if _newclass:
        mode = _swig_property(_gdal.StatBuf_mode_get)
    __swig_getmethods__["size"] = _gdal.StatBuf_size_get
    if _newclass:
        size = _swig_property(_gdal.StatBuf_size_get)
    __swig_getmethods__["mtime"] = _gdal.StatBuf_mtime_get
    if _newclass:
        mtime = _swig_property(_gdal.StatBuf_mtime_get)

    def __init__(self, *args):
        """__init__(StatBuf self, StatBuf psStatBuf) -> StatBuf"""
        this = _gdal.new_StatBuf(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _gdal.delete_StatBuf
    __del__ = lambda self: None

    def IsDirectory(self, *args):
        """IsDirectory(StatBuf self) -> int"""
        return _gdal.StatBuf_IsDirectory(self, *args)

StatBuf_swigregister = _gdal.StatBuf_swigregister
StatBuf_swigregister(StatBuf)


def VSIStatL(*args):
    """VSIStatL(char const * utf8_path, int nFlags=0) -> int"""
    return _gdal.VSIStatL(*args)

def VSIFOpenL(*args):
    """VSIFOpenL(char const * utf8_path, char const * pszMode) -> VSILFILE *"""
    return _gdal.VSIFOpenL(*args)

def VSIFCloseL(*args):
    """VSIFCloseL(VSILFILE * arg1)"""
    return _gdal.VSIFCloseL(*args)

def VSIFSeekL(*args):
    """VSIFSeekL(VSILFILE * arg1, GIntBig arg2, int arg3) -> int"""
    return _gdal.VSIFSeekL(*args)

def VSIFTellL(*args):
    """VSIFTellL(VSILFILE * arg1) -> GIntBig"""
    return _gdal.VSIFTellL(*args)

def VSIFTruncateL(*args):
    """VSIFTruncateL(VSILFILE * arg1, GIntBig arg2) -> int"""
    return _gdal.VSIFTruncateL(*args)

def VSIFWriteL(*args):
    """VSIFWriteL(int nLen, int size, int memb, VSILFILE * f) -> int"""
    return _gdal.VSIFWriteL(*args)
class MajorObject(_object):
    """Proxy of C++ GDALMajorObjectShadow class."""

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, MajorObject, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, MajorObject, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr

    def GetDescription(self, *args):
        """GetDescription(MajorObject self) -> char const *"""
        return _gdal.MajorObject_GetDescription(self, *args)


    def SetDescription(self, *args):
        """SetDescription(MajorObject self, char const * pszNewDesc)"""
        return _gdal.MajorObject_SetDescription(self, *args)


    def GetMetadataDomainList(self, *args):
        """GetMetadataDomainList(MajorObject self) -> char **"""
        return _gdal.MajorObject_GetMetadataDomainList(self, *args)


    def GetMetadata_Dict(self, *args):
        """GetMetadata_Dict(MajorObject self, char const * pszDomain) -> char **"""
        return _gdal.MajorObject_GetMetadata_Dict(self, *args)


    def GetMetadata_List(self, *args):
        """GetMetadata_List(MajorObject self, char const * pszDomain) -> char **"""
        return _gdal.MajorObject_GetMetadata_List(self, *args)


    def SetMetadata(self, *args):
        """
        SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain) -> CPLErr
        SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain) -> CPLErr
        """
        return _gdal.MajorObject_SetMetadata(self, *args)


    def GetMetadataItem(self, *args):
        """GetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain) -> char const *"""
        return _gdal.MajorObject_GetMetadataItem(self, *args)


    def SetMetadataItem(self, *args):
        """SetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain) -> CPLErr"""
        return _gdal.MajorObject_SetMetadataItem(self, *args)


    def GetMetadata( self, domain = '' ):
      if domain[:4] == 'xml:':
        return self.GetMetadata_List( domain )
      return self.GetMetadata_Dict( domain )

MajorObject_swigregister = _gdal.MajorObject_swigregister
MajorObject_swigregister(MajorObject)

class Driver(MajorObject):
    """Proxy of C++ GDALDriverShadow class."""

    __swig_setmethods__ = {}
    for _s in [MajorObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, Driver, name, value)
    __swig_getmethods__ = {}
    for _s in [MajorObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, Driver, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_getmethods__["ShortName"] = _gdal.Driver_ShortName_get
    if _newclass:
        ShortName = _swig_property(_gdal.Driver_ShortName_get)
    __swig_getmethods__["LongName"] = _gdal.Driver_LongName_get
    if _newclass:
        LongName = _swig_property(_gdal.Driver_LongName_get)
    __swig_getmethods__["HelpTopic"] = _gdal.Driver_HelpTopic_get
    if _newclass:
        HelpTopic = _swig_property(_gdal.Driver_HelpTopic_get)

    def Create(self, *args, **kwargs):
        """Create(Driver self, char const * utf8_path, int xsize, int ysize, int bands=1, GDALDataType eType, char ** options=None) -> Dataset"""
        return _gdal.Driver_Create(self, *args, **kwargs)


    def CreateCopy(self, *args, **kwargs):
        """CreateCopy(Driver self, char const * utf8_path, Dataset src, int strict=1, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"""
        return _gdal.Driver_CreateCopy(self, *args, **kwargs)


    def Delete(self, *args):
        """Delete(Driver self, char const * utf8_path) -> int"""
        return _gdal.Driver_Delete(self, *args)


    def Rename(self, *args):
        """Rename(Driver self, char const * newName, char const * oldName) -> int"""
        return _gdal.Driver_Rename(self, *args)


    def CopyFiles(self, *args):
        """CopyFiles(Driver self, char const * newName, char const * oldName) -> int"""
        return _gdal.Driver_CopyFiles(self, *args)


    def Register(self, *args):
        """Register(Driver self) -> int"""
        return _gdal.Driver_Register(self, *args)


    def Deregister(self, *args):
        """Deregister(Driver self)"""
        return _gdal.Driver_Deregister(self, *args)

Driver_swigregister = _gdal.Driver_swigregister
Driver_swigregister(Driver)

class ColorEntry(_object):
    """Proxy of C++ GDALColorEntry class."""

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ColorEntry, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ColorEntry, name)
    __repr__ = _swig_repr
    __swig_setmethods__["c1"] = _gdal.ColorEntry_c1_set
    __swig_getmethods__["c1"] = _gdal.ColorEntry_c1_get
    if _newclass:
        c1 = _swig_property(_gdal.ColorEntry_c1_get, _gdal.ColorEntry_c1_set)
    __swig_setmethods__["c2"] = _gdal.ColorEntry_c2_set
    __swig_getmethods__["c2"] = _gdal.ColorEntry_c2_get
    if _newclass:
        c2 = _swig_property(_gdal.ColorEntry_c2_get, _gdal.ColorEntry_c2_set)
    __swig_setmethods__["c3"] = _gdal.ColorEntry_c3_set
    __swig_getmethods__["c3"] = _gdal.ColorEntry_c3_get
    if _newclass:
        c3 = _swig_property(_gdal.ColorEntry_c3_get, _gdal.ColorEntry_c3_set)
    __swig_setmethods__["c4"] = _gdal.ColorEntry_c4_set
    __swig_getmethods__["c4"] = _gdal.ColorEntry_c4_get
    if _newclass:
        c4 = _swig_property(_gdal.ColorEntry_c4_get, _gdal.ColorEntry_c4_set)

    def __init__(self, *args):
        """__init__(GDALColorEntry self) -> ColorEntry"""
        this = _gdal.new_ColorEntry(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _gdal.delete_ColorEntry
    __del__ = lambda self: None
ColorEntry_swigregister = _gdal.ColorEntry_swigregister
ColorEntry_swigregister(ColorEntry)

class GCP(_object):
    """Proxy of C++ GDAL_GCP class."""

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, GCP, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, GCP, name)
    __repr__ = _swig_repr
    __swig_setmethods__["GCPX"] = _gdal.GCP_GCPX_set
    __swig_getmethods__["GCPX"] = _gdal.GCP_GCPX_get
    if _newclass:
        GCPX = _swig_property(_gdal.GCP_GCPX_get, _gdal.GCP_GCPX_set)
    __swig_setmethods__["GCPY"] = _gdal.GCP_GCPY_set
    __swig_getmethods__["GCPY"] = _gdal.GCP_GCPY_get
    if _newclass:
        GCPY = _swig_property(_gdal.GCP_GCPY_get, _gdal.GCP_GCPY_set)
    __swig_setmethods__["GCPZ"] = _gdal.GCP_GCPZ_set
    __swig_getmethods__["GCPZ"] = _gdal.GCP_GCPZ_get
    if _newclass:
        GCPZ = _swig_property(_gdal.GCP_GCPZ_get, _gdal.GCP_GCPZ_set)
    __swig_setmethods__["GCPPixel"] = _gdal.GCP_GCPPixel_set
    __swig_getmethods__["GCPPixel"] = _gdal.GCP_GCPPixel_get
    if _newclass:
        GCPPixel = _swig_property(_gdal.GCP_GCPPixel_get, _gdal.GCP_GCPPixel_set)
    __swig_setmethods__["GCPLine"] = _gdal.GCP_GCPLine_set
    __swig_getmethods__["GCPLine"] = _gdal.GCP_GCPLine_get
    if _newclass:
        GCPLine = _swig_property(_gdal.GCP_GCPLine_get, _gdal.GCP_GCPLine_set)
    __swig_setmethods__["Info"] = _gdal.GCP_Info_set
    __swig_getmethods__["Info"] = _gdal.GCP_Info_get
    if _newclass:
        Info = _swig_property(_gdal.GCP_Info_get, _gdal.GCP_Info_set)
    __swig_setmethods__["Id"] = _gdal.GCP_Id_set
    __swig_getmethods__["Id"] = _gdal.GCP_Id_get
    if _newclass:
        Id = _swig_property(_gdal.GCP_Id_get, _gdal.GCP_Id_set)

    def __init__(self, *args):
        """__init__(GDAL_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) -> GCP"""
        this = _gdal.new_GCP(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _gdal.delete_GCP
    __del__ = lambda self: None

    def __str__(self):
      str = '%s (%.2fP,%.2fL) -> (%.7fE,%.7fN,%.2f) %s '\
            % (self.Id, self.GCPPixel, self.GCPLine,
               self.GCPX, self.GCPY, self.GCPZ, self.Info )
      return str

    def serialize(self,with_Z=0):
      base = [CXT_Element,'GCP']
      base.append([CXT_Attribute,'Id',[CXT_Text,self.Id]])
      pixval = '%0.15E' % self.GCPPixel       
      lineval = '%0.15E' % self.GCPLine
      xval = '%0.15E' % self.GCPX
      yval = '%0.15E' % self.GCPY
      zval = '%0.15E' % self.GCPZ
      base.append([CXT_Attribute,'Pixel',[CXT_Text,pixval]])
      base.append([CXT_Attribute,'Line',[CXT_Text,lineval]])
      base.append([CXT_Attribute,'X',[CXT_Text,xval]])
      base.append([CXT_Attribute,'Y',[CXT_Text,yval]])
      if with_Z:
          base.append([CXT_Attribute,'Z',[CXT_Text,zval]])        
      return base

GCP_swigregister = _gdal.GCP_swigregister
GCP_swigregister(GCP)


def GDAL_GCP_GCPX_get(*args):
    """GDAL_GCP_GCPX_get(GCP gcp) -> double"""
    return _gdal.GDAL_GCP_GCPX_get(*args)

def GDAL_GCP_GCPX_set(*args):
    """GDAL_GCP_GCPX_set(GCP gcp, double dfGCPX)"""
    return _gdal.GDAL_GCP_GCPX_set(*args)

def GDAL_GCP_GCPY_get(*args):
    """GDAL_GCP_GCPY_get(GCP gcp) -> double"""
    return _gdal.GDAL_GCP_GCPY_get(*args)

def GDAL_GCP_GCPY_set(*args):
    """GDAL_GCP_GCPY_set(GCP gcp, double dfGCPY)"""
    return _gdal.GDAL_GCP_GCPY_set(*args)

def GDAL_GCP_GCPZ_get(*args):
    """GDAL_GCP_GCPZ_get(GCP gcp) -> double"""
    return _gdal.GDAL_GCP_GCPZ_get(*args)

def GDAL_GCP_GCPZ_set(*args):
    """GDAL_GCP_GCPZ_set(GCP gcp, double dfGCPZ)"""
    return _gdal.GDAL_GCP_GCPZ_set(*args)

def GDAL_GCP_GCPPixel_get(*args):
    """GDAL_GCP_GCPPixel_get(GCP gcp) -> double"""
    return _gdal.GDAL_GCP_GCPPixel_get(*args)

def GDAL_GCP_GCPPixel_set(*args):
    """GDAL_GCP_GCPPixel_set(GCP gcp, double dfGCPPixel)"""
    return _gdal.GDAL_GCP_GCPPixel_set(*args)

def GDAL_GCP_GCPLine_get(*args):
    """GDAL_GCP_GCPLine_get(GCP gcp) -> double"""
    return _gdal.GDAL_GCP_GCPLine_get(*args)

def GDAL_GCP_GCPLine_set(*args):
    """GDAL_GCP_GCPLine_set(GCP gcp, double dfGCPLine)"""
    return _gdal.GDAL_GCP_GCPLine_set(*args)

def GDAL_GCP_Info_get(*args):
    """GDAL_GCP_Info_get(GCP gcp) -> char const *"""
    return _gdal.GDAL_GCP_Info_get(*args)

def GDAL_GCP_Info_set(*args):
    """GDAL_GCP_Info_set(GCP gcp, char const * pszInfo)"""
    return _gdal.GDAL_GCP_Info_set(*args)

def GDAL_GCP_Id_get(*args):
    """GDAL_GCP_Id_get(GCP gcp) -> char const *"""
    return _gdal.GDAL_GCP_Id_get(*args)

def GDAL_GCP_Id_set(*args):
    """GDAL_GCP_Id_set(GCP gcp, char const * pszId)"""
    return _gdal.GDAL_GCP_Id_set(*args)

def GDAL_GCP_get_GCPX(*args):
    """GDAL_GCP_get_GCPX(GCP gcp) -> double"""
    return _gdal.GDAL_GCP_get_GCPX(*args)

def GDAL_GCP_set_GCPX(*args):
    """GDAL_GCP_set_GCPX(GCP gcp, double dfGCPX)"""
    return _gdal.GDAL_GCP_set_GCPX(*args)

def GDAL_GCP_get_GCPY(*args):
    """GDAL_GCP_get_GCPY(GCP gcp) -> double"""
    return _gdal.GDAL_GCP_get_GCPY(*args)

def GDAL_GCP_set_GCPY(*args):
    """GDAL_GCP_set_GCPY(GCP gcp, double dfGCPY)"""
    return _gdal.GDAL_GCP_set_GCPY(*args)

def GDAL_GCP_get_GCPZ(*args):
    """GDAL_GCP_get_GCPZ(GCP gcp) -> double"""
    return _gdal.GDAL_GCP_get_GCPZ(*args)

def GDAL_GCP_set_GCPZ(*args):
    """GDAL_GCP_set_GCPZ(GCP gcp, double dfGCPZ)"""
    return _gdal.GDAL_GCP_set_GCPZ(*args)

def GDAL_GCP_get_GCPPixel(*args):
    """GDAL_GCP_get_GCPPixel(GCP gcp) -> double"""
    return _gdal.GDAL_GCP_get_GCPPixel(*args)

def GDAL_GCP_set_GCPPixel(*args):
    """GDAL_GCP_set_GCPPixel(GCP gcp, double dfGCPPixel)"""
    return _gdal.GDAL_GCP_set_GCPPixel(*args)

def GDAL_GCP_get_GCPLine(*args):
    """GDAL_GCP_get_GCPLine(GCP gcp) -> double"""
    return _gdal.GDAL_GCP_get_GCPLine(*args)

def GDAL_GCP_set_GCPLine(*args):
    """GDAL_GCP_set_GCPLine(GCP gcp, double dfGCPLine)"""
    return _gdal.GDAL_GCP_set_GCPLine(*args)

def GDAL_GCP_get_Info(*args):
    """GDAL_GCP_get_Info(GCP gcp) -> char const *"""
    return _gdal.GDAL_GCP_get_Info(*args)

def GDAL_GCP_set_Info(*args):
    """GDAL_GCP_set_Info(GCP gcp, char const * pszInfo)"""
    return _gdal.GDAL_GCP_set_Info(*args)

def GDAL_GCP_get_Id(*args):
    """GDAL_GCP_get_Id(GCP gcp) -> char const *"""
    return _gdal.GDAL_GCP_get_Id(*args)

def GDAL_GCP_set_Id(*args):
    """GDAL_GCP_set_Id(GCP gcp, char const * pszId)"""
    return _gdal.GDAL_GCP_set_Id(*args)

def GCPsToGeoTransform(*args):
    """GCPsToGeoTransform(int nGCPs, int bApproxOK=1) -> RETURN_NONE"""
    return _gdal.GCPsToGeoTransform(*args)
class VirtualMem(_object):
    """Proxy of C++ CPLVirtualMemShadow class."""

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, VirtualMem, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, VirtualMem, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_destroy__ = _gdal.delete_VirtualMem
    __del__ = lambda self: None

    def GetAddr(self, *args):
        """GetAddr(VirtualMem self)"""
        return _gdal.VirtualMem_GetAddr(self, *args)


    def Pin(self, *args):
        """Pin(VirtualMem self, size_t start_offset=0, size_t nsize=0, int bWriteOp=0)"""
        return _gdal.VirtualMem_Pin(self, *args)

VirtualMem_swigregister = _gdal.VirtualMem_swigregister
VirtualMem_swigregister(VirtualMem)

class AsyncReader(_object):
    """Proxy of C++ GDALAsyncReaderShadow class."""

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, AsyncReader, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, AsyncReader, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_destroy__ = _gdal.delete_AsyncReader
    __del__ = lambda self: None

    def GetNextUpdatedRegion(self, *args):
        """GetNextUpdatedRegion(AsyncReader self, double timeout) -> GDALAsyncStatusType"""
        return _gdal.AsyncReader_GetNextUpdatedRegion(self, *args)


    def GetBuffer(self, *args):
        """GetBuffer(AsyncReader self)"""
        return _gdal.AsyncReader_GetBuffer(self, *args)


    def LockBuffer(self, *args):
        """LockBuffer(AsyncReader self, double timeout) -> int"""
        return _gdal.AsyncReader_LockBuffer(self, *args)


    def UnlockBuffer(self, *args):
        """UnlockBuffer(AsyncReader self)"""
        return _gdal.AsyncReader_UnlockBuffer(self, *args)

AsyncReader_swigregister = _gdal.AsyncReader_swigregister
AsyncReader_swigregister(AsyncReader)

class Dataset(MajorObject):
    """Proxy of C++ GDALDatasetShadow class."""

    __swig_setmethods__ = {}
    for _s in [MajorObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, Dataset, name, value)
    __swig_getmethods__ = {}
    for _s in [MajorObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, Dataset, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_getmethods__["RasterXSize"] = _gdal.Dataset_RasterXSize_get
    if _newclass:
        RasterXSize = _swig_property(_gdal.Dataset_RasterXSize_get)
    __swig_getmethods__["RasterYSize"] = _gdal.Dataset_RasterYSize_get
    if _newclass:
        RasterYSize = _swig_property(_gdal.Dataset_RasterYSize_get)
    __swig_getmethods__["RasterCount"] = _gdal.Dataset_RasterCount_get
    if _newclass:
        RasterCount = _swig_property(_gdal.Dataset_RasterCount_get)
    __swig_destroy__ = _gdal.delete_Dataset
    __del__ = lambda self: None

    def GetDriver(self, *args):
        """GetDriver(Dataset self) -> Driver"""
        return _gdal.Dataset_GetDriver(self, *args)


    def GetRasterBand(self, *args):
        """GetRasterBand(Dataset self, int nBand) -> Band"""
        return _gdal.Dataset_GetRasterBand(self, *args)


    def GetProjection(self, *args):
        """GetProjection(Dataset self) -> char const *"""
        return _gdal.Dataset_GetProjection(self, *args)


    def GetProjectionRef(self, *args):
        """GetProjectionRef(Dataset self) -> char const *"""
        return _gdal.Dataset_GetProjectionRef(self, *args)


    def SetProjection(self, *args):
        """SetProjection(Dataset self, char const * prj) -> CPLErr"""
        return _gdal.Dataset_SetProjection(self, *args)


    def GetGeoTransform(self, *args, **kwargs):
        """GetGeoTransform(Dataset self, int * can_return_null=None)"""
        return _gdal.Dataset_GetGeoTransform(self, *args, **kwargs)


    def SetGeoTransform(self, *args):
        """SetGeoTransform(Dataset self, double [6] argin) -> CPLErr"""
        return _gdal.Dataset_SetGeoTransform(self, *args)


    def BuildOverviews(self, *args, **kwargs):
        """BuildOverviews(Dataset self, char const * resampling, int overviewlist=0, GDALProgressFunc callback=0, void * callback_data=None) -> int"""
        return _gdal.Dataset_BuildOverviews(self, *args, **kwargs)


    def GetGCPCount(self, *args):
        """GetGCPCount(Dataset self) -> int"""
        return _gdal.Dataset_GetGCPCount(self, *args)


    def GetGCPProjection(self, *args):
        """GetGCPProjection(Dataset self) -> char const *"""
        return _gdal.Dataset_GetGCPProjection(self, *args)


    def GetGCPs(self, *args):
        """GetGCPs(Dataset self)"""
        return _gdal.Dataset_GetGCPs(self, *args)


    def SetGCPs(self, *args):
        """SetGCPs(Dataset self, int nGCPs, char const * pszGCPProjection) -> CPLErr"""
        return _gdal.Dataset_SetGCPs(self, *args)


    def FlushCache(self, *args):
        """FlushCache(Dataset self)"""
        return _gdal.Dataset_FlushCache(self, *args)


    def AddBand(self, *args, **kwargs):
        """AddBand(Dataset self, GDALDataType datatype, char ** options=None) -> CPLErr"""
        return _gdal.Dataset_AddBand(self, *args, **kwargs)


    def CreateMaskBand(self, *args):
        """CreateMaskBand(Dataset self, int nFlags) -> CPLErr"""
        return _gdal.Dataset_CreateMaskBand(self, *args)


    def GetFileList(self, *args):
        """GetFileList(Dataset self) -> char **"""
        return _gdal.Dataset_GetFileList(self, *args)


    def WriteRaster(self, *args, **kwargs):
        """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, int * buf_pixel_space=None, int * buf_line_space=None, int * buf_band_space=None) -> CPLErr"""
        return _gdal.Dataset_WriteRaster(self, *args, **kwargs)


    def BeginAsyncReader(self, *args, **kwargs):
        """BeginAsyncReader(Dataset self, int xOff, int yOff, int xSize, int ySize, int buf_len, int buf_xsize, int buf_ysize, GDALDataType bufType, int band_list=0, int nPixelSpace=0, int nLineSpace=0, int nBandSpace=0, char ** options=None) -> AsyncReader"""
        return _gdal.Dataset_BeginAsyncReader(self, *args, **kwargs)


    def EndAsyncReader(self, *args):
        """EndAsyncReader(Dataset self, AsyncReader ario)"""
        return _gdal.Dataset_EndAsyncReader(self, *args)


    def GetVirtualMem(self, *args, **kwargs):
        """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"""
        return _gdal.Dataset_GetVirtualMem(self, *args, **kwargs)


    def GetTiledVirtualMem(self, *args, **kwargs):
        """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"""
        return _gdal.Dataset_GetTiledVirtualMem(self, *args, **kwargs)


    def ReadRaster1(self, *args, **kwargs):
        """ReadRaster1(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, int * buf_pixel_space=None, int * buf_line_space=None, int * buf_band_space=None) -> CPLErr"""
        return _gdal.Dataset_ReadRaster1(self, *args, **kwargs)


    def ReadAsArray(self, xoff=0, yoff=0, xsize=None, ysize=None, buf_obj=None ):
        import gdalnumeric
        return gdalnumeric.DatasetReadAsArray( self, xoff, yoff, xsize, ysize, buf_obj )
    def WriteRaster(self, xoff, yoff, xsize, ysize,
                    buf_string,
                    buf_xsize = None, buf_ysize = None, buf_type = None,
                    band_list = None,
                    buf_pixel_space = None, buf_line_space = None, buf_band_space = None ):

        if buf_xsize is None:
            buf_xsize = xsize;
        if buf_ysize is None:
            buf_ysize = ysize;
        if band_list is None:
            band_list = range(1,self.RasterCount+1)
        if buf_type is None:
            buf_type = self.GetRasterBand(1).DataType

        return _gdal.Dataset_WriteRaster(self,
                 xoff, yoff, xsize, ysize,
                buf_string, buf_xsize, buf_ysize, buf_type, band_list,
                buf_pixel_space, buf_line_space, buf_band_space )

    def ReadRaster(self, xoff = 0, yoff = 0, xsize = None, ysize = None,
                   buf_xsize = None, buf_ysize = None, buf_type = None,
                   band_list = None,
                   buf_pixel_space = None, buf_line_space = None, buf_band_space = None ):

        if xsize is None:
            xsize = self.RasterXSize
        if ysize is None:
            ysize = self.RasterYSize
        if band_list is None:
            band_list = range(1,self.RasterCount+1)
        if buf_xsize is None:
            buf_xsize = xsize;
        if buf_ysize is None:
            buf_ysize = ysize;

        if buf_type is None:
            buf_type = self.GetRasterBand(1).DataType;

        return _gdal.Dataset_ReadRaster1(self, xoff, yoff, xsize, ysize,
                                            buf_xsize, buf_ysize, buf_type,
                                            band_list, buf_pixel_space, buf_line_space, buf_band_space )

    def GetVirtualMemArray(self, eAccess = gdalconst.GF_Read, xoff=0, yoff=0,
                           xsize=None, ysize=None, bufxsize=None, bufysize=None,
                           datatype = None, band_list = None, band_sequential = True,
                           cache_size = 10 * 1024 * 1024, page_size_hint = 0,
                           options = None):
        """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.
        """
        import gdalnumeric
        if xsize is None:
            xsize = self.RasterXSize
        if ysize is None:
            ysize = self.RasterYSize
        if bufxsize is None:
            bufxsize = self.RasterXSize
        if bufysize is None:
            bufysize = self.RasterYSize
        if datatype is None:
            datatype = self.GetRasterBand(1).DataType
        if band_list is None:
            band_list = range(1,self.RasterCount+1)
        if options is None:
            virtualmem = self.GetVirtualMem(eAccess,xoff,yoff,xsize,ysize,bufxsize,bufysize,datatype,band_list,band_sequential,cache_size,page_size_hint)
        else:
            virtualmem = self.GetVirtualMem(eAccess,xoff,yoff,xsize,ysize,bufxsize,bufysize,datatype,band_list,band_sequential,cache_size,page_size_hint, options)
        return gdalnumeric.VirtualMemGetArray( virtualmem )

    def GetTiledVirtualMemArray(self, eAccess = gdalconst.GF_Read, xoff=0, yoff=0,
                           xsize=None, ysize=None, tilexsize=256, tileysize=256,
                           datatype = None, band_list = None, tile_organization = gdalconst.GTO_BSQ,
                           cache_size = 10 * 1024 * 1024, options = None):
        """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.
        """
        import gdalnumeric
        if xsize is None:
            xsize = self.RasterXSize
        if ysize is None:
            ysize = self.RasterYSize
        if datatype is None:
            datatype = self.GetRasterBand(1).DataType
        if band_list is None:
            band_list = range(1,self.RasterCount+1)
        if options is None:
            virtualmem = self.GetTiledVirtualMem(eAccess,xoff,yoff,xsize,ysize,tilexsize,tileysize,datatype,band_list,tile_organization,cache_size)
        else:
            virtualmem = self.GetTiledVirtualMem(eAccess,xoff,yoff,xsize,ysize,tilexsize,tileysize,datatype,band_list,tile_organization,cache_size, options)
        return gdalnumeric.VirtualMemGetArray( virtualmem )

    def GetSubDatasets(self):
        sd_list = []

        sd = self.GetMetadata('SUBDATASETS')
        if sd is None:
            return sd_list

        i = 1
        while 'SUBDATASET_'+str(i)+'_NAME' in sd:
            sd_list.append( ( sd['SUBDATASET_'+str(i)+'_NAME'],
                              sd['SUBDATASET_'+str(i)+'_DESC'] ) )
            i = i + 1
        return sd_list

    def BeginAsyncReader(self, xoff, yoff, xsize, ysize, buf_obj = None, buf_xsize = None, buf_ysize = None, buf_type = None, band_list = None, options=[]):
        if band_list is None:
            band_list = range(1, self.RasterCount + 1)
        if buf_xsize is None:
            buf_xsize = 0;
        if buf_ysize is None:
            buf_ysize = 0;
        if buf_type is None:
            buf_type = GDT_Byte

        if buf_xsize <= 0:
            buf_xsize = xsize
        if buf_ysize <= 0:
            buf_ysize = ysize

        if buf_obj is None:
            from sys import version_info
            nRequiredSize = int(buf_xsize * buf_ysize * len(band_list) * (_gdal.GetDataTypeSize(buf_type) / 8))
            if version_info >= (3,0,0):
                buf_obj_ar = [ None ]
                exec("buf_obj_ar[0] = b' ' * nRequiredSize")
                buf_obj = buf_obj_ar[0]
            else:
                buf_obj = ' ' * nRequiredSize
        return _gdal.Dataset_BeginAsyncReader(self, xoff, yoff, xsize, ysize, buf_obj, buf_xsize, buf_ysize, buf_type, band_list,  0, 0, 0, options)

Dataset_swigregister = _gdal.Dataset_swigregister
Dataset_swigregister(Dataset)

class Band(MajorObject):
    """Proxy of C++ GDALRasterBandShadow class."""

    __swig_setmethods__ = {}
    for _s in [MajorObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, Band, name, value)
    __swig_getmethods__ = {}
    for _s in [MajorObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, Band, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_getmethods__["XSize"] = _gdal.Band_XSize_get
    if _newclass:
        XSize = _swig_property(_gdal.Band_XSize_get)
    __swig_getmethods__["YSize"] = _gdal.Band_YSize_get
    if _newclass:
        YSize = _swig_property(_gdal.Band_YSize_get)
    __swig_getmethods__["DataType"] = _gdal.Band_DataType_get
    if _newclass:
        DataType = _swig_property(_gdal.Band_DataType_get)

    def GetBand(self, *args):
        """GetBand(Band self) -> int"""
        return _gdal.Band_GetBand(self, *args)


    def GetBlockSize(self, *args):
        """GetBlockSize(Band self)"""
        return _gdal.Band_GetBlockSize(self, *args)


    def GetColorInterpretation(self, *args):
        """GetColorInterpretation(Band self) -> GDALColorInterp"""
        return _gdal.Band_GetColorInterpretation(self, *args)


    def GetRasterColorInterpretation(self, *args):
        """GetRasterColorInterpretation(Band self) -> GDALColorInterp"""
        return _gdal.Band_GetRasterColorInterpretation(self, *args)


    def SetColorInterpretation(self, *args):
        """SetColorInterpretation(Band self, GDALColorInterp val) -> CPLErr"""
        return _gdal.Band_SetColorInterpretation(self, *args)


    def SetRasterColorInterpretation(self, *args):
        """SetRasterColorInterpretation(Band self, GDALColorInterp val) -> CPLErr"""
        return _gdal.Band_SetRasterColorInterpretation(self, *args)


    def GetNoDataValue(self, *args):
        """GetNoDataValue(Band self)"""
        return _gdal.Band_GetNoDataValue(self, *args)


    def SetNoDataValue(self, *args):
        """SetNoDataValue(Band self, double d) -> CPLErr"""
        return _gdal.Band_SetNoDataValue(self, *args)


    def GetUnitType(self, *args):
        """GetUnitType(Band self) -> char const *"""
        return _gdal.Band_GetUnitType(self, *args)


    def SetUnitType(self, *args):
        """SetUnitType(Band self, char const * val) -> CPLErr"""
        return _gdal.Band_SetUnitType(self, *args)


    def GetRasterCategoryNames(self, *args):
        """GetRasterCategoryNames(Band self) -> char **"""
        return _gdal.Band_GetRasterCategoryNames(self, *args)


    def SetRasterCategoryNames(self, *args):
        """SetRasterCategoryNames(Band self, char ** names) -> CPLErr"""
        return _gdal.Band_SetRasterCategoryNames(self, *args)


    def GetMinimum(self, *args):
        """GetMinimum(Band self)"""
        return _gdal.Band_GetMinimum(self, *args)


    def GetMaximum(self, *args):
        """GetMaximum(Band self)"""
        return _gdal.Band_GetMaximum(self, *args)


    def GetOffset(self, *args):
        """GetOffset(Band self)"""
        return _gdal.Band_GetOffset(self, *args)


    def GetScale(self, *args):
        """GetScale(Band self)"""
        return _gdal.Band_GetScale(self, *args)


    def SetOffset(self, *args):
        """SetOffset(Band self, double val) -> CPLErr"""
        return _gdal.Band_SetOffset(self, *args)


    def SetScale(self, *args):
        """SetScale(Band self, double val) -> CPLErr"""
        return _gdal.Band_SetScale(self, *args)


    def GetStatistics(self, *args):
        """GetStatistics(Band self, int approx_ok, int force) -> CPLErr"""
        return _gdal.Band_GetStatistics(self, *args)


    def ComputeStatistics(self, *args):
        """ComputeStatistics(Band self, bool approx_ok, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr"""
        return _gdal.Band_ComputeStatistics(self, *args)


    def SetStatistics(self, *args):
        """SetStatistics(Band self, double min, double max, double mean, double stddev) -> CPLErr"""
        return _gdal.Band_SetStatistics(self, *args)


    def GetOverviewCount(self, *args):
        """GetOverviewCount(Band self) -> int"""
        return _gdal.Band_GetOverviewCount(self, *args)


    def GetOverview(self, *args):
        """GetOverview(Band self, int i) -> Band"""
        return _gdal.Band_GetOverview(self, *args)


    def Checksum(self, *args, **kwargs):
        """Checksum(Band self, int xoff=0, int yoff=0, int * xsize=None, int * ysize=None) -> int"""
        return _gdal.Band_Checksum(self, *args, **kwargs)


    def ComputeRasterMinMax(self, *args):
        """ComputeRasterMinMax(Band self, int approx_ok=0)"""
        return _gdal.Band_ComputeRasterMinMax(self, *args)


    def ComputeBandStats(self, *args):
        """ComputeBandStats(Band self, int samplestep=1)"""
        return _gdal.Band_ComputeBandStats(self, *args)


    def Fill(self, *args):
        """Fill(Band self, double real_fill, double imag_fill=0.0) -> CPLErr"""
        return _gdal.Band_Fill(self, *args)


    def WriteRaster(self, *args, **kwargs):
        """WriteRaster(Band self, int xoff, int yoff, int xsize, int ysize, GIntBig buf_len, int * buf_xsize=None, int * buf_ysize=None, int * buf_type=None, int * buf_pixel_space=None, int * buf_line_space=None) -> CPLErr"""
        return _gdal.Band_WriteRaster(self, *args, **kwargs)


    def FlushCache(self, *args):
        """FlushCache(Band self)"""
        return _gdal.Band_FlushCache(self, *args)


    def GetRasterColorTable(self, *args):
        """GetRasterColorTable(Band self) -> ColorTable"""
        return _gdal.Band_GetRasterColorTable(self, *args)


    def GetColorTable(self, *args):
        """GetColorTable(Band self) -> ColorTable"""
        return _gdal.Band_GetColorTable(self, *args)


    def SetRasterColorTable(self, *args):
        """SetRasterColorTable(Band self, ColorTable arg) -> int"""
        return _gdal.Band_SetRasterColorTable(self, *args)


    def SetColorTable(self, *args):
        """SetColorTable(Band self, ColorTable arg) -> int"""
        return _gdal.Band_SetColorTable(self, *args)


    def GetDefaultRAT(self, *args):
        """GetDefaultRAT(Band self) -> RasterAttributeTable"""
        return _gdal.Band_GetDefaultRAT(self, *args)


    def SetDefaultRAT(self, *args):
        """SetDefaultRAT(Band self, RasterAttributeTable table) -> int"""
        return _gdal.Band_SetDefaultRAT(self, *args)


    def GetMaskBand(self, *args):
        """GetMaskBand(Band self) -> Band"""
        return _gdal.Band_GetMaskBand(self, *args)


    def GetMaskFlags(self, *args):
        """GetMaskFlags(Band self) -> int"""
        return _gdal.Band_GetMaskFlags(self, *args)


    def CreateMaskBand(self, *args):
        """CreateMaskBand(Band self, int nFlags) -> CPLErr"""
        return _gdal.Band_CreateMaskBand(self, *args)


    def GetHistogram(self, *args, **kwargs):
        """GetHistogram(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"""
        return _gdal.Band_GetHistogram(self, *args, **kwargs)


    def GetDefaultHistogram(self, *args, **kwargs):
        """GetDefaultHistogram(Band self, double * min_ret=None, double * max_ret=None, int * buckets_ret=None, int ** ppanHistogram=None, int force=1, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr"""
        return _gdal.Band_GetDefaultHistogram(self, *args, **kwargs)


    def SetDefaultHistogram(self, *args):
        """SetDefaultHistogram(Band self, double min, double max, int buckets_in) -> CPLErr"""
        return _gdal.Band_SetDefaultHistogram(self, *args)


    def HasArbitraryOverviews(self, *args):
        """HasArbitraryOverviews(Band self) -> bool"""
        return _gdal.Band_HasArbitraryOverviews(self, *args)


    def GetCategoryNames(self, *args):
        """GetCategoryNames(Band self) -> char **"""
        return _gdal.Band_GetCategoryNames(self, *args)


    def SetCategoryNames(self, *args):
        """SetCategoryNames(Band self, char ** papszCategoryNames) -> CPLErr"""
        return _gdal.Band_SetCategoryNames(self, *args)


    def GetVirtualMem(self, *args, **kwargs):
        """GetVirtualMem(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"""
        return _gdal.Band_GetVirtualMem(self, *args, **kwargs)


    def GetVirtualMemAuto(self, *args, **kwargs):
        """GetVirtualMemAuto(Band self, GDALRWFlag eRWFlag, char ** options=None) -> VirtualMem"""
        return _gdal.Band_GetVirtualMemAuto(self, *args, **kwargs)


    def GetTiledVirtualMem(self, *args, **kwargs):
        """GetTiledVirtualMem(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"""
        return _gdal.Band_GetTiledVirtualMem(self, *args, **kwargs)


    def ReadRaster1(self, *args, **kwargs):
        """ReadRaster1(Band self, int xoff, int yoff, int xsize, int ysize, int * buf_xsize=None, int * buf_ysize=None, int * buf_type=None, int * buf_pixel_space=None, int * buf_line_space=None) -> CPLErr"""
        return _gdal.Band_ReadRaster1(self, *args, **kwargs)


    def ReadBlock(self, *args, **kwargs):
        """ReadBlock(Band self, int xoff, int yoff) -> CPLErr"""
        return _gdal.Band_ReadBlock(self, *args, **kwargs)



    def ReadRaster(self, xoff = 0, yoff = 0, xsize = None, ysize = None,
                     buf_xsize = None, buf_ysize = None, buf_type = None,
                     buf_pixel_space = None, buf_line_space = None ):

        if xsize is None:
            xsize = self.XSize
        if ysize is None:
            ysize = self.YSize

        return _gdal.Band_ReadRaster1(self, xoff, yoff, xsize, ysize,
                                      buf_xsize, buf_ysize, buf_type,
                                      buf_pixel_space, buf_line_space)

    def ReadAsArray(self, xoff=0, yoff=0, win_xsize=None, win_ysize=None,
                    buf_xsize=None, buf_ysize=None, buf_obj=None):
        import gdalnumeric

        return gdalnumeric.BandReadAsArray( self, xoff, yoff,
                                            win_xsize, win_ysize,
                                            buf_xsize, buf_ysize, buf_obj )

    def WriteArray(self, array, xoff=0, yoff=0):
        import gdalnumeric

        return gdalnumeric.BandWriteArray( self, array, xoff, yoff )

    def GetVirtualMemArray(self, eAccess = gdalconst.GF_Read, xoff=0, yoff=0,
                           xsize=None, ysize=None, bufxsize=None, bufysize=None,
                           datatype = None,
                           cache_size = 10 * 1024 * 1024, page_size_hint = 0,
                           options = None):
          """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.
          """
          import gdalnumeric
          if xsize is None:
              xsize = self.XSize
          if ysize is None:
              ysize = self.YSize
          if bufxsize is None:
              bufxsize = self.XSize
          if bufysize is None:
              bufysize = self.YSize
          if datatype is None:
              datatype = self.DataType
          if options is None:
              virtualmem = self.GetVirtualMem(eAccess,xoff,yoff,xsize,ysize,bufxsize,bufysize,datatype,cache_size,page_size_hint)
          else:
              virtualmem = self.GetVirtualMem(eAccess,xoff,yoff,xsize,ysize,bufxsize,bufysize,datatype,cache_size,page_size_hint,options)
          return gdalnumeric.VirtualMemGetArray( virtualmem )

    def GetVirtualMemAutoArray(self, eAccess = gdalconst.GF_Read, options = None):
          """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.
          """
          import gdalnumeric
          if options is None:
              virtualmem = self.GetVirtualMemAuto(eAccess)
          else:
              virtualmem = self.GetVirtualMemAuto(eAccess,options)
          return gdalnumeric.VirtualMemGetArray( virtualmem )

    def GetTiledVirtualMemArray(self, eAccess = gdalconst.GF_Read, xoff=0, yoff=0,
                             xsize=None, ysize=None, tilexsize=256, tileysize=256,
                             datatype = None,
                             cache_size = 10 * 1024 * 1024, options = None):
          """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.
          """
          import gdalnumeric
          if xsize is None:
              xsize = self.XSize
          if ysize is None:
              ysize = self.YSize
          if datatype is None:
              datatype = self.DataType
          if options is None:
              virtualmem = self.GetTiledVirtualMem(eAccess,xoff,yoff,xsize,ysize,tilexsize,tileysize,datatype,cache_size)
          else:
              virtualmem = self.GetTiledVirtualMem(eAccess,xoff,yoff,xsize,ysize,tilexsize,tileysize,datatype,cache_size,options)
          return gdalnumeric.VirtualMemGetArray( virtualmem )

    def __get_array_interface__(self):
        shape = [1, self.XSize, self.YSize]


Band_swigregister = _gdal.Band_swigregister
Band_swigregister(Band)

class ColorTable(_object):
    """Proxy of C++ GDALColorTableShadow class."""

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ColorTable, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ColorTable, name)
    __repr__ = _swig_repr

    def __init__(self, *args, **kwargs):
        """__init__(GDALColorTableShadow self, GDALPaletteInterp palette) -> ColorTable"""
        this = _gdal.new_ColorTable(*args, **kwargs)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _gdal.delete_ColorTable
    __del__ = lambda self: None

    def Clone(self, *args):
        """Clone(ColorTable self) -> ColorTable"""
        return _gdal.ColorTable_Clone(self, *args)


    def GetPaletteInterpretation(self, *args):
        """GetPaletteInterpretation(ColorTable self) -> GDALPaletteInterp"""
        return _gdal.ColorTable_GetPaletteInterpretation(self, *args)


    def GetCount(self, *args):
        """GetCount(ColorTable self) -> int"""
        return _gdal.ColorTable_GetCount(self, *args)


    def GetColorEntry(self, *args):
        """GetColorEntry(ColorTable self, int entry) -> ColorEntry"""
        return _gdal.ColorTable_GetColorEntry(self, *args)


    def GetColorEntryAsRGB(self, *args):
        """GetColorEntryAsRGB(ColorTable self, int entry, ColorEntry centry) -> int"""
        return _gdal.ColorTable_GetColorEntryAsRGB(self, *args)


    def SetColorEntry(self, *args):
        """SetColorEntry(ColorTable self, int entry, ColorEntry centry)"""
        return _gdal.ColorTable_SetColorEntry(self, *args)


    def CreateColorRamp(self, *args):
        """CreateColorRamp(ColorTable self, int nStartIndex, ColorEntry startcolor, int nEndIndex, ColorEntry endcolor)"""
        return _gdal.ColorTable_CreateColorRamp(self, *args)

ColorTable_swigregister = _gdal.ColorTable_swigregister
ColorTable_swigregister(ColorTable)

class RasterAttributeTable(_object):
    """Proxy of C++ GDALRasterAttributeTableShadow class."""

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, RasterAttributeTable, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, RasterAttributeTable, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """__init__(GDALRasterAttributeTableShadow self) -> RasterAttributeTable"""
        this = _gdal.new_RasterAttributeTable(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _gdal.delete_RasterAttributeTable
    __del__ = lambda self: None

    def Clone(self, *args):
        """Clone(RasterAttributeTable self) -> RasterAttributeTable"""
        return _gdal.RasterAttributeTable_Clone(self, *args)


    def GetColumnCount(self, *args):
        """GetColumnCount(RasterAttributeTable self) -> int"""
        return _gdal.RasterAttributeTable_GetColumnCount(self, *args)


    def GetNameOfCol(self, *args):
        """GetNameOfCol(RasterAttributeTable self, int iCol) -> char const *"""
        return _gdal.RasterAttributeTable_GetNameOfCol(self, *args)


    def GetUsageOfCol(self, *args):
        """GetUsageOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldUsage"""
        return _gdal.RasterAttributeTable_GetUsageOfCol(self, *args)


    def GetTypeOfCol(self, *args):
        """GetTypeOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldType"""
        return _gdal.RasterAttributeTable_GetTypeOfCol(self, *args)


    def GetColOfUsage(self, *args):
        """GetColOfUsage(RasterAttributeTable self, GDALRATFieldUsage eUsage) -> int"""
        return _gdal.RasterAttributeTable_GetColOfUsage(self, *args)


    def GetRowCount(self, *args):
        """GetRowCount(RasterAttributeTable self) -> int"""
        return _gdal.RasterAttributeTable_GetRowCount(self, *args)


    def GetValueAsString(self, *args):
        """GetValueAsString(RasterAttributeTable self, int iRow, int iCol) -> char const *"""
        return _gdal.RasterAttributeTable_GetValueAsString(self, *args)


    def GetValueAsInt(self, *args):
        """GetValueAsInt(RasterAttributeTable self, int iRow, int iCol) -> int"""
        return _gdal.RasterAttributeTable_GetValueAsInt(self, *args)


    def GetValueAsDouble(self, *args):
        """GetValueAsDouble(RasterAttributeTable self, int iRow, int iCol) -> double"""
        return _gdal.RasterAttributeTable_GetValueAsDouble(self, *args)


    def SetValueAsString(self, *args):
        """SetValueAsString(RasterAttributeTable self, int iRow, int iCol, char const * pszValue)"""
        return _gdal.RasterAttributeTable_SetValueAsString(self, *args)


    def SetValueAsInt(self, *args):
        """SetValueAsInt(RasterAttributeTable self, int iRow, int iCol, int nValue)"""
        return _gdal.RasterAttributeTable_SetValueAsInt(self, *args)


    def SetValueAsDouble(self, *args):
        """SetValueAsDouble(RasterAttributeTable self, int iRow, int iCol, double dfValue)"""
        return _gdal.RasterAttributeTable_SetValueAsDouble(self, *args)


    def SetRowCount(self, *args):
        """SetRowCount(RasterAttributeTable self, int nCount)"""
        return _gdal.RasterAttributeTable_SetRowCount(self, *args)


    def CreateColumn(self, *args):
        """CreateColumn(RasterAttributeTable self, char const * pszName, GDALRATFieldType eType, GDALRATFieldUsage eUsage) -> int"""
        return _gdal.RasterAttributeTable_CreateColumn(self, *args)


    def GetLinearBinning(self, *args):
        """GetLinearBinning(RasterAttributeTable self) -> bool"""
        return _gdal.RasterAttributeTable_GetLinearBinning(self, *args)


    def SetLinearBinning(self, *args):
        """SetLinearBinning(RasterAttributeTable self, double dfRow0Min, double dfBinSize) -> int"""
        return _gdal.RasterAttributeTable_SetLinearBinning(self, *args)


    def GetRowOfValue(self, *args):
        """GetRowOfValue(RasterAttributeTable self, double dfValue) -> int"""
        return _gdal.RasterAttributeTable_GetRowOfValue(self, *args)


    def ChangesAreWrittenToFile(self, *args):
        """ChangesAreWrittenToFile(RasterAttributeTable self) -> int"""
        return _gdal.RasterAttributeTable_ChangesAreWrittenToFile(self, *args)


    def WriteArray(self, array, field, start=0):
        import gdalnumeric

        return gdalnumeric.RATWriteArray(self, array, field, start)

    def ReadAsArray(self, field, start=0, length=None):
        import gdalnumeric

        return gdalnumeric.RATReadArray(self, field, start, length)

RasterAttributeTable_swigregister = _gdal.RasterAttributeTable_swigregister
RasterAttributeTable_swigregister(RasterAttributeTable)


def TermProgress_nocb(*args, **kwargs):
    """TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int"""
    return _gdal.TermProgress_nocb(*args, **kwargs)

_gdal.TermProgress_swigconstant(_gdal)
TermProgress = _gdal.TermProgress

def ComputeMedianCutPCT(*args, **kwargs):
    """ComputeMedianCutPCT(Band red, Band green, Band blue, int num_colors, ColorTable colors, GDALProgressFunc callback=0, void * callback_data=None) -> int"""
    return _gdal.ComputeMedianCutPCT(*args, **kwargs)

def DitherRGB2PCT(*args, **kwargs):
    """DitherRGB2PCT(Band red, Band green, Band blue, Band target, ColorTable colors, GDALProgressFunc callback=0, void * callback_data=None) -> int"""
    return _gdal.DitherRGB2PCT(*args, **kwargs)

def ReprojectImage(*args):
    """ReprojectImage(Dataset src_ds, Dataset dst_ds, char const * src_wkt=None, char const * dst_wkt=None, GDALResampleAlg eResampleAlg, double WarpMemoryLimit=0.0, double maxerror=0.0, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr"""
    return _gdal.ReprojectImage(*args)

def ComputeProximity(*args, **kwargs):
    """ComputeProximity(Band srcBand, Band proximityBand, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"""
    return _gdal.ComputeProximity(*args, **kwargs)

def RasterizeLayer(*args, **kwargs):
    """RasterizeLayer(Dataset dataset, int bands, OGRLayerShadow * layer, void * pfnTransformer=None, void * pTransformArg=None, int burn_values=0, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"""
    return _gdal.RasterizeLayer(*args, **kwargs)

def Polygonize(*args, **kwargs):
    """Polygonize(Band srcBand, Band maskBand, OGRLayerShadow * outLayer, int iPixValField, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"""
    return _gdal.Polygonize(*args, **kwargs)

def FillNodata(*args, **kwargs):
    """FillNodata(Band targetBand, Band maskBand, double maxSearchDist, int smoothingIterations, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"""
    return _gdal.FillNodata(*args, **kwargs)

def SieveFilter(*args, **kwargs):
    """SieveFilter(Band srcBand, Band maskBand, Band dstBand, int threshold, int connectedness=4, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"""
    return _gdal.SieveFilter(*args, **kwargs)

def RegenerateOverviews(*args, **kwargs):
    """RegenerateOverviews(Band srcBand, int overviewBandCount, char const * resampling, GDALProgressFunc callback=0, void * callback_data=None) -> int"""
    return _gdal.RegenerateOverviews(*args, **kwargs)

def RegenerateOverview(*args, **kwargs):
    """RegenerateOverview(Band srcBand, Band overviewBand, char const * resampling, GDALProgressFunc callback=0, void * callback_data=None) -> int"""
    return _gdal.RegenerateOverview(*args, **kwargs)

def ContourGenerate(*args, **kwargs):
    """ContourGenerate(Band srcBand, double contourInterval, double contourBase, int fixedLevelCount, int useNoData, double noDataValue, OGRLayerShadow * dstLayer, int idField, int elevField, GDALProgressFunc callback=0, void * callback_data=None) -> int"""
    return _gdal.ContourGenerate(*args, **kwargs)

def AutoCreateWarpedVRT(*args):
    """AutoCreateWarpedVRT(Dataset src_ds, char const * src_wkt=None, char const * dst_wkt=None, GDALResampleAlg eResampleAlg, double maxerror=0.0) -> Dataset"""
    return _gdal.AutoCreateWarpedVRT(*args)
class Transformer(_object):
    """Proxy of C++ GDALTransformerInfoShadow class."""

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Transformer, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Transformer, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """__init__(GDALTransformerInfoShadow self, Dataset src, Dataset dst, char ** options) -> Transformer"""
        this = _gdal.new_Transformer(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _gdal.delete_Transformer
    __del__ = lambda self: None

    def TransformPoint(self, *args):
        """
        TransformPoint(Transformer self, int bDstToSrc, double [3] inout) -> int
        TransformPoint(Transformer self, int bDstToSrc, double x, double y, double z=0.0) -> int
        """
        return _gdal.Transformer_TransformPoint(self, *args)


    def TransformPoints(self, *args):
        """TransformPoints(Transformer self, int bDstToSrc, int nCount) -> int"""
        return _gdal.Transformer_TransformPoints(self, *args)


    def TransformGeolocations(self, *args, **kwargs):
        """TransformGeolocations(Transformer self, Band xBand, Band yBand, Band zBand, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> int"""
        return _gdal.Transformer_TransformGeolocations(self, *args, **kwargs)

Transformer_swigregister = _gdal.Transformer_swigregister
Transformer_swigregister(Transformer)


def ApplyGeoTransform(*args):
    """ApplyGeoTransform(double [6] padfGeoTransform, double dfPixel, double dfLine)"""
    return _gdal.ApplyGeoTransform(*args)

def InvGeoTransform(*args):
    """InvGeoTransform(double [6] gt_in) -> int"""
    return _gdal.InvGeoTransform(*args)

def VersionInfo(*args):
    """VersionInfo(char const * request) -> char const *"""
    return _gdal.VersionInfo(*args)

def AllRegister(*args):
    """AllRegister()"""
    return _gdal.AllRegister(*args)

def GDALDestroyDriverManager(*args):
    """GDALDestroyDriverManager()"""
    return _gdal.GDALDestroyDriverManager(*args)

def GetCacheMax(*args):
    """GetCacheMax() -> GIntBig"""
    return _gdal.GetCacheMax(*args)

def GetCacheUsed(*args):
    """GetCacheUsed() -> GIntBig"""
    return _gdal.GetCacheUsed(*args)

def SetCacheMax(*args):
    """SetCacheMax(GIntBig nBytes)"""
    return _gdal.SetCacheMax(*args)

def GetDataTypeSize(*args):
    """GetDataTypeSize(GDALDataType eDataType) -> int"""
    return _gdal.GetDataTypeSize(*args)

def DataTypeIsComplex(*args):
    """DataTypeIsComplex(GDALDataType eDataType) -> int"""
    return _gdal.DataTypeIsComplex(*args)

def GetDataTypeName(*args):
    """GetDataTypeName(GDALDataType eDataType) -> char const *"""
    return _gdal.GetDataTypeName(*args)

def GetDataTypeByName(*args):
    """GetDataTypeByName(char const * pszDataTypeName) -> GDALDataType"""
    return _gdal.GetDataTypeByName(*args)

def GetColorInterpretationName(*args):
    """GetColorInterpretationName(GDALColorInterp eColorInterp) -> char const *"""
    return _gdal.GetColorInterpretationName(*args)

def GetPaletteInterpretationName(*args):
    """GetPaletteInterpretationName(GDALPaletteInterp ePaletteInterp) -> char const *"""
    return _gdal.GetPaletteInterpretationName(*args)

def DecToDMS(*args):
    """DecToDMS(double arg1, char const * arg2, int arg3=2) -> char const *"""
    return _gdal.DecToDMS(*args)

def PackedDMSToDec(*args):
    """PackedDMSToDec(double dfPacked) -> double"""
    return _gdal.PackedDMSToDec(*args)

def DecToPackedDMS(*args):
    """DecToPackedDMS(double dfDec) -> double"""
    return _gdal.DecToPackedDMS(*args)

def ParseXMLString(*args):
    """ParseXMLString(char * pszXMLString) -> CPLXMLNode *"""
    return _gdal.ParseXMLString(*args)

def SerializeXMLTree(*args):
    """SerializeXMLTree(CPLXMLNode * xmlnode) -> retStringAndCPLFree *"""
    return _gdal.SerializeXMLTree(*args)

def GetDriverCount(*args):
    """GetDriverCount() -> int"""
    return _gdal.GetDriverCount(*args)

def GetDriverByName(*args):
    """GetDriverByName(char const * name) -> Driver"""
    return _gdal.GetDriverByName(*args)

def GetDriver(*args):
    """GetDriver(int i) -> Driver"""
    return _gdal.GetDriver(*args)

def Open(*args):
    """Open(char const * utf8_path, GDALAccess eAccess) -> Dataset"""
    return _gdal.Open(*args)

def OpenShared(*args):
    """OpenShared(char const * utf8_path, GDALAccess eAccess) -> Dataset"""
    return _gdal.OpenShared(*args)

def IdentifyDriver(*args):
    """IdentifyDriver(char const * utf8_path, char ** papszSiblings=None) -> Driver"""
    return _gdal.IdentifyDriver(*args)

def GeneralCmdLineProcessor(*args):
    """GeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **"""
    return _gdal.GeneralCmdLineProcessor(*args)

__version__ = _gdal.VersionInfo("RELEASE_NAME") 

# This file is compatible with both classic and new-style classes.