Hi Bjornar, I've attached a workspace that shows how to do this. Basically:
- Run all of the features through an Aggregator, grouping by the
original ID and generating a list
- Test for aggregate count != 0
- Aggregate count != 0 (passed):
- Deaggregator (specify a part number attribute, and the list that
you generated when aggregating)
- Concatenator of original ID and part number attribute into NEW_ID
- Aggregate count = 0 (failed):
- AttributeCopier ID into NEW_ID
- ListRemover to get rid of temporary attribute holding list
- AttributeKeeper to make sure that only the attributes you care about
are retained
Jason
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of
bnobno2
Sent: Monday, November 21, 2005 04:40
To: [email protected]
Subject: [fme] COUNT and Group by?
Dear FME users,
Have polyline features where some of them does not have a uniqe ID
(original lines are split). For those features who have the same ID,
f.ex ID=999, I want to make new unique and consecutive sub ID's. F.ex.
if 3 polylines have the same ID, I want the first to have sub number 1,
2'nd num 2, and 3'rd num 3. New unique ID could be ID=999_1, 999_2, and
999_3, i.e. keep the origial but add sub numbers so they are unique.
1. Tried to use "Matcher" but that transformer gives every "group" the
same MATCH ID number.
2. Tried COUNT but that does not allow for "Group by". Anyone else miss
that opportunity?
3. Could sort out every uniqe MATCH ID and then use COUNT but I have up
to 60-70 unique groups and that will fill out all my workspace .....
Any ideas, please?
Bjornar
Get the maximum benefit from your FME, FME Objects, or SpatialDirect via our
Professional Services team. Visit www.safe.com/services for details.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/fme/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
split_to_unique.fmw
Description: split_to_unique.fmw
