This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from qgis.PyQt.QtCore import QCoreApplication | |
from qgis.core import * | |
from qgis.utils import pluginMetadata | |
from PyQt5.QtCore import * | |
import processing | |
from processing.core.Processing import Processing | |
from qgis.analysis import QgsNativeAlgorithms | |
import os | |
from collections import deque |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _zvalue_from_index(arr, ind): | |
"""private helper function to work around the limitation of np.choose() by employing np.take() | |
arr has to be a 3D array | |
ind has to be a 2D array containing values for z-indicies to take from arr | |
See: http://stackoverflow.com/a/32091712/4169585 | |
This is faster and more memory efficient than using the ogrid based solution with fancy indexing. | |
""" | |
# get number of rows and columns | |
_,nR,nC = arr.shape |