Example if point A from shape 1 and point B from shape 2 have the same X,Y and i want to copy an attributevalue from point B point A
Copy attributevalue
I have 2 shapefiles (points). How can i copy the attributevalue from shape 1 to shape 2 if the points have the same geometry.
Easiet method is to use the UnconditionalFeatureMerger. However, you could concatenate the X&Y values into a new attribute called ID on both features and then use the FeatureMerger with the ID value as the new primary key.
Hope that helps
Or use the AttributeCreator directly to get the X and Y value and then merge on the ID.
Just to add to the excellent answers below: if you're merging based on coordinate values it might be a good idea to add a CoordinateRounder or AttributeRounder on your values before merging.
Otherwise you risk missing matches based on fractional differences in the floating point string representation, e.g.
1.9999999997 <> 2.0
David
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.