I need to simplify my road network using the dissolve function to remove nodes not occurring on the intersections. the following code is doing that.

arcpy.Dissolve_management(self.address_cor_layer2, self.address_dissolved_ref_layer2, "", [["NAME", "FIRST"]], "SINGLE_PART", "DISSOLVE_LINES")

What I need is to keep track of features creating the dissolved feature. For that purpose I want to make a list of FIDs as one field in the dissolved feature.

Any idea how to do that?

  • 1
    there is a ready-to-use tool that does just that in case you are working with network dataset - Dissolve network (Network Analyst toolbox). Otherwise, when calling GP tools, you don't have a finer access to the data on features level. Since you need to work with each feature individually, you would need to take advantage of arcpy.da search/update cursors + possibly arcpy.Geometry() (resources.arcgis.com/en/help/main/10.2/index.html#/Polyline/…) methods to merge multiple lines into output feature class. – Alex Tereshenkov Jun 11 '14 at 18:14
  • I was thinking about searchcursor too, but first I need to spatially join my data. this is ok for small data but in big data may not be a good Idea. do you have any suggestion about removing pseudo nodes in more handy way which you have more control on data? – msc87 Jun 12 '14 at 7:54

Browse other questions tagged or ask your own question.