Geographic Information Systems Asked on October 5, 2021
This is confusing, and a question I’ve harvested from a duplicate, so let me start with my setup.
Background
Many of the scripts I write, I try to keep open-source for those without a fancy ArcGIS license. However, I can’t set PyQGIS as my default system interpreter in my environment variables because it will break many of the tools in ArcMap. So I have taken the approach of making ArcGIS’s Python instance the system Python, and installing open-source libraries there (and using .pth files to pull in qgis.core functionality if I need it). I am using Gohlke’s precompiled GDAL wheel (32-bit) in this case. I am operating under the assumption that this breaks the fewest amount of things.
Problem
I have multiple installs of GDAL, and the system seems to keep defaulting to one of them, ignoring any environment variables I set.
C:Program FilesGDAL
contains version 2.1.0 (64-bit).
C:Python27ArcGIS10.5Libsite-packagesosgeo
contains version 2.1.3 (32-bit).
C:Program FilesGDAL
appears nowhere in my user environment variables.
Instead, I have the variables:
GDAL_DATA
pointing to C:Python27ArcGIS10.5Libsite-packagesosgeodatagdal
and a variable called
GDAL_DRIVER_PATH
pointing to C:Python27ArcGIS10.5Libsite-packagesosgeo
.
C:Python27ArcGIS10.5Libsite-packagesosgeo
is in my PATH
.
Yet, when I open a command prompt and type ogrinfo --version
it does not give me 2.1.3 (the version in PATH
) but rather 2.1.0 (the 64-bit version in Program FilesGDAL
, which is nowhere in PATH
).
What gives?
Answers that do not answer my question
How to force QGIS to use GDAL version?
Unable to call GDAL functionalities from Python
How to add support for FileGDB (Esri file gdb API) driver in fiona?
Boundless Desktop contains its own version of GDAL/OGR and has its own command shell to execute commands. The conflict exists with ArcGIS.
Answered by dustinturp on October 5, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP