Select to view content in your preferred language

possibility to use any GDAL version - even the newest

1912
4
07-17-2023 10:04 PM
Status: Already Offered
Labels (1)
nadja
by
Frequent Contributor

as the title suggests, I'd like the possibility to use any GDAL version, even the newest (currently 3.7), without having to set up a separate conda environment.  

original question: https://community.esri.com/t5/arcgis-pro-questions/gdal-version-can-i-choose-the-used-version-if-yes...

Tags (2)
4 Comments
DanPatterson

A version is already available,,,

from osgeo import gdal
gdal.__version__
'3.4.0e'
nadja
by

@DanPatterson thank you for your comment. I'm aware that I can use the 3.4 version, but that's not the newest version. I need an option which is currently only available in GDAL 3.7 and building a separate conda environment is no option. 

Brian_Wilson

I think a reasonable compromise would be to add a "Conda" variable to the environment for Python based tools.

You would not be able to run for example ArcPy and GDAL 3.7 in the same script, but you'd be able to break out the work into separate steps. That would be acceptable to me.

(Hmmm I am pretty sure I could code some approximation of this up in Python...)

The default would be to use the Conda environment selected in Pro.

ShaunWalbridge
Status changed to: Already Offered

Thanks for your suggestion, we appreciate your feedback. GDAL is an integral part of our system, and we're aggressively upgrading it at each Pro release, see the released versions in this PDF:

https://github.com/Esri/arcpy/blob/main/docs/ArcGIS-Pro-Python-Distribution-By-Release.pdf

Pro 3.6 includes GDAL 3.11, and the upcoming Pro 3.7 release will include the latest GDAL 3.12. By remaining on an aggressive upgrade schedule, you should be getting a recent GDAL by default when you update the software. Also, starting with Pro 3.6, all the command line tools for GDAL including `gdal.exe` for a unified CLI are shipped out of the box.

However, if you do need a different version of GDAL than the one we provide, creating a custom environment with the required version of GDAL is the right way to go: Because GDAL is a part of our system, its version can't be changed in the same environment that is driving ArcGIS Pro without potentially causing other issues. If you did need a different version, you can do so and still call it with e.g. subprocess calls to talk to it from a Pro based environment.

Cheers,

Shaun