简体   繁体   中英

Running GDAL from the command line on Windows 10 x64

I need help getting gdal set up on my 64-bit Windows 10 machine. I am able to run gdalinfo , but nothing that depends on the python libraries (like gdal_polygonize for example).

Expected results

I want to be able to successfully run something like gdal_polygonize myFile.png -f "GeoJSON" myOutputFile.geojson

What I've tried

I used this installer: gdal-300-1900-x64-core.msi

With these python libraries: GDAL-3.0.4.win-amd64-py3.7.msi (I am using python 3.7)

I added C:\Program Files\GDAL to the end of my PATH, and added the following environment variables:

在此处输入图像描述

For some reason, I can't run anything but gdalinfo . Any ideas on where to look or what I might have done wrong? This is the output in git bash, and it is the same in cmd.在此处输入图像描述

You need to install the python bindings for GDAL.

The easiest way is to use the Osgeo4w installer and make sure to check the gdal-python box in the installer.

You need to use the advanced install option and expand the libs item to find gdal-python.

在此处输入图像描述

You then pick the same version number as the version of GDAL you are installing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM