I want to compute a centroid for polygons then add the X and Y fields to my features. I could not find any way of doing this in FME desktop as I have it. Can anyone suggest how I might do this please?
Page 1 / 1
Hi,
I think that "CenterOfGravityReplacer" and "CoordinateExtractor" are applicable.
Hi,
maybe "insidepointreplacer" then "pointonareaoverlayer" are better, because centerofgravityreplacer generate the point could be outside of the shape.
Yes. "CenterOfGravityReplacer" may generate a point outside of the original shape. I understood that "centeroid" means the center of gravity which can be outside of the shape. "CenterOfGravityReplacer" and "InsidePointReplacer", which is more suitable differs according to chrismugdan's demand.
Hi,
Take your reader,
branch
InsidePointReplacer followed by CoordinatesExtractor
( very fancy to include reprojectors )
Merge with original data
FeatureMerger (The best of feature_ID)
Write Results
Feature-writer
copy attributes from input
add your two X,Y attributes named in the CoordinatesExtractor
Good Luck
(failed to include a picture of the workbench)
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.