GDAL 3.8.3__tar.gz → 3.8.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. {GDAL-3.8.3 → GDAL-3.8.5}/PKG-INFO +2 -2
  2. {GDAL-3.8.3 → GDAL-3.8.5}/README.rst +1 -1
  3. {GDAL-3.8.3 → GDAL-3.8.5}/extensions/gdal_wrap.cpp +5 -0
  4. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/GDAL.egg-info/PKG-INFO +2 -2
  5. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/__init__.py +1 -1
  6. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdal2tiles.py +4 -1
  7. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdalattachpct.py +32 -24
  8. {GDAL-3.8.3 → GDAL-3.8.5}/osgeo/gdal.py +26 -13
  9. {GDAL-3.8.3 → GDAL-3.8.5}/setup.py +1 -1
  10. {GDAL-3.8.3 → GDAL-3.8.5}/extensions/gdal_array_wrap.cpp +0 -0
  11. {GDAL-3.8.3 → GDAL-3.8.5}/extensions/gdalconst_wrap.c +0 -0
  12. {GDAL-3.8.3 → GDAL-3.8.5}/extensions/gnm_wrap.cpp +0 -0
  13. {GDAL-3.8.3 → GDAL-3.8.5}/extensions/ogr_wrap.cpp +0 -0
  14. {GDAL-3.8.3 → GDAL-3.8.5}/extensions/osr_wrap.cpp +0 -0
  15. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/GDAL.egg-info/SOURCES.txt +0 -0
  16. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/GDAL.egg-info/dependency_links.txt +0 -0
  17. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/GDAL.egg-info/not-zip-safe +0 -0
  18. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/GDAL.egg-info/requires.txt +0 -0
  19. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/GDAL.egg-info/top_level.txt +0 -0
  20. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/__init__.py +0 -0
  21. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/array_util.py +0 -0
  22. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/base.py +0 -0
  23. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/batch_creator.py +0 -0
  24. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/color_palette.py +0 -0
  25. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/color_table.py +0 -0
  26. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/extent_util.py +0 -0
  27. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/gdal_argparse.py +0 -0
  28. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/numpy_util.py +0 -0
  29. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/osr_util.py +0 -0
  30. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/progress.py +0 -0
  31. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/raster_creation.py +0 -0
  32. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/rectangle.py +0 -0
  33. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/auxiliary/util.py +0 -0
  34. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdal2xyz.py +0 -0
  35. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdal_calc.py +0 -0
  36. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdal_edit.py +0 -0
  37. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdal_fillnodata.py +0 -0
  38. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdal_merge.py +0 -0
  39. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdal_pansharpen.py +0 -0
  40. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdal_polygonize.py +0 -0
  41. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdal_proximity.py +0 -0
  42. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdal_retile.py +0 -0
  43. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdal_sieve.py +0 -0
  44. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdalcompare.py +0 -0
  45. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/gdalmove.py +0 -0
  46. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/ogr_layer_algebra.py +0 -0
  47. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/ogrmerge.py +0 -0
  48. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/pct2rgb.py +0 -0
  49. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/rgb2pct.py +0 -0
  50. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/__init__.py +0 -0
  51. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/assemblepoly.py +0 -0
  52. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/build_jp2_from_xml.py +0 -0
  53. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/classify.py +0 -0
  54. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/crs2crs2grid.py +0 -0
  55. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/densify.py +0 -0
  56. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/dump_jp2.py +0 -0
  57. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/epsg_tr.py +0 -0
  58. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/esri2wkt.py +0 -0
  59. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/fft.py +0 -0
  60. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/fix_gpkg.py +0 -0
  61. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gcps2ogr.py +0 -0
  62. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gcps2vec.py +0 -0
  63. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gcps2wld.py +0 -0
  64. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdal2grd.py +0 -0
  65. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdal_auth.py +0 -0
  66. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdal_cp.py +0 -0
  67. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdal_create_pdf.py +0 -0
  68. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdal_ls.py +0 -0
  69. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdal_lut.py +0 -0
  70. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdal_mkdir.py +0 -0
  71. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdal_remove_towgs84.py +0 -0
  72. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdal_rm.py +0 -0
  73. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdal_rmdir.py +0 -0
  74. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdal_vrtmerge.py +0 -0
  75. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdalchksum.py +0 -0
  76. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdalcopyproj.py +0 -0
  77. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdalfilter.py +0 -0
  78. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdalident.py +0 -0
  79. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdalimport.py +0 -0
  80. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdalinfo.py +0 -0
  81. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/gdallocationinfo.py +0 -0
  82. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/get_soundg.py +0 -0
  83. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/histrep.py +0 -0
  84. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/hsv_merge.py +0 -0
  85. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/jpeg_in_tiff_extract.py +0 -0
  86. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/load2odbc.py +0 -0
  87. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/loslas2ntv2.py +0 -0
  88. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/magphase.py +0 -0
  89. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/make_fuzzer_friendly_archive.py +0 -0
  90. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/mkgraticule.py +0 -0
  91. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/ogr2ogr.py +0 -0
  92. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/ogr2vrt.py +0 -0
  93. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/ogr_build_junction_table.py +0 -0
  94. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/ogr_dispatch.py +0 -0
  95. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/ogrinfo.py +0 -0
  96. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/ogrupdate.py +0 -0
  97. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/rel.py +0 -0
  98. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/tigerpoly.py +0 -0
  99. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/tile_extent_from_raster.py +0 -0
  100. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/tolatlong.py +0 -0
  101. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/val_repl.py +0 -0
  102. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/validate_cloud_optimized_geotiff.py +0 -0
  103. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/validate_geoparquet.py +0 -0
  104. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/validate_gpkg.py +0 -0
  105. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/validate_jp2.py +0 -0
  106. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/vec_tr.py +0 -0
  107. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/vec_tr_spat.py +0 -0
  108. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/osgeo_utils/samples/wcs_virtds_params.py +0 -0
  109. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdal2tiles.py +0 -0
  110. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdal2xyz.py +0 -0
  111. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdal_calc.py +0 -0
  112. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdal_edit.py +0 -0
  113. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdal_fillnodata.py +0 -0
  114. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdal_merge.py +0 -0
  115. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdal_pansharpen.py +0 -0
  116. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdal_polygonize.py +0 -0
  117. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdal_proximity.py +0 -0
  118. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdal_retile.py +0 -0
  119. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdal_sieve.py +0 -0
  120. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdalattachpct.py +0 -0
  121. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdalcompare.py +0 -0
  122. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/gdalmove.py +0 -0
  123. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/ogr_layer_algebra.py +0 -0
  124. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/ogrmerge.py +0 -0
  125. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/pct2rgb.py +0 -0
  126. {GDAL-3.8.3 → GDAL-3.8.5}/gdal-utils/scripts/rgb2pct.py +0 -0
  127. {GDAL-3.8.3 → GDAL-3.8.5}/osgeo/__init__.py +0 -0
  128. {GDAL-3.8.3 → GDAL-3.8.5}/osgeo/gdal_array.py +0 -0
  129. {GDAL-3.8.3 → GDAL-3.8.5}/osgeo/gdalconst.py +0 -0
  130. {GDAL-3.8.3 → GDAL-3.8.5}/osgeo/gdalnumeric.py +0 -0
  131. {GDAL-3.8.3 → GDAL-3.8.5}/osgeo/gnm.py +0 -0
  132. {GDAL-3.8.3 → GDAL-3.8.5}/osgeo/ogr.py +0 -0
  133. {GDAL-3.8.3 → GDAL-3.8.5}/osgeo/osr.py +0 -0
  134. {GDAL-3.8.3 → GDAL-3.8.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: GDAL
3
- Version: 3.8.3
3
+ Version: 3.8.5
4
4
  Summary: GDAL: Geospatial Data Abstraction Library
5
5
  Home-page: http://www.gdal.org
6
6
  Author: Frank Warmerdam
@@ -38,7 +38,7 @@ reference documentation, but the https://gdal.org/api/python_bindings.html#tutor
38
38
  Dependencies
39
39
  ------------
40
40
 
41
- * libgdal (3.8.3 or greater) and header files (gdal-devel)
41
+ * libgdal (3.8.5 or greater) and header files (gdal-devel)
42
42
  * numpy (1.0.0 or greater) and header files (numpy-devel) (not explicitly
43
43
  required, but many examples and utilities will not work without it)
44
44
 
@@ -13,7 +13,7 @@ reference documentation, but the https://gdal.org/api/python_bindings.html#tutor
13
13
  Dependencies
14
14
  ------------
15
15
 
16
- * libgdal (3.8.3 or greater) and header files (gdal-devel)
16
+ * libgdal (3.8.5 or greater) and header files (gdal-devel)
17
17
  * numpy (1.0.0 or greater) and header files (numpy-devel) (not explicitly
18
18
  required, but many examples and utilities will not work without it)
19
19
 
@@ -49966,6 +49966,11 @@ SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestDS(PyObject *self, PyObject *args
49966
49966
  psProgressInfo->psPyCallbackData = swig_obj[4] ;
49967
49967
  }
49968
49968
  }
