Skip to main content
In DGN file , How can i identify a centroid , multiple centroids inside a polygon, also please let me know how to give centroid attribute  for a polygon .
Hi,

 

 

to get a centroid for a polygon with FME, have a look at the InsidePointReplacer, CenterPointReplacer or the CenterOfGravityReplacer.

 

 

David
David,

 

Thanks,
  • I also need to check the number of centroids inside a polygon
  • I also need to know how to give  same attribute for centroid and the polygon having 
  • If different centroid have different attributes how can we check this.
Kindly help me to solve this.
Hi,

 

 

to check for points inside a polygon, look at the PointOnAreaOverlayer and the SpatialFilter. Use the Group By attribute to match points and polygons with eachother.

 

 

To check for differences between objects, use the Matcher.

 

 

David
The CoordinateExtractor will allow you to tag a feature with the X and Y coordinates of the centroid.

 

 

I think from your question though you maybe looking to do point - in - polygon analysis. If so then use the PointOnAreaOverlayer, this tool will allow you to identify how many points fall inside a polygon and also allow you to join all your point features attributes onto the polygon as a list. You can then use the list transformers to analyse the contents of the list.

 

 

I hope that helps.
Yes, use the PointOnAreaOverlayer transformer.

 

 

- The _overlaps attribute will tell you how many centroids the polygon has

 

- Attributes will be copied to/from the points and polygons

 

- Perhaps use a Matcher to check for centroids that are in the same polygon (get the same polygon ID perhaps?) but do not have the same attributes

Reply