[R-sig-Geo] RE : determining suitable lakes for landing

Karl Ove Hufthammer karl at huftis.org
Tue Jul 31 09:44:53 CEST 2012


Barry Rowlingson skreiv:

>> There is already a field telling if you could land of not ("AMERISS")
>> that was found by some old ARCgis coding (ARCinfo and aml, not sure
>> exactly how).  It was a consultant that did this code for us a couple of
>> years ago, now we want to transfer to R, explaining why I have this
>> problem now.  The code was also using iteration, however not random, on
>> rasterized lakes.  I think it would be interesting to compare the result
>> from the 2 techniques.
>>
>> I'm going to try that this afternoon, and let you know the result.
> 
> I had a brief think about how to do this with rasters, but I couldn't
> see any advantage, unless there's some neat trick way of eroding parts
> of the lake that can't possibly be part of a given rectangle...

Perhaps using a 2D Boyer–Moore-style algorithm on the raster could work?	
http://techreports.lib.berkeley.edu/accessPages/CSD-93-784.html

Of course, this doesn’t help with the orientation problem, so you’ll have to 
repeat the algorithm (if it doesn’t succeed one the first trial) for various 
orientations. But, depending on the required accuracy, it might suffice with 
just a *few* rotations of the island or rectangle (5? 10? 20?). Or at least 
it should help to successively try orientations that are very different from 
each other (e.g., first 0° and 90°, then 45°, then 22.5° and 67.5°, etc.).

-- 
Karl Ove Hufthammer
E-mail: karl at huftis.org
Jabber: huftis at jabber.no



More information about the R-sig-Geo mailing list