Skip to main content
Question

Tiler on Polygons with Different Orientations

  • August 20, 2018
  • 1 reply
  • 71 views

Forum|alt.badge.img

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

jdh
Contributor
Forum|alt.badge.img+35
  • Contributor
  • August 20, 2018

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


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