Keeping statistics with multi-field dissolving

143
3
08-24-2018 01:25 AM
Highlighted
New Contributor II

Hello,

I have a tram-track layer with many single segments I want to dissolve by multiple fields, e.g. by tramline-number and if its a single-track or double-track segment of the tram. So alle the single-track parts of line 1 as one feature, all double track parts of line 1 as another feature, single track for line 2, double track for line 2 and so on. Choosing both fields (line number and Track type) as dissolving fields works fine for aggregation (no multipart-features).

But not for the statistics. I also want to sum the number of signals along each new feature. so I used the "number of signals" field in my attribute table as a statistic field, type sum. But the result is the same number of signals for each part of line 1, so single track for line 1 --> 16 signals, double track for line 1 --> 16 signals. But there are 16 signals along the whole line 1, it should be single track for line 1 --> 6 signals, double track for line 1 --> 10 signals.

Does someone know how to fix this? (it's not only those two lines, so I can't do it manually...)

Thanks in advance

Jonas

Reply
0 Kudos
3 Replies
Highlighted
MVP Esteemed Contributor

maybe showing some portions of the sample tables would help.

Are you trying to get this into one table or are you looking at how to efficiently set up a series of joins/relates?

Reply
0 Kudos
Highlighted
New Contributor II

Sorry for the late reply, I was on holiday and only came back into office today. The data is held non-public, so I'm held to not publish it...

I was trying to get it into one table.

Dissolving it after multiple fields only worked with the segments, so indeed all the single track parts of line x and all the multi part tracks of line x as well as all the single track parts of line y and all the multi part tracks of line y and so on were aggregated as one part each. but the attribute table showed multi track for all of the 4 cases... And the calculated Statistics were only for one of the dissolving fileds, as mentioned above.

I don't know exactly what happened, but it seems the programm could't handle a dissolving process with 5 fields. But I could solve it with this workaround: creating a new field in the attribute table (text-type), calculated it as a comination of the 5 fields I wanted to dissolve after. Now I could use this field to dissolve after, and with only this one field all the statistics were calculated correctly!

Highlighted
MVP Esteemed Contributor

That would be the solution since it simplifies the dissolve to one case

Reply
0 Kudos