Opened 15 years ago

Closed 8 years ago

Last modified 8 years ago

#75 closed enhancement (fixed)

Enhancement to PIP short circuit

Reported by: kneufeld Owned by: dbaston
Priority: low Milestone: PostGIS 2.3.0
Component: postgis Version: master
Keywords: Cc:

Description (last modified by robe)

The PIP short circuit in predicates like ST_Intersects and ST_Contains is currently defined for POINT - [MULTI]POLYGON pairs. This algorithm could be expanded to include MULTIPOINTs, esp. for one-member-multipoint cases and optionally in a few-member-multipoint cases (if performance testing warrants it).

Change History (9)

comment:1 by robe, 15 years ago

Description: modified (diff)
Milestone: 1.4.X

comment:2 by pramsey, 14 years ago

Milestone: postgis 1.4.1postgis 2.0.0

comment:3 by pramsey, 14 years ago

Milestone: postgis 2.0.0FUTURE

comment:4 by dbaston, 8 years ago

I started some experimentation on this: https://github.com/postgis/postgis/pull/75

comment:5 by robe, 8 years ago

Milestone: PostGIS FuturePostGIS 2.3.0
Version: trunk

Wow Dan, you're cranking. Putting me to shame. Since you have something in works, changed this to 2.3.

comment:6 by dbaston, 8 years ago

I've updated the pull request to extend the PIP code to cover MultiPoints in ST_Intersects, ST_Contains, ST_Covers, and ST_Within. Initially I was limiting this to MultiPoints with only a few members, but I've removed these restrictions - if the PostGIS PIP code is faster than GEOS for 1 PIP test (and it is), then it should be faster than GEOS for 100 PIP tests (and it is).

I think I'm misunderstanding something about the RTree side of this process, though. From profiling, the geos_intersects function is spending 50% of its time creating and destroying RTrees, but I'm having trouble getting it to ever _use_ those RTrees. What type of query is needed for the caching behavior to kick in?

comment:7 by robe, 8 years ago

Owner: changed from kneufeld to dbaston
Status: assignednew

comment:8 by dbaston, 8 years ago

Resolution: newfixed
Status: newclosed

Committed to trunk at r14613. Hopefully worth the wait?

comment:9 by robe, 8 years ago

(In [14618]) Document which functions Enhanced by PIP change. references #75 Also add section to show enhancments in xsl generation script

Note: See TracTickets for help on using tickets.