kopia lustrzana https://github.com/OpenDroneMap/ODM
Merge pull request #1855 from sanmit99/patch-1.1
Fallback gdal_proximity command to native pathpull/1856/head
commit
465b66a9ae
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import rasterio
|
||||
import numpy
|
||||
|
@ -29,8 +30,13 @@ except ModuleNotFoundError:
|
|||
# GDAL <= 3.2
|
||||
try:
|
||||
from osgeo.utils.gdal_proximity import main as gdal_proximity
|
||||
except:
|
||||
pass
|
||||
except ModuleNotFoundError:
|
||||
# GDAL <= 3.0
|
||||
gdal_proximity_script = shutil.which("gdal_proximity.py")
|
||||
if gdal_proximity_script is not None:
|
||||
def gdal_proximity(args):
|
||||
subprocess.run([gdal_proximity_script] + args[1:], check=True)
|
||||
|
||||
|
||||
def classify(lasFile, scalar, slope, threshold, window):
|
||||
start = datetime.now()
|
||||
|
|
Ładowanie…
Reference in New Issue