Skip to main content

gdal-utils: An extension library for GDAL - Geospatial Data Abstraction Library

Project description

This gdal-utils Python package is a sub-set of the GDAL Osgeo Python package.

If you’ve installed the GDAL package you have these utils. However you may wish to get a newer version of the utilities without changing GDAL, that’s what this package is for.

For using and developing the utils please refer to the osgeo documentation and to the GDAL API Tutorial.

We don’t systematically test the utils against a different versions of gdal. Versioning of GDAL and gdal-utils are independent from each other, today’s gdal-utils v3.3 works with GDAL v3.4 but it might not with v3.2. We recommend upgrading to the latest versions of each as general practice. See ‘Packaging’ below for how to test compatibility.

Dependencies

  • gdal (the osgeo package)

  • numpy (1.0.0 or greater) and header files (numpy-devel) (not explicitly required, but many examples and utilities will not work without it)

Installation

gdal-utils can be installed from pypi.org:

$ python -m pip install gdal-utils

After install the utilities are in PYTHYONHOME\Scripts and can be invoked like regular programs, gdal_edit instead of gdal_edit.py or python path/to/gdal_edit.py for example.

Packaging

Starting March 2022 installing gdal-utils with pip will use Setuptools’ _console_scripts_, which turn the the scripts into native platform executables that call the script using the appropriate platform interpreter. This means you no longer need to something similar as a post-install step. If this causes problems with your distribution please file an issue on Github.

Recipe for testing gdal-utils compatibility against your installed GDAL binaries:

# Get installed GDAL version
export _GDALVER=`gdal-config --version``

# verify python osgeo is present
python -c "from osgeo import gdal;print(f'Python Osgeo version: {gdal.__version__}')"

git clone https://github.com/OSGeo/gdal.git --depth=50
git remote set-branches origin "*"
git fetch -v --depth=50

# Install current version of gdal-utils
cd swig/python/gdal-utils
pip install .
# OR, to use published PyPi.org version:
# pip install gdal-utils

# set source code tree to match binary gdal version
git checkout v$_GDALVER

cd gdal/autotest
python install -r requirements.txt
pytest ./pyscripts

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

gdal_utils-3.5.0.0-py3-none-any.whl (313.2 kB view details)

Uploaded Python 3

File details

Details for the file gdal_utils-3.5.0.0-py3-none-any.whl.

File metadata

  • Download URL: gdal_utils-3.5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 313.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.8.1 requests/2.25.1 setuptools/60.0.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for gdal_utils-3.5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47dbd205c430123c2b280eedcf43acdc2993e4fa74f236d85147d05cda11d265
MD5 9f69ac0cb5bbc382819961624860e780
BLAKE2b-256 52d556dfa22656ece4fb3e5a7a26ea104911e2698e5e984889d182fd12dfa2bc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page