GDAL 3.9.3__tar.gz → 3.10.2__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.
- {gdal-3.9.3 → gdal-3.10.2}/PKG-INFO +74 -27
- {gdal-3.9.3 → gdal-3.10.2}/README.rst +73 -26
- {gdal-3.9.3 → gdal-3.10.2}/extensions/gdal_array_wrap.cpp +568 -641
- {gdal-3.9.3 → gdal-3.10.2}/extensions/gdal_wrap.cpp +4608 -2399
- {gdal-3.9.3 → gdal-3.10.2}/extensions/gdalconst_wrap.c +467 -518
- {gdal-3.9.3 → gdal-3.10.2}/extensions/gnm_wrap.cpp +609 -699
- {gdal-3.9.3 → gdal-3.10.2}/extensions/ogr_wrap.cpp +2274 -4523
- {gdal-3.9.3 → gdal-3.10.2}/extensions/osr_wrap.cpp +1033 -1051
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/GDAL.egg-info/PKG-INFO +74 -27
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/__init__.py +1 -1
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/array_util.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/base.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/batch_creator.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/color_palette.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/color_table.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/extent_util.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/gdal_argparse.py +4 -19
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/numpy_util.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/osr_util.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/progress.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/raster_creation.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/rectangle.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/util.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdal2tiles.py +3 -19
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdal2xyz.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdal_calc.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdal_edit.py +11 -36
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdal_fillnodata.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdal_merge.py +1 -1
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdal_pansharpen.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdal_polygonize.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdal_proximity.py +2 -18
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdal_retile.py +32 -48
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdal_sieve.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdalattachpct.py +2 -18
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdalcompare.py +2 -18
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/gdalmove.py +2 -18
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/ogr_layer_algebra.py +3 -19
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/ogrmerge.py +2 -18
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/pct2rgb.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/rgb2pct.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/assemblepoly.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/build_jp2_from_xml.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/classify.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/crs2crs2grid.py +44 -75
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/densify.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/dump_jp2.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/epsg_tr.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/esri2wkt.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/fft.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/fix_gpkg.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gcps2ogr.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gcps2vec.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gcps2wld.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdal2grd.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdal_auth.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdal_cp.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdal_create_pdf.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdal_ls.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdal_lut.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdal_mkdir.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdal_remove_towgs84.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdal_rm.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdal_rmdir.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdalbuildvrtofvrt.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdalchksum.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdalcopyproj.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdalfilter.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdalident.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdalimport.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdalinfo.py +3 -20
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdallocationinfo.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/get_soundg.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/histrep.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/hsv_merge.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/jpeg_in_tiff_extract.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/load2odbc.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/loslas2ntv2.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/magphase.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/make_fuzzer_friendly_archive.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/mkgraticule.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/ogr2vrt.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/ogr_build_junction_table.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/ogr_dispatch.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/ogrinfo.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/ogrupdate.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/rel.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/tigerpoly.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/tile_extent_from_raster.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/tolatlong.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/val_repl.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/validate_cloud_optimized_geotiff.py +3 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/validate_geoparquet.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/validate_gpkg.py +21 -23
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/validate_jp2.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/vec_tr.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/vec_tr_spat.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/wcs_virtds_params.py +1 -17
- {gdal-3.9.3 → gdal-3.10.2}/osgeo/__init__.py +2 -4
- {gdal-3.9.3 → gdal-3.10.2}/osgeo/gdal.py +1021 -580
- {gdal-3.9.3 → gdal-3.10.2}/osgeo/gdal_array.py +46 -46
- {gdal-3.9.3 → gdal-3.10.2}/osgeo/gdalconst.py +33 -6
- {gdal-3.9.3 → gdal-3.10.2}/osgeo/gnm.py +50 -44
- {gdal-3.9.3 → gdal-3.10.2}/osgeo/ogr.py +543 -1041
- {gdal-3.9.3 → gdal-3.10.2}/osgeo/osr.py +225 -197
- {gdal-3.9.3 → gdal-3.10.2}/setup.py +13 -5
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/GDAL.egg-info/SOURCES.txt +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/GDAL.egg-info/dependency_links.txt +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/GDAL.egg-info/entry_points.txt +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/GDAL.egg-info/not-zip-safe +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/GDAL.egg-info/requires.txt +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/GDAL.egg-info/top_level.txt +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/auxiliary/__init__.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/__init__.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/osgeo_utils/samples/gdal_vrtmerge.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdal2tiles.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdal2xyz.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdal_calc.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdal_edit.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdal_fillnodata.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdal_merge.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdal_pansharpen.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdal_polygonize.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdal_proximity.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdal_retile.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdal_sieve.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdalattachpct.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdalcompare.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/gdalmove.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/ogr_layer_algebra.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/ogrmerge.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/pct2rgb.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/gdal-utils/scripts/rgb2pct.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/osgeo/gdalnumeric.py +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/pyproject.toml +0 -0
- {gdal-3.9.3 → gdal-3.10.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: GDAL
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.10.2
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
52
|
-
------------
|
|
61
|
+
* SWIG (4 or greater).
|
|
53
62
|
|
|
54
|
-
|
|
55
|
-
~~~~~
|
|
63
|
+
* libgdal (3.10.2 or greater).
|
|
56
64
|
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
71
|
+
* setuptools (python)
|
|
61
72
|
|
|
62
|
-
|
|
73
|
+
* wheel (python)
|
|
63
74
|
|
|
64
|
-
|
|
75
|
+
Building when building the rest of GDAL
|
|
76
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
65
77
|
|
|
66
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
21
|
-
------------
|
|
30
|
+
* SWIG (4 or greater).
|
|
22
31
|
|
|
23
|
-
|
|
24
|
-
~~~~~
|
|
32
|
+
* libgdal (3.10.2 or greater).
|
|
25
33
|
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
40
|
+
* setuptools (python)
|
|
30
41
|
|
|
31
|
-
|
|
42
|
+
* wheel (python)
|
|
32
43
|
|
|
33
|
-
|
|
44
|
+
Building when building the rest of GDAL
|
|
45
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
34
46
|
|
|
35
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-----
|