GDAL 3.9.2__tar.gz → 3.10.0__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 (136) hide show
  1. {gdal-3.9.2 → gdal-3.10}/PKG-INFO +74 -27
  2. {gdal-3.9.2 → gdal-3.10}/README.rst +73 -26
  3. {gdal-3.9.2 → gdal-3.10}/extensions/gdal_array_wrap.cpp +464 -202
  4. {gdal-3.9.2 → gdal-3.10}/extensions/gdal_wrap.cpp +4181 -1026
  5. {gdal-3.9.2 → gdal-3.10}/extensions/gdalconst_wrap.c +376 -131
  6. {gdal-3.9.2 → gdal-3.10}/extensions/gnm_wrap.cpp +482 -225
  7. {gdal-3.9.2 → gdal-3.10}/extensions/ogr_wrap.cpp +1612 -3114
  8. {gdal-3.9.2 → gdal-3.10}/extensions/osr_wrap.cpp +817 -306
  9. {gdal-3.9.2 → gdal-3.10}/gdal-utils/GDAL.egg-info/PKG-INFO +74 -27
  10. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/__init__.py +1 -1
  11. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/array_util.py +1 -17
  12. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/base.py +1 -17
  13. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/batch_creator.py +1 -17
  14. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/color_palette.py +1 -17
  15. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/color_table.py +1 -17
  16. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/extent_util.py +1 -17
  17. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/gdal_argparse.py +1 -17
  18. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/numpy_util.py +1 -17
  19. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/osr_util.py +1 -17
  20. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/progress.py +1 -17
  21. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/raster_creation.py +1 -17
  22. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/rectangle.py +1 -17
  23. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/util.py +1 -17
  24. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdal2tiles.py +3 -19
  25. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdal2xyz.py +1 -17
  26. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdal_calc.py +1 -17
  27. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdal_edit.py +11 -36
  28. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdal_fillnodata.py +1 -17
  29. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdal_merge.py +1 -1
  30. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdal_pansharpen.py +1 -17
  31. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdal_polygonize.py +1 -17
  32. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdal_proximity.py +2 -18
  33. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdal_retile.py +32 -48
  34. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdal_sieve.py +1 -17
  35. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdalattachpct.py +2 -18
  36. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdalcompare.py +2 -18
  37. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/gdalmove.py +2 -18
  38. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/ogr_layer_algebra.py +3 -19
  39. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/ogrmerge.py +2 -18
  40. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/pct2rgb.py +1 -17
  41. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/rgb2pct.py +1 -17
  42. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/assemblepoly.py +1 -17
  43. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/build_jp2_from_xml.py +1 -17
  44. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/classify.py +1 -17
  45. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/crs2crs2grid.py +44 -75
  46. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/densify.py +1 -17
  47. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/dump_jp2.py +1 -17
  48. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/epsg_tr.py +1 -17
  49. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/esri2wkt.py +1 -17
  50. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/fft.py +1 -17
  51. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/fix_gpkg.py +1 -17
  52. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gcps2ogr.py +1 -17
  53. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gcps2vec.py +1 -17
  54. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gcps2wld.py +1 -17
  55. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdal2grd.py +1 -17
  56. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdal_auth.py +1 -17
  57. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdal_cp.py +1 -17
  58. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdal_create_pdf.py +1 -17
  59. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdal_ls.py +1 -17
  60. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdal_lut.py +1 -17
  61. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdal_mkdir.py +1 -17
  62. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdal_remove_towgs84.py +1 -17
  63. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdal_rm.py +1 -17
  64. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdal_rmdir.py +1 -17
  65. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdalbuildvrtofvrt.py +1 -17
  66. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdalchksum.py +1 -17
  67. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdalcopyproj.py +1 -17
  68. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdalfilter.py +1 -17
  69. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdalident.py +1 -17
  70. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdalimport.py +1 -17
  71. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdalinfo.py +3 -20
  72. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdallocationinfo.py +1 -17
  73. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/get_soundg.py +1 -17
  74. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/histrep.py +1 -17
  75. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/hsv_merge.py +1 -17
  76. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/jpeg_in_tiff_extract.py +1 -17
  77. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/load2odbc.py +1 -17
  78. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/loslas2ntv2.py +1 -17
  79. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/magphase.py +1 -17
  80. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/make_fuzzer_friendly_archive.py +1 -17
  81. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/mkgraticule.py +1 -17
  82. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/ogr2vrt.py +1 -17
  83. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/ogr_build_junction_table.py +1 -17
  84. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/ogr_dispatch.py +1 -17
  85. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/ogrinfo.py +1 -17
  86. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/ogrupdate.py +1 -17
  87. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/rel.py +1 -17
  88. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/tigerpoly.py +1 -17
  89. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/tile_extent_from_raster.py +1 -17
  90. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/tolatlong.py +1 -17
  91. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/val_repl.py +1 -17
  92. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/validate_cloud_optimized_geotiff.py +3 -17
  93. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/validate_geoparquet.py +1 -17
  94. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/validate_gpkg.py +21 -23
  95. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/validate_jp2.py +1 -17
  96. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/vec_tr.py +1 -17
  97. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/vec_tr_spat.py +1 -17
  98. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/wcs_virtds_params.py +1 -17
  99. {gdal-3.9.2 → gdal-3.10}/osgeo/__init__.py +2 -4
  100. {gdal-3.9.2 → gdal-3.10}/osgeo/gdal.py +442 -75
  101. {gdal-3.9.2 → gdal-3.10}/osgeo/gdal_array.py +16 -21
  102. {gdal-3.9.2 → gdal-3.10}/osgeo/gdalconst.py +24 -1
  103. {gdal-3.9.2 → gdal-3.10}/osgeo/gnm.py +1 -1
  104. {gdal-3.9.2 → gdal-3.10}/osgeo/ogr.py +138 -655
  105. {gdal-3.9.2 → gdal-3.10}/osgeo/osr.py +22 -3
  106. {gdal-3.9.2 → gdal-3.10}/setup.py +16 -4
  107. {gdal-3.9.2 → gdal-3.10}/gdal-utils/GDAL.egg-info/SOURCES.txt +0 -0
  108. {gdal-3.9.2 → gdal-3.10}/gdal-utils/GDAL.egg-info/dependency_links.txt +0 -0
  109. {gdal-3.9.2 → gdal-3.10}/gdal-utils/GDAL.egg-info/entry_points.txt +0 -0
  110. {gdal-3.9.2 → gdal-3.10}/gdal-utils/GDAL.egg-info/not-zip-safe +0 -0
  111. {gdal-3.9.2 → gdal-3.10}/gdal-utils/GDAL.egg-info/requires.txt +0 -0
  112. {gdal-3.9.2 → gdal-3.10}/gdal-utils/GDAL.egg-info/top_level.txt +0 -0
  113. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/auxiliary/__init__.py +0 -0
  114. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/__init__.py +0 -0
  115. {gdal-3.9.2 → gdal-3.10}/gdal-utils/osgeo_utils/samples/gdal_vrtmerge.py +0 -0
  116. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdal2tiles.py +0 -0
  117. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdal2xyz.py +0 -0
  118. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdal_calc.py +0 -0
  119. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdal_edit.py +0 -0
  120. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdal_fillnodata.py +0 -0
  121. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdal_merge.py +0 -0
  122. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdal_pansharpen.py +0 -0
  123. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdal_polygonize.py +0 -0
  124. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdal_proximity.py +0 -0
  125. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdal_retile.py +0 -0
  126. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdal_sieve.py +0 -0
  127. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdalattachpct.py +0 -0
  128. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdalcompare.py +0 -0
  129. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/gdalmove.py +0 -0
  130. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/ogr_layer_algebra.py +0 -0
  131. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/ogrmerge.py +0 -0
  132. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/pct2rgb.py +0 -0
  133. {gdal-3.9.2 → gdal-3.10}/gdal-utils/scripts/rgb2pct.py +0 -0
  134. {gdal-3.9.2 → gdal-3.10}/osgeo/gdalnumeric.py +0 -0
  135. {gdal-3.9.2 → gdal-3.10}/pyproject.toml +0 -0
  136. {gdal-3.9.2 → gdal-3.10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: GDAL
3
- Version: 3.9.2
3
+ Version: 3.10.0
4
4
  Summary: GDAL: Geospatial Data Abstraction Library
5
5
  Home-page: http://www.gdal.org
6
6
  Author: Frank Warmerdam, Howard Butler, Even Rouault
@@ -35,38 +35,76 @@ GDAL/OGR in Python
35
35
 
36
36
  This Python package and extensions are a number of tools for programming and
37
37
  manipulating the GDAL_ Geospatial Data Abstraction Library.
38
-
39
- The GDAL project maintains SWIG generated Python
40
- bindings for GDAL/OGR. Generally speaking the classes and methods mostly
38
+ Generally speaking the classes and methods mostly
41
39
  match those of the GDAL and OGR C++ classes. There is no Python specific
42
40
  reference documentation, but the https://gdal.org/api/python_bindings.html#tutorials includes Python examples.
43
41
 
42
+ The GDAL Python package is built using `SWIG <https://www.swig.org>`__.
43
+ The GDAL project maintains these Python bindings for GDAL/OGR within
44
+ the gdal source tree.
45
+ The SWIG-generated files are not checked in and are not part of the
46
+ gdal release tarballs. The bindings are also made available via PyPi
47
+ where the swig-generated files are provided.
48
+
49
+ Building from source
50
+ --------------------
51
+
52
+ To build from source, there are multiple possible paths.
53
+
44
54
  Dependencies
45
- ------------
55
+ ~~~~~~~~~~~~
46
56
 
47
- * libgdal (3.9.2 or greater) and header files (gdal-devel)
48
- * numpy (1.0.0 or greater) and header files (numpy-devel) (not explicitly
49
- required, but many examples and utilities will not work without it)
57
+ (As usual, when a package is listed one needs the parts used to build
58
+ programs against it, called -devel on many systems. This is not
59
+ special about gdal.)
50
60
 
51
- Installation
52
- ------------
61
+ * SWIG (4 or greater).
53
62
 
54
- Conda
55
- ~~~~~
63
+ * libgdal (3.10.0 or greater).
56
64
 
57
- GDAL can be quite complex to build and install, particularly on Windows and MacOS.
58
- Pre built binaries are provided for the conda system:
65
+ * numpy (1.0.0 or greater). This is not force-required by the build,
66
+ but many examples and utilities will not work without it. At least
67
+ osgeo.gdal_array requires numpy at build time; building without
68
+ numpy and installing it later does not result in correct operation.
69
+ apparently not and in any case it is an unwarranted leap.
59
70
 
60
- https://docs.conda.io/en/latest/
71
+ * setuptools (python)
61
72
 
62
- By the conda-forge project:
73
+ * wheel (python)
63
74
 
64
- https://conda-forge.org/
75
+ Building when building the rest of GDAL
76
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65
77
 
66
- Once you have Anaconda or Miniconda installed, you should be able to install GDAL with:
78
+ Python bindings are generated by default when building GDAL from source.
79
+ For more detail, see `Python bindings options <https://gdal.org/development/building_from_source.html#building-python-bindings>`__
67
80
 
68
- ``conda install -c conda-forge gdal``
81
+ Building just the bindings, from the full tree
82
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69
83
 
84
+ Another is to use the gdal source distribution with an
85
+ already-installed gdal library and headers. To do this, one must
86
+ create a build directory and run cmake to generate build scripts. Then,
87
+ run ``cmake --build . --target python_generated_files``. Finally, in swig/python,
88
+ one can build using setup.py like any other distributed python module.
89
+
90
+ Building from the PyPi module file
91
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92
+
93
+ The third is to obtain the PyPi-hosted module file, within which swig
94
+ has been run; this saves running cmake and generating bindings. See
95
+ HOWTO-RELEASE for how this is created. Because swig has been run, it
96
+ need not be installed.
97
+
98
+
99
+ Installation via packging systems
100
+ ---------------------------------
101
+
102
+ General
103
+ ~~~~~~~
104
+
105
+ Many packaging systems (on GNU/Linux, various BSDs) provide the
106
+ bindings as a package. Specific instruction are given in cases when
107
+ that hint might not be sufficient.
70
108
 
71
109
  pip
72
110
  ~~~
@@ -115,8 +153,8 @@ Verify that the necessary dependencies have been installed and then run the foll
115
153
  pip install --no-cache --force-reinstall gdal[numpy]=="$(gdal-config --version).*"
116
154
 
117
155
 
118
- Potential issues with GDAL >= 3.9, Python >= 3.9 and NumPy 2.0
119
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156
+ Potential issues with GDAL >= 3.9, Python >= 3.9 and NumPy 2.0 (pip)
157
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120
158
 
121
159
  The pyproject.toml file of GDAL 3.9 requires numpy >= 2.0.0rc1 (for Python >= 3.9)
122
160
  at build time to be able to build bindings that are compatible of both NumPy 1
@@ -131,14 +169,23 @@ with the ``--no-build-isolation`` flag.
131
169
  pip install gdal[numpy]=="$(gdal-config --version).*" --no-build-isolation
132
170
 
133
171
 
134
- Building as part of the GDAL library source tree
135
- ------------------------------------------------
172
+ Conda
173
+ ~~~~~
174
+
175
+ GDAL can be quite complex to build and install, particularly on Windows and MacOS.
176
+ Pre built binaries are provided for the conda system:
177
+
178
+ https://docs.conda.io/en/latest/
179
+
180
+ By the conda-forge project:
181
+
182
+ https://conda-forge.org/
183
+
184
+ Once you have Anaconda or Miniconda installed, you should be able to install GDAL with:
185
+
186
+ ``conda install -c conda-forge gdal``
136
187
 
137
- Python bindings are generated by default when building GDAL from source.
138
- For more detail, see `Python bindings options <https://gdal.org/development/building_from_source.html#building-python-bindings>`__
139
188
 
140
- The GDAL Python package is built using `SWIG <https://www.swig.org>`__. The currently supported version
141
- is SWIG >= 4
142
189
 
143
190
  Usage
144
191
  -----
@@ -4,38 +4,76 @@ GDAL/OGR in Python
4
4
 
5
5
  This Python package and extensions are a number of tools for programming and
6
6
  manipulating the GDAL_ Geospatial Data Abstraction Library.
7
-
8
- The GDAL project maintains SWIG generated Python
9
- bindings for GDAL/OGR. Generally speaking the classes and methods mostly
7
+ Generally speaking the classes and methods mostly
10
8
  match those of the GDAL and OGR C++ classes. There is no Python specific
11
9
  reference documentation, but the https://gdal.org/api/python_bindings.html#tutorials includes Python examples.
12
10
 
11
+ The GDAL Python package is built using `SWIG <https://www.swig.org>`__.
12
+ The GDAL project maintains these Python bindings for GDAL/OGR within
13
+ the gdal source tree.
14
+ The SWIG-generated files are not checked in and are not part of the
15
+ gdal release tarballs. The bindings are also made available via PyPi
16
+ where the swig-generated files are provided.
17
+
18
+ Building from source
19
+ --------------------
20
+
21
+ To build from source, there are multiple possible paths.
22
+
13
23
  Dependencies
14
- ------------
24
+ ~~~~~~~~~~~~
15
25
 
16
- * libgdal (3.9.2 or greater) and header files (gdal-devel)
17
- * numpy (1.0.0 or greater) and header files (numpy-devel) (not explicitly
18
- required, but many examples and utilities will not work without it)
26
+ (As usual, when a package is listed one needs the parts used to build
27
+ programs against it, called -devel on many systems. This is not
28
+ special about gdal.)
19
29
 
20
- Installation
21
- ------------
30
+ * SWIG (4 or greater).
22
31
 
23
- Conda
24
- ~~~~~
32
+ * libgdal (3.10.0 or greater).
25
33
 
26
- GDAL can be quite complex to build and install, particularly on Windows and MacOS.
27
- Pre built binaries are provided for the conda system:
34
+ * numpy (1.0.0 or greater). This is not force-required by the build,
35
+ but many examples and utilities will not work without it. At least
36
+ osgeo.gdal_array requires numpy at build time; building without
37
+ numpy and installing it later does not result in correct operation.
38
+ apparently not and in any case it is an unwarranted leap.
28
39
 
29
- https://docs.conda.io/en/latest/
40
+ * setuptools (python)
30
41
 
31
- By the conda-forge project:
42
+ * wheel (python)
32
43
 
33
- https://conda-forge.org/
44
+ Building when building the rest of GDAL
45
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34
46
 
35
- Once you have Anaconda or Miniconda installed, you should be able to install GDAL with:
47
+ Python bindings are generated by default when building GDAL from source.
48
+ For more detail, see `Python bindings options <https://gdal.org/development/building_from_source.html#building-python-bindings>`__
36
49
 
37
- ``conda install -c conda-forge gdal``
50
+ Building just the bindings, from the full tree
51
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38
52
 
53
+ Another is to use the gdal source distribution with an
54
+ already-installed gdal library and headers. To do this, one must
55
+ create a build directory and run cmake to generate build scripts. Then,
56
+ run ``cmake --build . --target python_generated_files``. Finally, in swig/python,
57
+ one can build using setup.py like any other distributed python module.
58
+
59
+ Building from the PyPi module file
60
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61
+
62
+ The third is to obtain the PyPi-hosted module file, within which swig
63
+ has been run; this saves running cmake and generating bindings. See
64
+ HOWTO-RELEASE for how this is created. Because swig has been run, it
65
+ need not be installed.
66
+
67
+
68
+ Installation via packging systems
69
+ ---------------------------------
70
+
71
+ General
72
+ ~~~~~~~
73
+
74
+ Many packaging systems (on GNU/Linux, various BSDs) provide the
75
+ bindings as a package. Specific instruction are given in cases when
76
+ that hint might not be sufficient.
39
77
 
40
78
  pip
41
79
  ~~~
@@ -84,8 +122,8 @@ Verify that the necessary dependencies have been installed and then run the foll
84
122
  pip install --no-cache --force-reinstall gdal[numpy]=="$(gdal-config --version).*"
85
123
 
86
124
 
87
- Potential issues with GDAL >= 3.9, Python >= 3.9 and NumPy 2.0
88
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125
+ Potential issues with GDAL >= 3.9, Python >= 3.9 and NumPy 2.0 (pip)
126
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89
127
 
90
128
  The pyproject.toml file of GDAL 3.9 requires numpy >= 2.0.0rc1 (for Python >= 3.9)
91
129
  at build time to be able to build bindings that are compatible of both NumPy 1
@@ -100,14 +138,23 @@ with the ``--no-build-isolation`` flag.
100
138
  pip install gdal[numpy]=="$(gdal-config --version).*" --no-build-isolation
101
139
 
102
140
 
103
- Building as part of the GDAL library source tree
104
- ------------------------------------------------
141
+ Conda
142
+ ~~~~~
143
+
144
+ GDAL can be quite complex to build and install, particularly on Windows and MacOS.
145
+ Pre built binaries are provided for the conda system:
146
+
147
+ https://docs.conda.io/en/latest/
148
+
149
+ By the conda-forge project:
150
+
151
+ https://conda-forge.org/
152
+
153
+ Once you have Anaconda or Miniconda installed, you should be able to install GDAL with:
154
+
155
+ ``conda install -c conda-forge gdal``
105
156
 
106
- Python bindings are generated by default when building GDAL from source.
107
- For more detail, see `Python bindings options <https://gdal.org/development/building_from_source.html#building-python-bindings>`__
108
157
 
109
- The GDAL Python package is built using `SWIG <https://www.swig.org>`__. The currently supported version
110
- is SWIG >= 4
111
158
 
112
159
  Usage
113
160
  -----