Re: Point within country boundary [message #87358 is a reply to message #87336] |
Tue, 28 January 2014 03:35   |
Matt[3]
Messages: 23 Registered: April 2011
|
Junior Member |
|
|
Hi All,
Thanks for the help. This has been very useful. David's cgExtractShape works a treat.
As for speed, I needed to allocate points to specific countries on a relatively fine grid (~1e6 points), so ContainsPoints was far too slow. CalculateMask was much more appropriate.
Cheers,
Matt
As for speed, whilst ContainPoints
On Saturday, 25 January 2014 14:14:23 UTC, Fabien wrote:
> On 25.01.2014 14:36, David Fanning wrote:
>
>> I'm not sure that you can even*think* about going for coffee in the
>
>> time you save, let alone going to get a cup.;-)
>
>
>
> well, there is a factor of 1300 between ContainPoints (brute force) and
>
> ComputeMask, and a factor of 150 betwen ContainPoints (brute force) and
>
> the "smart" ContainPoints (when only the points that passed the mask
>
> test are checked).
>
>
>
> I do this kind of operation quite often with large images and complex
>
> ROI groups (see for example the size of the shapes of the last Randolph
>
> Glacier Inventory). Be sure I am glad to have found this trick ;-)
>
>
>
> Cheers
>
>
>
> Fabien
|
|
|