Skip to main content
Question

CenterPointReplacer: How generates the "Inside Point" feature?

  • March 2, 2017
  • 13 replies
  • 241 views

juanmahere
Supporter
Forum|alt.badge.img+13

Hi all,

It's been a while since I've been working with this FME Desktop transformer. Today, I found something that woke me up and made me think HOW the "Inside Point" feature (one of the three options) is generated using this transformer. The situation is this one:

Input: One polygon feature from a Shapefile.

Using FME Desktop 2016.1 (tried older versions and same results)

Image:

I don't know if you can appreciate that the INSIDE POINT generated is in the same border of the polygon, so, after that, if I try to "Overlay" with other transformers like PointOnAreaOverlayer... it'd give me a non-overlay output.

After all this description, I wanted to know "How" is generated this "point" output using the CenterPointReplacer transformer:

  • Is there any potential parameters as could be Bounding Box, Number of coordinates, Multipatch feature... to be considered?

Knowing that information, I could anticipate these situations and get it ready before hand with any workaround, instead of figuring out why my workflow is not working properly and finding out these special cases.

Thanks for the support,

Juanma,

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.

13 replies

david_r
Celebrity
  • 8394 replies
  • March 2, 2017

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

There are three options:

  • Center point: Replaces the geometry of the feature with a point that is in the center of the feature's bounding box.
  • Center of Gravity Point: Replaces the geometry of the feature with a point at the center of mass of the feature. Note that, depending on the feature’s shape, the resulting point may be far outside of the original feature.
  • Inside Point: Replaces the geometry of the area feature with a point that is guaranteed to be inside the area.

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

There are three options:

  • Center point: Replaces the geometry of the feature with a point that is in the center of the feature's bounding box.
  • Center of Gravity Point: Replaces the geometry of the feature with a point at the center of mass of the feature. Note that, depending on the feature’s shape, the resulting point may be far outside of the original feature.
  • Inside Point: Replaces the geometry of the area feature with a point that is guaranteed to be inside the area.
Hi David, Yep, we do check the documentation, but the issue is that the point is returned in a very strange location, using inside point option, which causes the process of overlaying back to the poly to fail, because it lays exactly on the border. Thanks.

 

 


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3430 replies
  • March 2, 2017

I often see that the inside point is very close to the edge of the polygon but I've never seen a case where the point would not then overlap using the point on area overlayer. Are you able to share this particular geometry?


redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3703 replies
  • March 3, 2017

That's a very strange result indeed, would love to take a look at it too.

Maybe somebody from Safe can chime in about how the CenterPointReplacer works under the hood if you pick the InsidePoint option. Does it try CenterPoint and CenterOfGravity first and if both of those fall outside the polygon does it then pick "a" point inside?


  • 1 reply
  • March 14, 2018

Hello,

I would like to understand how the inside point is calculate exactly from the polygon by the CenterPointReplacer transformer.

Have you got answer for this issue ?


david_r
Celebrity
  • 8394 replies
  • March 14, 2018

Hello,

I would like to understand how the inside point is calculate exactly from the polygon by the CenterPointReplacer transformer.

Have you got answer for this issue ?

It doesn't seem to be documented in the transformer help: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/centerpointreplacer.htm

 

I suspect you'll have to contact Safe if you need a precise understanding of the algorithm. Try contacting them at support@safe.com

juanmahere
Supporter
Forum|alt.badge.img+13
  • Author
  • Supporter
  • 47 replies
  • April 5, 2018
I came back to this topic, just to see any progress on this... just found another example (CenterPoint falling on the edge, topologically touching its neighbor :( ):

 

 

Any suggestions? Thanks,

 


david_r
Celebrity
  • 8394 replies
  • April 5, 2018
I came back to this topic, just to see any progress on this... just found another example (CenterPoint falling on the edge, topologically touching its neighbor :( ):

 

 

Any suggestions? Thanks,

 

This is indeed a known issue for odd-shaped geometries, it's mentioned in the documentation that I've linked below.

 

For your case a possible solution would be to set mode to "Inside point", which will return a point that's guaranteed to be inside the polygon. It's slightly slower, however.

david_r
Celebrity
  • 8394 replies
  • April 5, 2018
Hi David, Yep, we do check the documentation, but the issue is that the point is returned in a very strange location, using inside point option, which causes the process of overlaying back to the poly to fail, because it lays exactly on the border. Thanks.

 

 

That's strange. I think it might be worthwhile to send your polygon and a sample workspace to Safe support in this case. Maybe also reference this thread.

juanmahere
Supporter
Forum|alt.badge.img+13
  • Author
  • Supporter
  • 47 replies
  • April 5, 2018
This is indeed a known issue for odd-shaped geometries, it's mentioned in the documentation that I've linked below.

 

For your case a possible solution would be to set mode to "Inside point", which will return a point that's guaranteed to be inside the polygon. It's slightly slower, however.
Thanks David, indeed, is already set to INSIDE Point:

 

 

 

Looks like we'd need a "Really INSIDE Point" option there... ;)

 

 


david_r
Celebrity
  • 8394 replies
  • April 5, 2018
Thanks David, indeed, is already set to INSIDE Point:

 

 

 

Looks like we'd need a "Really INSIDE Point" option there... ;)

 

 

Could it be that it's indeed inside, only with a very tiny margin?

 

What do you see if you zoom in reaaaallly close?

juanmahere
Supporter
Forum|alt.badge.img+13
  • Author
  • Supporter
  • 47 replies
  • April 5, 2018
This is indeed a known issue for odd-shaped geometries, it's mentioned in the documentation that I've linked below.

 

For your case a possible solution would be to set mode to "Inside point", which will return a point that's guaranteed to be inside the polygon. It's slightly slower, however.
100% is on the edge, which causes me issues giving me back instead the neighbors info...

 

 


david_r
Celebrity
  • 8394 replies
  • April 5, 2018
100% is on the edge, which causes me issues giving me back instead the neighbors info...

 

 

Sounds like an interesting edge case. I recommend you send a sample dataset and workspace to Safe support so that they can have a look.