I need to compute the distance from an input point file to a series of target points in different shapefiles. Everything is in Africa. I want to do this in a pyQgis script. The script I have shown below does the job.
However, I would prefer if the aerial distances computed did not cross the sea. Is there a way to impose a restriction so that the distances are only computed to points inside a polygon (the African continent)?
import os import glob from qgis.core import * import qgis.utils processing.runalg("qgis:distancematrix","path-to-my-input-file","inputfileid",atts,"path-to-my-target-file",0,1,"path-to-output-file")