49969
+ {
49970
+ if (!arg1) {
49971
+ SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
49972
+ }
49973
+ }
49969
49974
  {
49970
49975
  const int bLocalUseExceptions = GetUseExceptions();
49971
49976
  if ( bLocalUseExceptions ) {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: GDAL
3
- Version: 3.8.3
3
+ Version: 3.8.5
4
4
  Summary: GDAL: Geospatial Data Abstraction Library
5
5
  Home-page: http://www.gdal.org
6
6
  Author: Frank Warmerdam
@@ -38,7 +38,7 @@ reference documentation, but the https://gdal.org/api/python_bindings.html#tutor
38
38
  Dependencies
39
39
  ------------
40
40
 
41
- * libgdal (3.8.3 or greater) and header files (gdal-devel)
41
+ * libgdal (3.8.5 or greater) and header files (gdal-devel)
42
42
  * numpy (1.0.0 or greater) and header files (numpy-devel) (not explicitly
43
43
  required, but many examples and utilities will not work without it)
44
44
 
@@ -1,5 +1,5 @@
1
1
  __package_name__ = "gdal-utils"
2
- gdal_utils_version = (3, 8, 3, 0)
2
+ gdal_utils_version = (3, 8, 5, 0)
3
3
  __version__ = ".".join(str(i) for i in gdal_utils_version)
4
4
  __author__ = "Frank Warmerdam"
5
5
  __author_email__ = "warmerdam@pobox.com"
@@ -1573,7 +1573,10 @@ def create_overview_tile(
1573
1573
  gdal.Unlink(aux_xml)
1574
1574
 
1575
1575
  if options.verbose:
1576
- logger.debug(f"\tbuild from zoom {base_tz}, tiles: %s" % ",".join(base_tiles))
1576
+ logger.debug(
1577
+ f"\tbuild from zoom {base_tz}, tiles: %s"
1578
+ % ",".join(["(%d, %d)" % (t[0], t[1]) for t in base_tiles])
1579
+ )
1577
1580
 
1578
1581
  # Create a KML file for this tile.
1579
1582
  if tile_job_info.kml:
@@ -111,39 +111,47 @@ def doit(
111
111
  print("No color table on file ", pct_filename)
112
112
  return None, 1
113
113
 
114
- # =============================================================================
115
- # Create a MEM clone of the source file.
116
- # =============================================================================
117
-
118
- src_ds = open_ds(src_filename)
119
-
120
- mem_ds = gdal.GetDriverByName("MEM").CreateCopy("mem", src_ds)
121
-
122
- # =============================================================================
123
- # Assign the color table in memory.
124
- # =============================================================================
125
-
126
- mem_ds.GetRasterBand(1).SetRasterColorTable(ct)
127
- mem_ds.GetRasterBand(1).SetRasterColorInterpretation(gdal.GCI_PaletteIndex)
128
-
129
- # =============================================================================
130
- # Write the dataset to the output file.
131
- # =============================================================================
132
-
114
+ # Figure out destination driver
133
115
  if not driver_name:
134
116
  driver_name = GetOutputDriverFor(dst_filename)
135
117
 
136
118
  dst_driver = gdal.GetDriverByName(driver_name)
137
119
  if dst_driver is None:
138
- print('"%s" driver not registered.' % driver_name)
120
+ print(f'"{driver_name}" driver not registered.')
121
+ return None, 1
122
+
123
+ src_ds = open_ds(src_filename)
124
+ if src_ds is None:
125
+ print(f"Cannot open {src_filename}")
139
126
  return None, 1
140
127
 
141
- if driver_name.upper() == "MEM":
142
- out_ds = mem_ds
128
+ if driver_name.upper() == "VRT":
129
+ # For VRT, create the VRT first from the source dataset, so it
130
+ # correctly refers to it
131
+ out_ds = dst_driver.CreateCopy(dst_filename or "", src_ds)
132
+ if out_ds is None:
133
+ print(f"Cannot create {dst_filename}")
134
+ return None, 1
135
+
136
+ # And now assign the color table to the VRT
137
+ out_ds.GetRasterBand(1).SetRasterColorTable(ct)
138
+ out_ds.GetRasterBand(1).SetRasterColorInterpretation(gdal.GCI_PaletteIndex)
143
139
  else:
144
- out_ds = dst_driver.CreateCopy(dst_filename or "", mem_ds)
140
+ # Create a MEM clone of the source file.
141
+ mem_ds = gdal.GetDriverByName("MEM").CreateCopy("mem", src_ds)
142
+
143
+ # Assign the color table in memory.
144
+ mem_ds.GetRasterBand(1).SetRasterColorTable(ct)
145
+ mem_ds.GetRasterBand(1).SetRasterColorInterpretation(gdal.GCI_PaletteIndex)
146
+
147
+ # Write the dataset to the output file.
148
+ if driver_name.upper() == "MEM":
149
+ out_ds = mem_ds
150
+ else:
151
+ out_ds = dst_driver.CreateCopy(dst_filename or "", mem_ds)
152
+
153
+ mem_ds = None
145
154
 
146
- mem_ds = None
147
155
  src_ds = None
148
156
 
149
157
  return out_ds, 0
@@ -336,7 +336,8 @@ def InfoOptions(options=None, format='text', deserialize=True,
336
336
  if '-json' in new_options:
337
337
  format = 'json'
338
338
  else:
339
- new_options = options
339
+ import copy
340
+ new_options = copy.copy(options)
340
341
  if format == 'json':
341
342
  new_options += ['-json']
342
343
  elif format != "text":
@@ -455,7 +456,8 @@ def VectorInfoOptions(options=None,
455
456
  if '-json' in new_options:
456
457
  format = 'json'
457
458
  else:
458
- new_options = options
459
+ import copy
460
+ new_options = copy.copy(options)
459
461
  if format == 'json':
460
462
  new_options += ['-json']
461
463
  elif format != "text":
@@ -530,7 +532,8 @@ def MultiDimInfoOptions(options=None, detailed=False, array=None, arrayoptions=N
530
532
  if isinstance(options, str):
531
533
  new_options = ParseCommandLine(options)
532
534
  else:
533
- new_options = options
535
+ import copy
536
+ new_options = copy.copy(options)
534
537
  if detailed:
535
538
  new_options += ['-detailed']
536
539
  if array:
@@ -687,7 +690,8 @@ def TranslateOptions(options=None, format=None,
687
690
  if isinstance(options, str):
688
691
  new_options = ParseCommandLine(options)
689
692
  else:
690
- new_options = options
693
+ import copy
694
+ new_options = copy.copy(options)
691
695
  if format is not None:
692
696
  new_options += ['-of', format]
693
697
  if outputType != gdalconst.GDT_Unknown:
@@ -942,7 +946,8 @@ def WarpOptions(options=None, format=None,
942
946
  if isinstance(options, str):
943
947
  new_options = ParseCommandLine(options)
944
948
  else:
945
- new_options = options
949
+ import copy
950
+ new_options = copy.copy(options)
946
951
  if srcBands:
947
952
  for b in srcBands:
948
953
  new_options += ['-srcband', str(b)]
@@ -1288,7 +1293,8 @@ def VectorTranslateOptions(options=None, format=None,
1288
1293
  if isinstance(options, str):
1289
1294
  new_options = ParseCommandLine(options)
1290
1295
  else:
1291
- new_options = options
1296
+ import copy
1297
+ new_options = copy.copy(options)
1292
1298
  if format is not None:
1293
1299
  new_options += ['-f', format]
1294
1300
  if srcSRS is not None:
@@ -1557,7 +1563,8 @@ def DEMProcessingOptions(options=None, colorFilename=None, format=None,
1557
1563
  if isinstance(options, str):
1558
1564
  new_options = ParseCommandLine(options)
1559
1565
  else:
1560
- new_options = options
1566
+ import copy
1567
+ new_options = copy.copy(options)
1561
1568
  if format is not None:
1562
1569
  new_options += ['-of', format]
1563
1570
  if creationOptions is not None:
@@ -1689,7 +1696,8 @@ def NearblackOptions(options=None, format=None,
1689
1696
  if isinstance(options, str):
1690
1697
  new_options = ParseCommandLine(options)
1691
1698
  else:
1692
- new_options = options
1699
+ import copy
1700
+ new_options = copy.copy(options)
1693
1701
  if format is not None:
1694
1702
  new_options += ['-of', format]
1695
1703
  if creationOptions is not None:
@@ -1834,7 +1842,8 @@ def GridOptions(options=None, format=None,
1834
1842
  if isinstance(options, str):
1835
1843
  new_options = ParseCommandLine(options)
1836
1844
  else:
1837
- new_options = options
1845
+ import copy
1846
+ new_options = copy.copy(options)
1838
1847
  if format is not None:
1839
1848
  new_options += ['-of', format]
1840
1849
  if outputType != gdalconst.GDT_Unknown:
@@ -2001,7 +2010,8 @@ def RasterizeOptions(options=None, format=None,
2001
2010
  if isinstance(options, str):
2002
2011
  new_options = ParseCommandLine(options)
2003
2012
  else:
2004
- new_options = options
2013
+ import copy
2014
+ new_options = copy.copy(options)
2005
2015
  if format is not None:
2006
2016
  new_options += ['-of', format]
2007
2017
  if outputType != gdalconst.GDT_Unknown:
@@ -2184,7 +2194,8 @@ def FootprintOptions(options=None,
2184
2194
  if isinstance(options, str):
2185
2195
  new_options = ParseCommandLine(options)
2186
2196
  else:
2187
- new_options = options
2197
+ import copy
2198
+ new_options = copy.copy(options)
2188
2199
  if format is not None:
2189
2200
  new_options += ['-of', format]
2190
2201
  if bands is not None:
@@ -2400,7 +2411,8 @@ def BuildVRTOptions(options=None,
2400
2411
  if isinstance(options, str):
2401
2412
  new_options = ParseCommandLine(options)
2402
2413
  else:
2403
- new_options = options
2414
+ import copy
2415
+ new_options = copy.copy(options)
2404
2416
  if resolution is not None:
2405
2417
  new_options += ['-resolution', str(resolution)]
2406
2418
  if outputBounds is not None:
@@ -2528,7 +2540,8 @@ def MultiDimTranslateOptions(options=None, format=None, creationOptions=None,
2528
2540
  if isinstance(options, str):
2529
2541
  new_options = ParseCommandLine(options)
2530
2542
  else:
2531
- new_options = options
2543
+ import copy
2544
+ new_options = copy.copy(options)
2532
2545
  if format is not None:
2533
2546
  new_options += ['-of', format]
2534
2547
  if creationOptions is not None:
@@ -16,7 +16,7 @@ from setuptools import setup
16
16
  from setuptools import find_packages
17
17
  from setuptools import Extension
18
18
 
19
- version = '3.8.3'
19
+ version = '3.8.5'
20
20
 
21
21
  # If CXX is defined in the environment, it will be used to link the .so
22
22
  # but setuptools will be confused if it is made of several words like 'ccache g++'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes