Changes between Initial Version and Version 1 of PreparedGeometry


Ignore:
Timestamp:
Nov 18, 2008, 10:30:59 AM (15 years ago)
Author:
sgillies
Comment:

the prepared geometry feature

Legend:

Unmodified
Added
Removed
Modified
  • PreparedGeometry

    v1 v1  
     1= Prepared Geometry =
     2
     3Version: ?
     4
     5Source: [source:trunk/source/headers/geos/geom/prep]
     6
     7== Description ==
     8
     9From [http://lin-ear-th-inking.blogspot.com/2007/08/preparedgeometry-efficient-batch.html Martin Davis]:
     10
     11A common usage pattern for JTS spatial operations (in particular, predicates such as intersects and contains, and overlay operations such as intersection and union) involves the operation being invoked between a single target geometry and a batch of test geometries. For instance, this occurs in queries in a spatial database such as PostGIS, where each geometry in the driving table interacts with a set of nearby geometries via the required operation. By taking advantage of the fact that the target geometry does not change, it is possible to significantly reduce the overall execution cost of the operation. Information such as an index on the line segments in the target geometry can be computed once and cached for reuse with all of the test geometries.
     12
     13In order for this to work, the calling code must be able to indicate that the operation is being invoked in a batch setting. The standard JTS Geometry API doesn't allow differentiating this case, so the new concept of PreparedGeometry has been developed. (This name intentionally echoes the concept of prepared statement in SQL API's, which implements the same strategy.) Creating a PreparedGeometry on a target Geometry enables precomputation of various data structures, which then allows subsequent operations to be evaluated with maximum efficiency.
     14
     15== Links ==
     16
     17 * http://lin-ear-th-inking.blogspot.com/2007/08/preparedgeometry-efficient-batch.html
     18 * http://blog.cleverelephant.ca/2008/10/postgis-performance-prepared-geometry.html
     19
     20== Tickets ==
     21
     22[http://trac.osgeo.org/geos/search?q=prepared+geometry&noquickjump=1&ticket=on Search for "prepared geometry"]