Skip to main content
Question

generate points within a polygon

  • May 28, 2016
  • 2 replies
  • 1082 views

hello all,

i have a simple square polygon,

i am trying to place an array on evenly spaced points within it,

i have found RandomPointGenerator in the FME store, it does the trick, but i need to define the X and Y offset values,

any help would be great :)

cheers

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.

2 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • May 28, 2016

@fungry21

Create a grid within the square polygon using a 2DGridAccumulator on the input object (your square).

Use point type to create.

Counter to count number of your input objects and then using a attirubutecreator or expressionevaluator to calculate the squareroot of your input objects and round this value.

Use value to create x, and y (number of cells )

I assume by square you mean a even sided rectangle. (else you need to calculate aspect ratio first)


Forum|alt.badge.img+2
  • May 28, 2016

Not sure I understand exactly what you're trying to do...

But does this help? Use the PointCloudCombiner as described in this blog post

http://blog.safe.com/2016/05/point-cloud-power/

Look in the heading FME can make point clouds from any geometry

Or have a look at the 2DGridAccumulator and maybe need to Clipper it against the source geometry.