Skip to main content
Question

generate points within a polygon


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

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings