<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Il 21/06/2016 13:18, Daniele Bonaposta
ha scritto:<br>
</div>
<blockquote
cite="mid:CAD+gdT59WxVyzLCxMHm0xGP+rRpDS7PMGD5nmDcbEVrrEWHvhw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">Ciao a
tutti,</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">sto
cercando di creare le cosiddette "hub lines" tra differenti
feature puntuali.</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">Ho
importato i layer in un db sqlite, il primo rappresenta delle
calotte per il conferimento rifiuti e il secondo gli utenti
che utilizzano tali calotte:</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)"><br>
</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)"><u>layer
calotte</u></div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">[id_cal]
PK</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">[id_isola]</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">[Geometry]</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)"><br>
</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)"><u>layer
utenti</u></div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">[id_utente]
PK</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">[codfis]</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">[nome]</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">[tipo]</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)"><br>
</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">La
relazione è M:M e le combinazioni sono scritte nella tabella:</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)"><u><br>
</u></div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)"><u>conferimenti</u></div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">[id_cal]<br>
</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">[id_utente]<br>
</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)"><br>
</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">Per
creare una feature lineare che colleghi i due set di punti
secondo quanto scritto nella tabella dei conferimenti ho
proceduto così:</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)"><br>
</div>
<div class="gmail_default" style="">
<div class="gmail_default" style=""><font face="trebuchet ms,
sans-serif" color="#000099">CREATE TABLE hub_lines_2 (</font></div>
<div class="gmail_default" style=""><font face="trebuchet ms,
sans-serif" color="#000099">ID_calotta TEXT NOT NULL,</font></div>
<div class="gmail_default" style=""><font face="trebuchet ms,
sans-serif" color="#000099">ID_isola TEXT,</font></div>
<div class="gmail_default" style=""><font face="trebuchet ms,
sans-serif" color="#000099">ID_utente TEXT NOT NULL,</font></div>
<div class="gmail_default" style=""><font face="trebuchet ms,
sans-serif" color="#000099">codfis TEXT NOT NULL,</font></div>
<div class="gmail_default" style=""><font face="trebuchet ms,
sans-serif" color="#000099">nome TEXT NOT NULL,</font></div>
<div class="gmail_default" style=""><font face="trebuchet ms,
sans-serif" color="#000099">tipo TEXT NOT NULL</font><span
style="color:rgb(0,0,153);font-family:"trebuchet
ms",sans-serif">);</span></div>
<div class="gmail_default" style=""><font face="trebuchet ms,
sans-serif" color="#000099"><br>
</font></div>
<div class="gmail_default" style=""><font face="trebuchet ms,
sans-serif" color="#000099">SELECT AddGeometryColumn (</font></div>
<div class="gmail_default" style=""><font face="trebuchet ms,
sans-serif" color="#000099">'hub_lines', 'the_geom',
25832, 'LINESTRING', 'XY');</font></div>
<div class="gmail_default" style=""><br>
</div>
</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">E poi
ho popolato la tabella:</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)"><br>
</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)">
<div class="gmail_default">INSERT INTO hub_lines_2 (</div>
<div class="gmail_default">ID_calotta, ID_isola, ID_utente,
codfis, nome, tipo, the_geom)</div>
<div class="gmail_default">SELECT c.ID_Calotta, c.ID_isola,
u.Cod_Uten1, u.Cod_Fisc, u.Contribuen, u.tipo_utenz, </div>
<div class="gmail_default">MAKELINE('x(c.Geometry)'
,'y(u.geom)')</div>
<div class="gmail_default">FROM calotte_ASIA_AltPag_20160608
AS c </div>
<div class="gmail_default">JOIN utenze_chiavi_2015 AS uc ON (
c.ID_Calotta = uc.ID_calotta) </div>
<div class="gmail_default">JOIN utenti_DD2_S_completo AS u ON
( u.Cod_Uten1 = uc.Codice_utenza);</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">L'istruzione procede con successo
ed ottengo una tabella ma con il campo [the_geom] nullo.
Dato che la sintassi sembra essere corretta, non riesco a
capire perchè non viene popolato il campo relativo alla
geometria ed ottenere infine una feature lineare.</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">QGIS 2.8.8</div>
<div class="gmail_default">SpatiaLite 4.3.0</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">Grazie per le dritte.</div>
<div class="gmail_default">Daniele</div>
</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:small;color:rgb(0,0,153)"> </div>
<div><br>
</div>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div>_____________________________<br>
<br>
<font face="trebuchet ms,sans-serif" color="#000099">Daniele
Bonaposta,<br>
Cartografia - G.I.S.</font></div>
<div><br>
<font size="1"><font face="trebuchet ms,sans-serif"
color="#000099">via Don Minzoni 13a<br>
40121 - Bologna<br>
mobile: +39.338.3377044<br>
</font><font face="trebuchet ms,sans-serif"
color="#000099">e-mail:</font> </font><font
color="#666666" size="1"><a moz-do-not-send="true"
href="mailto:daniele.bonaposta@gmail.com"
target="_blank">daniele.bonaposta@gmail.com</a></font><br>
</div>
<div><br>
</div>
<div><font size="1"><font color="#000099"><font
face="trebuchet ms,sans-serif"><strong>Linked</strong>in:</font></font>
</font><font color="#666666" size="1"><a
moz-do-not-send="true"
href="http://www.linkedin.com/pub/daniele-bonaposta/26/487/872"
target="_blank"><a class="moz-txt-link-freetext" href="http://www.linkedin.com/pub/daniele-bonaposta/26/487/872">http://www.linkedin.com/pub/daniele-bonaposta/26/487/872</a></a></font></div>
<div><br>
</div>
<div><font size="1">_____________________________<br>
</font></div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
QGIS-it-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-it-user@lists.osgeo.org">QGIS-it-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-it-user">http://lists.osgeo.org/mailman/listinfo/qgis-it-user</a>
</pre>
</blockquote>
<p><font size="-1"><font face="Century Gothic">Perchè non usare HUB
LInes di MMQGIS?</font></font><br>
</p>
</body>
</html>