Re: [QGIS-Developer] Best way to import gdal, ogr, osr ?

2022-10-17 Thread i-s-o via QGIS-Developer
FYI you could use the Windows Sandbox feature to simulate how QGIS behaves in a brand new Windows installation. It is a built-in feature in Windows 10/11: https://learn.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview On Mon, Oct 17, 2022 at 6:42 AM

Re: [QGIS-Developer] Best way to import gdal, ogr, osr ?

2022-10-17 Thread Even Rouault via QGIS-Developer
Le 17/10/2022 à 12:36, Raymond Nijssen a écrit : Thank you Even. And that will always be available in QGIS? Without any extra (gdal) installations? yes, I think so. This is needed by the GDAL processing tools, which AFAIK are availalable out-of-the box in the standalone Windows installer -

Re: [QGIS-Developer] Best way to import gdal, ogr, osr ?

2022-10-17 Thread Raymond Nijssen via QGIS-Developer
Thank you Even. And that will always be available in QGIS? Without any extra (gdal) installations? Let's say, I'm buying a brand new Windows laptop and install QGIS with the standalone installer, I can type from osgeo import ogr in the python console and it will just work? Sorry, this is a

Re: [QGIS-Developer] Best way to import gdal, ogr, osr ?

2022-10-17 Thread Even Rouault via QGIS-Developer
You can just use from osgeo import ogr from osgeo import gdal from osgeo import osr That will work with any GDAL version of the last 15 years or so. Le 17/10/2022 à 10:52, Raymond Nijssen via QGIS-Developer a écrit : Dear developers, What is the best way to import ogr, gdal and osr in my pyqg

[QGIS-Developer] Best way to import gdal, ogr, osr ?

2022-10-17 Thread Raymond Nijssen via QGIS-Developer
Dear developers, What is the best way to import ogr, gdal and osr in my pyqgis script? This used to work in older QGIS versions: import gdal import ogr import osr Now I've changed that to: try: import ogr import gdal import osr except ModuleNotFoundError: from osgeo import