I¹m reviewing my commentary on the subject one year ago.
http://sourceforge.net/mailarchive/message.php?msg_id=30360615    (as an
aside, I *hate* SourceForge¹s mail archive browser)

Ideally the AbstractSTRtree class should document the nature of its
thread-safety or lack there-of.

>From what I see, if you only modify the STRtree in a single thread to
build it, and critically if you then call build(), it appears henceforth
thread-safe for concurrent threads to read-access the tree (but not modify
it).

There is some synchronization within the class but IMO it should be
removed as it doesn¹t make any usage pattern I can think of of thread-safe
that wouldn¹t otherwise be.  It¹s hurting some potential concurrent
performance for no gain.  I¹m not saying anything new that I didn¹t say
one year ago.

~ David

On 1/10/14, 8:27 PM, "Martin Davis" <[email protected]> wrote:

>AFAIK, STRtree is thread-safe for querying.  Snce it is built lazily you
>may need to ensure the loading is synchronized appropriately.
>
>
>On 1/9/2014 8:06 PM, Michael Bedward wrote:
>> Hi all,
>>
>> I'm back working on a task that I discussed here last month (and
>> received the benefit of Martin's tips) to do with finding the minimum
>> distance within compass segment from each of a set of sample points to
>> polygon boundaries.  The input data are scarily large, but I hope to
>> be running the job on a 12 core machine so I've based the code around
>> Akka actors.
>>
>> At the start of the job, polygonal features will be read from a
>> shapefile and inserted into a spatial index (STRtree). Once the index
>> has been constructed it will be passed to a large number of
>> asynchronous actors which will beaver away at the point sampling. Each
>> of these actors will query the tree (using the
>> nearestNeighbour(envelope, geom, distanceOp) method. Lots of
>> concurrent calls in other words.
>>
>> I've seen a few past posts about STRtree not being thread-safe but I
>> have the impression that it should be safe to query concurrently. Can
>> anyone confirm or deny this ?
>>
>> Cheers,
>> Michael
>>
>> 
>>-------------------------------------------------------------------------
>>-----
>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>> Critical Workloads, Development Environments & Everything In Between.
>> Get a Quote or Start a Free Trial Today.
>> 
>>http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clk
>>trk
>> _______________________________________________
>> Jts-topo-suite-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user
>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2013.0.3462 / Virus Database: 3658/6989 - Release Date:
>>01/09/14
>>
>>
>
>
>--------------------------------------------------------------------------
>----
>CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>Learn Why More Businesses Are Choosing CenturyLink Cloud For
>Critical Workloads, Development Environments & Everything In Between.
>Get a Quote or Start a Free Trial Today.
>http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clkt
>rk
>_______________________________________________
>Jts-topo-suite-user mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user

Reply via email to