[Jts-topo-suite-user] help with STRtree
Brought to you by:
dr_jts
From: Sandro S. <st...@kb...> - 2016-09-21 16:38:57
|
Hi there, I'm writing to ask for help with STRtree as I'm seeing an unexpected number of matches from a _query and I'd like to check with you I'm not calling things the wrong way. I have an array of envelopes that I put in the index and then query them to find those that contain a point. The code, using GEOS, goes like this (pseudo): tree = STRtree_create(10); for each genv: STRtree_insert(tree, genv, ring) Then upon querying the tree, containing about 1 milion envelopes, I often get an higher-than-expected number of matches from a query: STRtree_query(tree, pt) In one case it got as high as almost the whole set: Found 935029 candidate shells for containement of ring point POINT (1572657.1699999999254942 4808574.7900000000372529) Checking the point with other means tells me it's only contained by 11 envelopes, not 935029. So, what could I be doing wrong to get such weird numbers ? --strk; () Free GIS & Flash consultant/developer /\ https://strk.kbt.io/services.html |