[postgis-devel] ST_DistanceCached(geog, geog), ST_DWithinCached(geog, geog)

Nicklas Avén nicklas.aven at jordogskog.no
Tue Jun 19 00:30:11 PDT 2012


Great!

Will the same tree apply to geometry type calculations?
Will it be difficult to use with geometry?

The difference between geometry and geography, beside the different
calculation, is that the measured points is stored in geometry for
st_closestpoint and st_shortestline. 

Maybe this is a good time to do something similar also in geography, if
possible?
I have seen some wishes for that functionality in geography.

This tree-enhancement will be great to increase the predictability of
how long time a distance calculation will use. Today it is very
dependent on how many of the calculations that have intersecting bboxes,
which can be quite annoying.

/Nicklas 


Is On Mon, 2012-06-18 at 20:46 -0700, Paul Ramsey wrote:
> I've temporarily committed two functions to Geography support in trunk,
> 
> ST_DistanceCached(geog, geog)
> ST_DWithinCached(geog, geog, double)
> 
> These would take over from ST_Distance(geog, geog) and
> ST_DWithin(geog, geog, double) when good behavior, performance are
> confirmed. The only difference between them and their antecedants is
> that they try and cache an internal geography tree. This seems to make
> a massive, monster difference for distance calculations. Oddly, I
> haven't been able to demonstrate a speed difference in DWithin yet, at
> least not with fairly small tolerance values.
> 
> Please feel free to test and let me know how things go.
> 
> P.
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
> 





More information about the postgis-devel mailing list