<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=us-ascii"><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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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=EN-US link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>I have an application where I need to merge segments. Every segment has an identifier OBJECTID which I believe is standard in QGIS. The initial merging is done using an external database and I can generate result in this format:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><u><span style='font-family:"Courier New"'>OBJECTID </span></u><span style='font-family:"Courier New"'> <u>NewSegmentID</u><o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>10001 Seg00001<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>10002 Seg00001<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>10003 Seg00001<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>10004 Seg00001<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>10005 Seg00002<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>10006 Seg00002<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>10007 Seg00003<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>10008 Seg00003<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>10009 Seg00003<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>10010 Seg00004<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>10011 Seg00004<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>10012 Seg00004<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal>I can generate the table above in just about any database format, spreadsheet or any flavor of text including CSV, or tab separated.<o:p></o:p></p><p class=MsoNormal>What I would like to do is merge individual segment into a longer segment with the NewSegmentID (or a new OBJECTID as needed) as the identifier, so, the new layer instead of having 12 segments has only 4 longer segments.<o:p></o:p></p><p class=MsoNormal>I believe there is a way to manually select a few segments and merge them into one, but we have 35,000 segments that we need to merge into app, 8,000 longer segments so an automated solution is needed. The preferred output format would be an ESRI shape file format.<o:p></o:p></p><p class=MsoNormal>Can I just link between the original layer and the new table and then store the results in a new layer?<o:p></o:p></p><p class=MsoNormal>Is there a way to do this easily with existing QGIS tools?<o:p></o:p></p><p class=MsoNormal>Is there a snippet of code with instructions that I can use or easily modify to do what I need?<o:p></o:p></p><p class=MsoNormal>Any help you can provide would be greatly appreciated.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Javier Valencia, PE<o:p></o:p></p><p class=MsoNormal>913-915-3137<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>