How to merge all the feature with same attribute into the largest one?

3587
7
07-09-2015 08:14 AM
XingboChen
New Contributor III

I got a line feature and a polygon feature and they both have date attributes which I need to compare, I want to use  join line attribute to polygon attribute with spatial join tool, but the line feature within target area have different attributes and I only want the attribute with the largest/longest feature. So How can I merge other small/short feature into the largest/longest feature?

QQ截图20150709222901.jpgQQ截图20150709222852.jpg

Some other questions:

1.As picture below, the time logic should be fieldStartDate<fieldFinishDate<compStartDate<compFinishDate, all 4 fields are text not date type. I tried to change them into short integer, such as "2014-08-28" into "20140828", then subtracted one by one, if the result is negative, I know the date is wrong. But this is too complicated, is there any easy way to do it?

QQ截图20150709222907.jpgQQ截图20150709222927.jpg

2.The original line feature was a total mess, instead of one single line there was dozens of line intertwined with each other and they break at intersections, I have to modify/merge/delete them one by one in order to make a single line, it took me a lot time, is there any easy way to do it too?

If anyone knows the answers, please help me, I've already taken 4 overtimes:(

QQ截图20150709223607.jpg

0 Kudos
7 Replies
sujeetyadav
New Contributor III

Steps to follows

1 Start Editing

2 Now Select all feature which you want to merge from one feature class to other from attribute table and right click in the left most side of row of attribute table and click copy selected.

3 Now right click anywhere on the map and click past, it will open up a popup from there it will ask you to select a feature class where you will paste your result.

XingboChen
New Contributor III

Yeah, this works only when I have one target area, but as you can see in the first picture, there are a lot polygon areas of lines, merge them manually would took me a lot time and I may miss some rows. And this is only one county, I've got the whole state.

0 Kudos
sujeetyadav
New Contributor III

you could use model builder for this task

you will get model builder help from here

ArcGIS Help 10.1

XingboChen
New Contributor III

But how to merge other feature into the largest/longest one automatically?

0 Kudos
ChrisDonohue__GISP
MVP Alum

Not sure if this will work with your particular dataset, but I'll throw it out there.  In terms of the merge to largest feature, one process workflow that may work is to do this:

1. Select the largest line feature of each.  Save this result.

2.  Dissolve

ArcGIS Help 10.1

3.  Join the table from Step 1 to the Dissolved feature class.

Chris Donohue, GISP

XingboChen
New Contributor III

It will work, but is there any method to select the largest line feature of each automatically?

0 Kudos
DarrenWiens2
MVP Honored Contributor

1.) Run Spatial Join, as usual, to join each polygon's attributes to the intersecting lines

2.) Run Summary Statistics, stat = line length, MAX, case = polygon ID

3.) Join the result back to the polygons. Each polygon will have the attributes of the longest line it intersects.