Solved

I got a circle (buffer of 30km around an emission-source), which I've to divide in 12 Segments (30 DegreeSegments)? ?

  • 10 December 2015
  • 6 replies
  • 4 views

I got a circle (buffer of 30km around an emission-source), which I've to divide in 12 Segments (30 DegreeSegments)? ?
icon

Best answer by erik_jan 10 December 2015, 16:50

View original

6 replies

Badge +22

I would probably create 12 radiating lines and then use them to split the polygon.

You can create the lines with a VertexCreator based on the original emission-source point and the following values:

x: @XValue()+$(Distance)*@cos(@degToRad($(Angle)))

y: @XValue()+$(Distance)*@sin(@degToRad($(Angle)))

Splitting the polygon is trickier (why doesn't fme have an AreaOnLineOverlayer?) But essentially run both the buffer and the lines through either an Intersector or TopologyBuilder and then use an AreaBuilder to reconstitude the polygon.

If you have a unique ID attribute on your source point (and buffered area) you can use a group by on the AreaBuilder to preserve that attribute and then use a FeatureMerger to restore the attributes, otherwise some sort of spatial joining will need to occur.

Userlevel 2
Badge +12

It can also be done like this:

Create the centerpoint from the Circle using CenterPointReplacer (also keep the Circle).

Use the RadiateLineGenerator to generate 12 lines a bit longer than the radius of the Circle (40).

Use the Intersector to clip the lines and circle.

Use AreaBuilder to create the segments.

Badge +22

It can also be done like this:

Create the centerpoint from the Circle using CenterPointReplacer (also keep the Circle).

Use the RadiateLineGenerator to generate 12 lines a bit longer than the radius of the Circle (40).

Use the Intersector to clip the lines and circle.

Use AreaBuilder to create the segments.

I didn't know about the RadiateLineGenerator, I'll have to look into it

Badge +3

Or use a 2dArcCreator center x = source_x, center y = source_y, primary axis and secondary axis =30, 0 to 360

create line centerpoint (Creator) to (source_x + 30,source_y) and clone this 12x (Cloner 12)

then rotate lines by 360/12 * copynum (Rotator)

intersect them all and create area (Areabuilder).

Thanks for the advices. Didn't know the RadiateLineGenerator. Worked very well!

Badge +22

As a completely different alternative, clone your emission source 12 times, create an azimuth attribute of copynum*30 and send them to a SectorGenerator with a radius of 30km. The Sectors output port will give you your pie wedges.

Reply