<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Avenir LT Std 65 Medium";
panose-1:2 11 6 3 2 2 3 2 2 4;}
@font-face
{font-family:"Avenir LT Std 45 Book";
panose-1:2 11 5 2 2 2 3 2 2 4;}
@font-face
{font-family:"Avenir LT 45 Book";
panose-1:2 11 5 3 2 0 0 2 0 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.StileMessaggioDiPostaElettronica17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="IT-CH" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Ciao a tutti,<o:p></o:p></p>
<p class="MsoNormal">volevo sapere se è fattibile con la funzione “aggregate”, ottenere come risultato la somma delle lunghezze degli elementi contenuti in un perimetro, moltiplicate per un valore di un campo specifico di ogni elemento.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In pratica ho un layer con elementi poliline inerenti le strade, un campo del layer è il costo della strada per metro lineare (costo).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Attualmente ottengo le sole lunghezze con questa formula:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">aggregate(<o:p></o:p></p>
<p class="MsoNormal">layer:=’Strada’,<o:p></o:p></p>
<p class="MsoNormal">aggregate:='sum',<o:p></o:p></p>
<p class="MsoNormal">expression:=length(intersection(geometry(@parent), $geometry)),
<o:p></o:p></p>
<p class="MsoNormal">filter:= ("Tipo"='Nazionale' AND intersects( $geometry,geometry(@parent)))
<o:p></o:p></p>
<p class="MsoNormal">)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Ho provato a modificarla come segue, ma mi da errore all’esecuzione:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">aggregate(<o:p></o:p></p>
<p class="MsoNormal">layer:=’Strada’,<o:p></o:p></p>
<p class="MsoNormal">aggregate:='sum',<o:p></o:p></p>
<p class="MsoNormal">expression:=length(intersection(geometry(@parent), $geometry)) * ‘costo’,
<o:p></o:p></p>
<p class="MsoNormal">filter:= ("Tipo"='Nazionale' AND intersects( $geometry,geometry(@parent)))
<o:p></o:p></p>
<p class="MsoNormal">)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Ringrazio anticipatamente per i suggerimenti<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Fabio<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:IT-CH">Fabio Pifferini<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;mso-fareast-language:IT-CH">Ingegnere SUP, Project manager PMP®<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;mso-fareast-language:IT-CH">Membro di direzione<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-fareast-language:IT-CH"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;mso-fareast-language:IT-CH"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Avenir LT Std 65 Medium",sans-serif;mso-fareast-language:IT-CH">MASOTTI
</span></b><span style="font-size:10.0pt;font-family:"Avenir LT 45 Book",sans-serif;mso-fareast-language:IT-CH">& ASSOCIATI SA</span><b><span style="font-size:10.0pt;mso-fareast-language:IT-CH"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-align:justify;line-height:12.0pt;layout-grid-mode:char">
<span lang="IT" style="font-size:8.0pt;font-family:"Avenir LT Std 45 Book",sans-serif;letter-spacing:-.15pt;mso-fareast-language:IT-CH">Via Mirasole 1 | CH-6501 Bellinzona | Tel. +41 (0)91 825 52 40 | Fax +41 (0)91 825 91 13 |
</span><span style="mso-fareast-language:IT-CH"><a href="mailto:info@masotti.ch"><span lang="IT" style="font-size:8.0pt;font-family:"Times New Roman",serif;color:blue;letter-spacing:-.15pt">info@masotti.ch</span></a></span><span lang="IT" style="font-size:8.0pt;font-family:"Avenir LT Std 45 Book",sans-serif;letter-spacing:-.15pt;mso-fareast-language:IT-CH">
| </span><span style="mso-fareast-language:IT-CH"><a href="http://www.masotti.ch/"><span lang="IT" style="font-size:8.0pt;font-family:"Times New Roman",serif;color:blue;letter-spacing:-.15pt">www.masotti.ch</span></a></span><span lang="IT" style="font-size:8.0pt;font-family:"Avenir LT Std 45 Book",sans-serif;letter-spacing:-.15pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-align:justify;line-height:12.0pt;layout-grid-mode:char">
<span lang="IT" style="font-size:8.0pt;font-family:"Avenir LT Std 45 Book",sans-serif;letter-spacing:-.15pt;mso-fareast-language:IT-CH"><o:p> </o:p></span></p>
<p class="MsoNormal"><i><span style="font-size:8.0pt;font-family:"Verdana",sans-serif;mso-fareast-language:IT-CH">...salvaguarda l’ambiente; stampa questo messaggio soltanto se è veramente necessario...</span></i><b><i><span style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-fareast-language:IT-CH"><o:p></o:p></span></i></b></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-fareast-language:IT-CH">_______________________________________________<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-fareast-language:IT-CH">Questo messaggio di posta elettronica potrebbe contenere informazioni riservate. Qualora non foste il destinatario corretto, Vi preghiamo di comunicarlo
immediatamente al mittente e di distruggere il presente messaggio. E’ strettamente vietato duplicare, divulgare, modificare o usare (in qualsiasi modo) senza autorizzazione le informazioni contenute nel messaggio.
</span><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-fareast-language:IT-CH">Grazie.<o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-fareast-language:IT-CH">This e-mail may contain confidential and/or privileged information. If you are not the intended recipient, please notify the sender
immediately and destroy this e-mail. Any unauthorized copying, disclosure, modification or use (in any way) of the material in this e-mail is strictly forbidden.
</span></i><i><span style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-fareast-language:IT-CH">Thank you<o:p></o:p></span></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>