Question

Tiler on Polygons with Different Orientations

  • 20 August 2018
  • 1 reply
  • 9 views

Badge

I'm using the Tiler transformer to split individual polygons by a specified number of horizontal and vertical tiles. This overall works perfectly for polygons that are generally horizontally or vertically oriented. However, this functionality is lost when attempting to tiler polygons with "irregular" orientation (see image).

Any suggestions for how to account for this? It'd be great if the Tiler transformer had an option to use the the polygon's geometry and tile starting from the longest measured side?


1 reply

Badge +22

Rotate your problem polygons so they are axis aligned, tile them, and rotate them back the other way.

 

 

To determine the angle to rotate, what I've done is used an geometry extractor -> oriented bounding box ->coordinate extrator ->expressionEvaluator (to determine angle) -> geometryReplacer (to restore original geometry).

 

 

There's an idea to include the orientation angle on the bounding box replacer, which would make things simpler https://knowledge.safe.com/content/idea/20534/angle-attribute-for-oriented-boundingboxreplacer.html

Reply