Skip to main content
Solved

Count number Points in a Polygon

  • September 28, 2017
  • 5 replies
  • 582 views

anthrax_79
Contributor
Forum|alt.badge.img+4

Hi, I am still new in FME. and I want to count the number of points in a polygon and results should show number of points via the polygon ID

 

 

my database are all in shapefiles and have same coordinate systemPolygonNumber of points insideRegion 125Region 265

if someone can please post a step by step that would be highly appreciated.

thanks

Lex

Best answer by danilo_fme

Hi @lexadove731,

I believe the transformer PointOnAreaOverlayer is good for you.

This transformer has two Input ports ( Points and Area ).

A new attribute is created by this transformer : _overlaps ( with number of points inside ).

Results:

Thanks,

Danilo

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

ciarab
Contributor
Forum|alt.badge.img+9
  • Contributor
  • 167 replies
  • September 28, 2017
@lexadove731

you should be able to achieve this easily by adding your points and you polygons and the using the pointonareaoverlayer transformer

Using the output port there should be an attribute on the polygons called _overlaps this will give a count of the number of points inside

https://docs.safe.com/fme/2017.1/html/FME_Desktop_Documentation/FME_Transformers/Transformers/pointonareaoverlayer.htm


danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • Best Answer
  • September 28, 2017

Hi @lexadove731,

I believe the transformer PointOnAreaOverlayer is good for you.

This transformer has two Input ports ( Points and Area ).

A new attribute is created by this transformer : _overlaps ( with number of points inside ).

Results:

Thanks,

Danilo


danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • September 30, 2017
@lexadove731

you should be able to achieve this easily by adding your points and you polygons and the using the pointonareaoverlayer transformer

Using the output port there should be an attribute on the polygons called _overlaps this will give a count of the number of points inside

https://docs.safe.com/fme/2017.1/html/FME_Desktop_Documentation/FME_Transformers/Transformers/pointonareaoverlayer.htm

Good Job @ciarab

 


anthrax_79
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 24 replies
  • October 5, 2017

Hi @lexadove731,

I believe the transformer PointOnAreaOverlayer is good for you.

This transformer has two Input ports ( Points and Area ).

A new attribute is created by this transformer : _overlaps ( with number of points inside ).

Results:

Thanks,

Danilo

thanks for your reply. sorry i was in holiday. I tried that before asking here but I couldn't figure it out. it was not giving any results. I can see the_overlaps but however the output is still empty. sad to say but i have used a different ways to get what i want.

 

 

would be good to further improve my skills in FME as i think it is very usefull and diverse.

 

 


anthrax_79
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 24 replies
  • October 5, 2017
@lexadove731

you should be able to achieve this easily by adding your points and you polygons and the using the pointonareaoverlayer transformer

Using the output port there should be an attribute on the polygons called _overlaps this will give a count of the number of points inside

https://docs.safe.com/fme/2017.1/html/FME_Desktop_Documentation/FME_Transformers/Transformers/pointonareaoverlayer.htm

thanks mate. i will check out the link and do more study and training.

 

 

cheers