This can be a fairly simple operation, as long as you don't have to
calculate the CumulativeDistance in the first place.

Run your features through a Counter so that they have a unique ID.  Run
one copy of this through an AttributeRemover to get rid of everything
except the ID and CumulativeDistance then an AttributePrefixer and
finally into a FeatureMerger as the supplier.  Run a second copy through
an ExpressionEvaluator to create a previousID (ID - 1) field and then
into the FeatureMerger as the requestor.  Use previousID as the
requestor join field, and ID as the supplier join field.  Make sure to
pick up both Complete and Incomplete output ports, as the first feature
will not match anything :)

Jason

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of
Athina
Sent: Wednesday, August 24, 2005 23:19
To: [email protected]
Subject: [fme] Attribute from previous row

Hi,

I have a group of points I have sorted in a particular way, and now I
would like to copy an attribute of the previous feature into a new
attribute, for the current feature, ie if the features were sorted by
Cumulative_Distance (which is a string)and I am looking at the 50th
feature, I want the new attribute to have the Cumulative_Distance of the
49th feature. I'm not replacing the old attribute.

Has anyone done something like this? How did you do it?

Thanks,

Athina.


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/
 


Reply via email to