I suspect the issue is the GDAL 1.11 bindings you're fetching from gohlke do not match the internal GDAL inside of Arc*. Your bindings need to be compiled against ESRI's GDAL to work reliably. It's possible they can be made to work, but it is going to be a lot of headache.
In short, ESRI needs to provide the gdal_i.lib stub file that GDAL generates as part of its compilation process, and you need to build the Python bindings against that. I don't know that ESRI provides this, however.
Maybe ESRI could be requested to provide a gdal.py and GDAL bindings as part of ArcPy? Alternatively, maybe you could use Fiona and rasterio to replicate the GDAL bindings parts you need. These have the benefit of not needing to link against the ESRI GDAL and instead are able to use it by doing C API calls directly into the DLL.
@Luke's comment led me to the Python\Lib\site-packages\osgeo
folder, and I noticed immediately that it had a directory structure that looked familiar.
Two levels further in (in C:\Python27\Lib\site-packages\osgeo\data\gdal
) I was looking at all the csv files that GDAL looks for in GDAL_DATA
.
So, I amended the PATH to include C:\Python27\Lib\site-packages\osgeo
and changed the GDAL_DATA
environment var to C:\Python27\Lib\site-packages\osgeo\data\gdal\
.
Opened a conEMU box, typed gdalinfo --version
, and got two error messages about a missing DLL (which is there, but who cares), and then successful execution.
> gdalinfo --version
ERROR 1: Can't load requested DLL: C:\Python27\Lib\site-packages\osgeo\gdalplugins\ogr_FileGDB.dll
126: The specified module could not be found.
ERROR 1: Can't load requested DLL: C:\Python27\Lib\site-packages\osgeo\gdalplugins\ogr_FileGDB.dll
126: The specified module could not be found.
GDAL 2.0.2, released 2016/01/26
The DLL in question is unambiguously there - here's pics ...
Then I ogrinfo -so -al
'd a nearby TAB file. ogrinfo
prefaced a correct answer with the same 'cannot be found' error message, three times instead of 2.
It's never good to trust an installation that throws an error like that, so I set GDAL_DRIVER_PATH to C:\Python27\Lib\site-packages\osgeo\gdalplugins
. When that didn't work I dug a bit more.
It's resolved by moving the DLL out of \gdalplugins
: see this question and this answer, both of which I upvoted.
Copying the DLL out of \plugins and into \osgeo (leaving GDAL_DRIVER_PATH
at C:\Python27\Lib\site-packages\osgeo\gdalplugins
) worked.
Best Answer
You can find official GDAL documentation at https://gdal.org/
All classes documentations are here:
Also you can read Raster API tutorial and Vector API tutorial
For python there are examples in tutorial, but the best place is GDAL tests, which written in python: https://github.com/OSGeo/gdal/tree/master/autotest
Most of python usage are covered by this tests.