[R-sig-Geo] determining suitable lakes for landing
Bastien.Ferland-Raymond at mrnf.gouv.qc.ca
Bastien.Ferland-Raymond at mrnf.gouv.qc.ca
Mon Jul 30 14:11:08 CEST 2012
Dear R gurus,
I'm facing a challenge that I have a good feeling you could help me with. So far I'm stuck right at the beginning so I don't have any example to show you. Here is what I'm trying to do:
I have a polygon shape of lakes for which I have to be able to automatically determine if they are suitable (large enough) for a plane to land. To be suitable, we must be able to fit a rectangle of dimension 50m x 1500m in the lake without it touching any lake contour. Of course, the rectangle can be in any orientation in the lake, which makes the test a little harder.
I can easily eliminate all the small lakes by using the extent and Pythagorean. For exemple:
1500 > sqrt(sum((bbox(lake)[,2] - bbox(lake)[,1])^2)) # measure the diagonal of the bbox of the lake (mtm projection)
All those lake are definitely too small for a plane to land, however not all the lakes that are bigger than that will be large enough.
Anybody have an idea how to place the rectangle and discriminate those lakes?
Thanks for your help!
Bastien
Bastien Ferland-Raymond, M.Sc. Stat., M.Sc. Biol.
Division des orientations et projets spéciaux
Direction des inventaires forestiers
Ministère des Ressources naturelles et de la Faune
More information about the R-sig-Geo
mailing list