Now that is really good to know. I will use STRtree for static indices. Later in the same process I have be also using kdtree (on the z data) to facilitate gridding. This is all about fast nearest
neighbour search and having a fast in-memory build time. From what I read, kdtree is the one to use.
Thanks very much for that.
From: jts-dev-bounces@xxxxxxxxxxx <jts-dev-bounces@xxxxxxxxxxx>
On Behalf Of Martin Davis
Sent: Saturday, 7 December 2019 05:16
To: JTS project developer mailing list <jts-dev@xxxxxxxxxxx>
Subject: Re: [jts-dev] best way to find all points (indexed in an SRTtree) and a polygon.
I did some performance testing of STRtree, KdTree and HPRtree, running on a dataset of 1 M points. I was a bit surprised by the results, which seem to show that KdTree is a bit *slower* than the other indexes in query time (by ~20%).
STRtree and HPRtree had similar query times. HPRtree had a slower build time, which was also a bit surprising.
Overall, STRtree was the performance winner. There may still be better choices if memory is the biggest concern, but it's nice to know that STRtree is holding up as the best JTS index to use.
This is right in the KdTree sweet spot, so I would expect it to be more performant than STRtree. A report on performance would be interesting to hear if you try them both out. Also, the KdTree might be more memory efficient.
Notice: This email and any attachments are confidential and may not be used, published or redistributed without the prior written consent of the Institute of Geological and Nuclear Sciences Limited (GNS Science). If received in error please destroy and immediately
notify GNS Science. Do not copy or disclose the contents.
|