Select to view content in your preferred language

Combine line features that are coincident

845
2
10-19-2010 04:12 PM
VictorStover
New Contributor
I have a polyline shapefile with many features.  Some of the features are coincident - that is, they take up the exact same space.  Is there a way to consolidate the shapefile so that the line features that are coincident are consolidated and their attribute fields are summed?
0 Kudos
2 Replies
AndrewAllen
New Contributor
If you like Python code, see the attached script "SuperRegionLine":

# Description
# -----------
# This script will take a line featureclass that contains overlapping line features and build a
# planarized feature class (with no overlapping lines) and a one-to-many look up table. This
# is useful to examine the relationships of the overlapping features. For example, for a segment
# of stream that has a seperate features for each specie of fish, count how many species share
# that particular segment of stream. Optionally you can calculate a MIN, MAX, SUM, MEAN, or MEDIAN
# statistic for any numeric field in the inputFC and propogate it to the output featureclass
# (for example, the MIN "SURVEY_YEAR" value of the overlapping features). Also optionaly, you can use the
# concatenate feature to concatenate coincident feature field values. For example, useing the fish analogy,
# the calculated concatenated field value could be something like "Salmon, Trout, Scum Sucker". 


The code isn't completely bullet proof yet, but the basic algorithms are sound. Should work for you...


Chris wondering if this scrypt would work if I have two sets of single lines (roads) one is a "clean" or base file that I want to add line (road) extensions to from the second line segement that are single line segments. The second includes lines (road) i would like to join to the "clean" base file to extent the lines (road) in the base file?
Andrew
0 Kudos
ChrisSnyder
Honored Contributor
Not sure exactly what you want to do (pictures are always good), but basically you could merge the two FCs into a single FC, and then use the SuperRegionLine tool/script to analyze areas that were common (or unique) to each dataset.
0 Kudos