Last active
April 12, 2016 09:27
-
-
Save pigreco/b54bae7dc31bf7cf61efa40891f16adc to your computer and use it in GitHub Desktop.
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
""" | |
/*************************************************************************** | |
Name : Label DXF 3D | |
Description : popola il campo OGR_STYLE per label DXF 3D | |
Date : 11 - aprile - 2016 | |
copyright : (C) 2016 by Salvatore Fiandaca | |
email : pigrecoinfinito@gmail.com | |
***************************************************************************/ | |
/*************************************************************************** | |
* * | |
* This program is free software; you can redistribute it and/or modify * | |
* it under the terms of the GNU General Public License as published by * | |
* the Free Software Foundation; either version 2 of the License, or * | |
* (at your option) any later version. * | |
* * | |
***************************************************************************/ | |
""" | |
from qgis.core import * | |
from qgis.gui import * | |
@qgsfunction(args='auto', group='Custom') | |
def label_dxf_3d(campo, feature, parent): | |
a = 'LABEL(f:,s:3000pt ,t:' | |
b = str(campo) | |
c = ')' | |
return a + b + c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
il file 'etichette_3D_dxf.py' è una semplice funzione (label_3d_dxf) scritta in python da poter utilizzare nel calcolatore di campi di QGIS, basti mettere il file in C:\Users\nome_utente.qgis2\python\expressions
al riavvio di QGIS troverete la nuova funzione sotto 'custom' (vedi immagini).