[OpenLayers-Users] fitting a feature within a give polygon
Stephen Woodbridge
woodbri at swoodbridge.com
Wed Dec 24 15:12:33 PST 2014
On 12/24/2014 5:34 PM, Dave Potts wrote:
> hi List
>
> Is there any easy way off getting a feature of several simple polygons
> to fit within an arbitrary polygon of a given size?
Hi Dave,
Can you explain a little better about what you are trying to do:
* fitting puzzle pieces together?
* rotating a polygon to fit inside another polygon?
One idea might be to think about the problem as a grid of cells.
So take your arbitrary polygon and lay a grid over it.
then lay a grid over your test polygon, and see if you can fit the test
grid into the cells of the arbitrary polygon. You can rotate the test
geometry and and then grid it again and repeat as needed.
You can vary the grid size to suit the tolerance you need.
-Steve
More information about the Users
mailing list