Question

generate points within a polygon

  • 28 May 2016
  • 2 replies
  • 106 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


2 replies

Badge +3

@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)

Badge +2

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.

Reply