Skip to content

Instantly share code, notes, and snippets.

@pigreco
Created November 17, 2017 11:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save pigreco/a823142bef5cd94f640b55b91025f4eb to your computer and use it in GitHub Desktop.
per controllare esistenza di un path
# crea una funzione personalizzata 'controlla'
# da usare nel calcolatore di campi
# se il path esiste il valore è TRUE altrimenti FALSE
from qgis.core import *
from qgis.gui import *
from os.path import *
@qgsfunction(args='auto', group='Custom')
def controlla(value1, feature, parent):
return os.path.exists(value1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment