[Qgis-us-user] Merging segments

javier.valencia at vtgonline.com javier.valencia at vtgonline.com
Mon Mar 22 09:24:44 PDT 2021


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:

 

OBJECTID   NewSegmentID

10001      Seg00001

10002      Seg00001

10003      Seg00001

10004      Seg00001

10005      Seg00002

10006      Seg00002

10007      Seg00003

10008      Seg00003

10009      Seg00003

10010      Seg00004

10011      Seg00004

10012      Seg00004

 

I can generate the table above in just about any database format,
spreadsheet or any flavor of text including CSV, or tab separated.

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.

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.

Can I just link between the original layer and the new table and then store
the results in a new layer?

Is there a way to do this easily with existing QGIS tools?

Is there a snippet of code with instructions that I can use or easily modify
to do what I need?

Any help you can provide would be greatly appreciated.

 

Javier Valencia, PE

913-915-3137

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-us-user/attachments/20210322/eb25d8c2/attachment.html>


More information about the Qgis-us-user mailing list