2

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?

closed as off-topic by PolyGeo Nov 23 '16 at 2:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking help to debug/write/improve code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Providing a clear problem statement and evidence of a code attempt will help others to help you. See: How to create a Minimal, Complete, and Verifiable example." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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.