[geos-devel] [GEOS] #1007: GEOSNearestPoints_r for prepared geometries

GEOS geos-trac at osgeo.org
Tue Dec 17 11:54:17 PST 2019


#1007: GEOSNearestPoints_r for prepared geometries
-------------------------+---------------------------
 Reporter:  ndawson      |       Owner:  geos-devel@…
     Type:  enhancement  |      Status:  new
 Priority:  minor        |   Milestone:
Component:  Default      |     Version:
 Severity:  Unassigned   |  Resolution:
 Keywords:               |
-------------------------+---------------------------

Comment (by dbaston):

 > I can't find any documentation regarding GEOSDistanceIndexed
 (anywhere!).

 Hmm, maybe that's why I've never seen it used in the wild...

 > Does it maintain an index between calls? Is there any downside of using
 this over GEOSNearestPoints?

 No, and I agree that prepared geometries might be a good vehicle for
 maintaining that index.

 I haven't done testing to see what the break-even point is for an indexed
 vs brute-force distance calculation. The indexed calculation might be
 slower for very small geometries. I think you'd also have to use
 `GEOSBoundary(polygon)` as the input to `GEOSDistanceIndexed`, so you'd be
 paying for a copy.

-- 
Ticket URL: <https://trac.osgeo.org/geos/ticket/1007#comment:3>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list